Commit graph

3099 commits

Author SHA1 Message Date
Evelyn Eastmond
eb4f6235d9 Testing new sensor array to store sensor data on/offline. 2019-02-04 19:41:07 -05:00
Karishma Chadha
cd8de5f156 Add tests! =] 2019-02-04 19:05:44 -05:00
Karishma Chadha
d91c19434f Rename util function to be more descriptive. Refactor parameters to remove unused code. 2019-02-04 19:05:28 -05:00
Karishma Chadha
7faddb6c8f Replace xml-unsafe chars in sb3 variables. 2019-02-04 15:32:01 -05:00
Karishma Chadha
57f112cbfd Remove unsafe chars from variable ids when importing from 2.0. 2019-02-04 10:29:24 -05:00
Karishma Chadha
166bc37f6f
Merge pull request #1945 from yokobond/fix-message-variable-name-destruction
Escape variable name in XML
2019-02-04 10:10:13 -05:00
greenkeeper[bot]
bfe55ba47d chore(package): update lockfile package-lock.json 2019-02-01 15:08:17 +00:00
greenkeeper[bot]
e4300da429 fix(package): update scratch-sb1-converter to version 0.2.6 2019-02-01 15:08:12 +00:00
Eric Rosenbaum
12283daaa4
Merge pull request #1958 from ericrosenbaum/feature/vernier-updates
Update, re-order and clean up Vernier Force & Accel extension blocks
2019-01-30 16:49:46 -05:00
Karishma Chadha
13e69bad7b Code cleanup -- move out duplicate .then statements after the next .then (at the higher level) 2019-01-30 16:45:38 -05:00
Karishma Chadha
94cc7e66b6 Remove superfluous runtime not optional warnings. 2019-01-30 15:57:56 -05:00
Karishma Chadha
dfcd09fedc Stop emitting project changes within 'runtime._step()'. Emit project changes in scenarios that were previously taking advantage of runtime._step() 2019-01-30 10:59:25 -05:00
Karishma Chadha
e276bcc9fd Emit project changes when actually editing blocks instead of whenever scratch-blocks events are fired. 2019-01-30 10:59:25 -05:00
Karishma Chadha
b2f63cdbb4 Add tests for project state changes emitted by editing blocks. 2019-01-30 10:59:25 -05:00
Karishma Chadha
ee936e3d36 Fix tests for reordering costumes and sounds. 2019-01-30 10:59:25 -05:00
Karishma Chadha
df823a06f6 Add tests for project changed state. 2019-01-30 10:59:25 -05:00
Karishma Chadha
a9cf509a55
Merge pull request #1941 from kchadha/add-runtime-to-blocks
Add reference for `runtime` to blocks container
2019-01-30 10:57:45 -05:00
Eric Rosenbaum
3bdb13f049 Rename and re-order freefall threshold constant 2019-01-29 17:12:15 -05:00
Eric Rosenbaum
6cbc71f8d1 Add facing threshold 2019-01-29 17:09:11 -05:00
Karishma Chadha
e0b0d35b46 Add references to runtime to constructor calls for Sprite, Target, and RenderedTarget so blocks get created properly. 2019-01-29 15:30:45 -05:00
Katie Broida
356a4e7880 Declare const once to be resused in for loop 2019-01-29 10:47:54 -05:00
Karishma Chadha
7ac8721aa5 Add references to runtime to existing calls to Blocks constructor in tests. 2019-01-28 19:30:42 -05:00
Eric Rosenbaum
4449ee7f0f Only round sensor vals in opcodes 2019-01-28 17:45:16 -05:00
Eric Rosenbaum
c033732d62 Use enums and constants in isFacing 2019-01-28 17:15:37 -05:00
Eric Rosenbaum
f795197047 Enum and localization for facing up/down 2019-01-28 17:12:25 -05:00
Eric Rosenbaum
b5fb80190d Factor out and scale spin speed 2019-01-28 17:06:14 -05:00
Eric Rosenbaum
c5abcf5888
Merge pull request #1957 from LLK/greenkeeper/@vernier/godirect-1.4.1
update @vernier/godirect to version 1.4.1
2019-01-28 14:11:13 -05:00
Eric Rosenbaum
1abbf55f55 Re-order and update blocks 2019-01-28 14:05:39 -05:00
Karishma Chadha
d7134d2edd
Merge pull request #1946 from kchadha/fix-slider-min-max-save-load
Fix saving and loading of slider min max values.
2019-01-28 11:10:14 -05:00
Karishma Chadha
18e9a08775 Use beforeEach instead of a fake set up test 2019-01-28 10:53:42 -05:00
Eric Rosenbaum
c542b2384f
Merge pull request #1938 from ericrosenbaum/bugfix/text2speech-default-input-localization
Fix Text to Speech extension default input localization
2019-01-28 10:40:58 -05:00
Eric Rosenbaum
3bdbe689f9
Merge pull request #1937 from ericrosenbaum/bugfix/makey-localization
Localize Makey Makey extension blocks
2019-01-28 10:38:57 -05:00
Karishma Chadha
94fa3d56c8 Fix saving and loading of slider min max values. Add test for sb2 to sb3 conversion that tests all montior properties remain the same after save and load. 2019-01-25 14:14:46 -05:00
yokobond
8eee92d41a Escape variable name in XML 2019-01-25 10:31:33 +09:00
Michael "Z" Goddard
08c939f522
add simple loading time benchmark detail 2019-01-24 17:48:17 -05:00
Michael "Z" Goddard
d8ae96a58c
build playground/benchmark.js 2019-01-24 17:48:17 -05:00
Eric Rosenbaum
92d2a1673a Updating blocks 2019-01-24 17:01:46 -05:00
Karishma Chadha
0bf5d8ab90 Update VM getPlaygroundData function to remove circular dependency in blockContainer. It wasn't being used by the tests or the playground and it is not an issue with actual project serialization. Update test to stop passing in runtime to blocklyListen function. 2019-01-24 15:26:16 -05:00
Erik Mejer Hansen
c750957465 Convert lint breakage 2019-01-24 13:21:46 +01:00
Karishma Chadha
e5723e299a Add runtime to blocks container since it was getting passed in everywhere where it was being referenced. Update calls to blocks constructor. 2019-01-23 18:18:38 -05:00
Eric Rosenbaum
09daeb53a1 Don’t use a variable in formatMessage 2019-01-23 17:56:38 -05:00
greenkeeper[bot]
5f32cc76e0 chore(package): update lockfile package-lock.json 2019-01-23 21:16:51 +00:00
greenkeeper[bot]
089f892316 fix(package): update @vernier/godirect to version 1.4.1
Closes #1915
2019-01-23 21:16:48 +00:00
Eric Rosenbaum
9e00c06ddf Localize the makey makey blocks 2019-01-23 14:05:00 -05:00
Karishma Chadha
98b92be2d7
Merge pull request #1928 from kchadha/timer-perf
Improve the performance of the timer utilitiy
2019-01-23 11:41:41 -05:00
Karishma Chadha
7588f08f3b
Use sequencer runtime directly instead of doing an extra lookup 2019-01-23 11:33:36 -05:00
Erik Mejer Hansen
ceaa3c7857 Add support extensions to define custom field types.
This is done by adding a new element "customFieldTypes" to the extension info structure. Ex:
```
customFieldTypes: {
   angleField: {
      implementation: { fromJson: options => new AngleField(options) },
      output: 'number',
      outputShape: 2,
   }
}
```
Field types are defined by an implementation that has to match what is expected by ScratchBlocks.Field.register and its output and shape.

src/engine/runtime.js has been updated to handle the new "customFieldTypes"-field:
- Existing (global) field types cannot be overridden
- New fields are "namespaced" to the extension in the same way as opcodes are.

Once the custom field type has been picked up by scratch-vm a "EXTENSION_FIELD_ADDED" event is emitted.
It is then up to the hosting app to call ScratchBlocks.Field.register to register the field type with ScratchBlocks. Ex:
```
vm.addListener('EXTENSION_FIELD_ADDED', fieldInfo => {
   this.ScratchBlocks.Field.register(fieldInfo.name, fieldInfo.implementation);
});
```
2019-01-20 21:24:32 +01:00
Eric Rosenbaum
9d4442444f
Merge pull request #1914 from bocoup/sensor-error
Prevent console errors when disconnecting/reconnect to Vernier extension
2019-01-18 17:09:38 -05:00
Eric Rosenbaum
0b251adace
Merge pull request #1763 from evhan55/extensions/disconnect-errors
Various fixes to extension disconnect errors
2019-01-18 16:58:45 -05:00
Evelyn Eastmond
4b9488cf66 Restoring package-lock.json 2019-01-16 20:38:45 -05:00