Commit graph

3438 commits

Author SHA1 Message Date
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
Kevin Andersen
2aaf424279 stuff 2019-01-24 10:08:17 +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
Kevin Andersen
ffb5cd63af added zero-block for motor positioning. Added turn-for-rotation-block, but its WIP. Modified generateOutputCommand to allow for advanced motor commands. Changed motor position reporter to follow hardware instead of wrap-clamping. 2019-01-23 09:10:03 +01:00
Kevin Andersen
7cee07db83 Changed default motor to A instead of all. Added TODOs and DEBUG code comments. Changed output-commands to use proper enums 2019-01-21 08:01:10 +01: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
Evelyn Eastmond
7831256044 Change event names to be more descriptive. Fix some typos. 2019-01-16 20:17:19 -05:00
Evelyn Eastmond
6f9a4864e9 Fix typo. 2019-01-16 19:59:51 -05:00
Evelyn Eastmond
802f752ded Prevent setting onCharactericChanged callback to null. 2019-01-16 19:50:32 -05:00
Evelyn Eastmond
6e290ea937 Calling microbit timeout error in an arrow function. 2019-01-16 16:23:06 -05:00
Evelyn Eastmond
e1e8e57403 Adding TODOs. 2019-01-16 16:08:15 -05:00
Evelyn Eastmond
5c885911e7 Replacing a timeout clear. 2019-01-16 16:06:44 -05:00
Evelyn Eastmond
28a54d6e83 Adding back in the disconnect branch to be fixed later in another PR. 2019-01-16 16:05:13 -05:00
Evelyn Eastmond
2761209631 Changing JSDoc slightly, again. 2019-01-16 16:00:25 -05:00
Evelyn Eastmond
c30807a678 Finetuning a JSDOC. 2019-01-16 15:56:58 -05:00
Evelyn Eastmond
7ec9494804 Making corrections based on discussion with ericr. 2019-01-16 15:54:38 -05:00
Evelyn Eastmond
bd8f129022 Adding a TODO for an optional read param. 2019-01-16 15:22:58 -05:00
Evelyn Eastmond
e4b82aeaef Adding callback back to battery read to fix clearing the characteristicChanged callback by accident. 2019-01-16 15:22:58 -05:00
Evelyn Eastmond
d7b6cfae97 Move micro:bit data stopped error string to constant. Added another jsdoc. 2019-01-16 15:22:58 -05:00