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
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
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
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
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
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
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
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
Evelyn Eastmond
f030afbdc5
Removing extra params from a BLE read in WeDo2.
2019-01-16 15:22:58 -05:00
Evelyn Eastmond
156b1bc21a
Adding new runtime event for intentional peripheral disconnects.
2019-01-16 15:22:58 -05:00
Evelyn Eastmond
7518a9c149
Changing error to be more accurate.
2019-01-16 15:22:58 -05:00
Evelyn Eastmond
2d9531a15c
Removing console logs.
2019-01-16 15:22:58 -05:00
Evelyn Eastmond
fdda1e53e3
Change microbit extension to send BLE socket error on data lost, instead of calling disconnect directly.
2019-01-16 15:22:58 -05:00
Evelyn Eastmond
fab292889f
Adding disconnect callback to BT/BLE error system.
2019-01-16 15:22:58 -05:00
Evelyn Eastmond
a177b4eeb7
Adding interval to check for battery level.
2019-01-16 15:22:58 -05:00
Evelyn Eastmond
ae95df553d
Merge pull request #1924 from evhan55/extensions/vernier-withresponse-fix
...
Removing withResponse flag in GDX-FOR extension write method
2019-01-16 15:14:35 -05:00
Karishma Chadha
0fa5e9181a
Merge pull request #1839 from mzgoddard/fix-missing-no-param
...
fix: initialize stack frame params for all procedures
2019-01-16 14:06:38 -05:00
Karishma Chadha
325372233d
Improve the performance of the timer utilitiy so that it does not garbage collect multiple times per frame.
2019-01-16 10:09:19 -05:00
Eric Rosenbaum
5d329663aa
do not load vernier extension yet
2019-01-15 15:20:05 -05:00
Evelyn Eastmond
a6c05d8f61
Removing withResponse flag since it is not needed and was causing a crash on Windows.
2019-01-15 11:43:08 -05:00
Karishma Chadha
d5c2991a25
Merge pull request #1923 from ktbee/missing-block-early-exit
...
Add early exit for non-existent block
2019-01-15 11:29:40 -05:00
Karishma Chadha
fefb032f17
add comment before using util.initParams
...
Co-Authored-By: mzgoddard <mzgoddard@gmail.com>
2019-01-15 11:24:47 -05:00
Katie Broida
8256b3d5c5
Add early exit for non-existent block
2019-01-15 11:15:23 -05:00
Eric Rosenbaum
b57b6c0a84
Merge pull request #1916 from ericrosenbaum/bugfix/vernier-dont-keep-data
...
Prevent excess event emitting in Vernier extension
2019-01-15 11:07:35 -05:00
Eric Rosenbaum
e414e1b246
Add todo comment about keepValues flag
2019-01-15 10:46:22 -05:00
Eric Rosenbaum
2856b32dd5
Merge branch 'develop' into sensor-error
2019-01-15 10:38:51 -05:00
Eric Rosenbaum
8b2f326469
Merge pull request #1920 from evhan55/extensions/vernier-peripheral-list
...
Properly disconnect BLE socket in GDX-FOR scan/disconnect
2019-01-15 10:31:48 -05:00
Evelyn Eastmond
308bb7095a
Properly disconnect BLE socket.
2019-01-14 20:17:18 -05:00
Eric Rosenbaum
7111513169
Merge pull request #1909 from ericrosenbaum/feature/vernier-block-icon
...
Add Vernier extension block icon
2019-01-14 18:26:12 -05:00
Karishma Chadha
43fd733b15
Merge pull request #1912 from kchadha/executable-targets-fix
...
Populate executable targets when runtime.targets is populated
2019-01-14 14:57:29 -05:00
Eric Rosenbaum
8f0e025261
Use flag to not keep data, and remove listener hack
2019-01-14 14:01:43 -05:00
Karishma Chadha
59a865ef47
Create a new addTarget
function on the runtime which populates the targets list as well as the executable targets list.
2019-01-14 11:48:11 -05:00
Valerie Young
daccdb0a71
Satisfy linter
2019-01-11 16:53:47 -05:00
Valerie Young
f2f4af2590
Don't send disconnect to a closed device
2019-01-11 16:47:42 -05:00
Valerie Young
328e4480f6
Prevent reading non-existing sensors
2019-01-11 16:43:08 -05:00
Karishma Chadha
fbee37e915
Populate executable targets when runtime.targets is populated so that scripts don't run before they are supposed to (e.g. before targets are done getting installed).
2019-01-11 14:52:34 -05:00
Eric Rosenbaum
730ec44e5d
Update block icon
2019-01-11 12:07:16 -05:00
Valerie Young
9e612acb27
Forgotten parens
2019-01-11 11:00:08 -05:00
Valerie Young
92297444a0
Is jumped should call is freefalling
2019-01-10 15:39:46 -05:00
Valerie Young
f669b4bcb7
satisfy linter
2019-01-10 12:19:00 -05:00
Valerie Young
7a1b6d4f60
Remove normal force from acceleration magnitude
2019-01-10 12:19:00 -05:00
Valerie Young
92e1f040c3
Add when jumped and is free falling
2019-01-10 12:19:00 -05:00
Valerie Young
a62f5b9b0e
Add facing blocks
2019-01-10 12:19:00 -05:00
Eric Rosenbaum
522b5e1a8e
Merge pull request #1905 from bocoup/update-blocks
...
Add Vernier's GDX-FOR extension
2019-01-10 11:04:33 -05:00
Valerie Young
ac29927c22
other minor feedback
2019-01-10 10:21:32 -05:00
Valerie Young
477c307304
Remove one copy of constants
2019-01-10 10:11:46 -05:00
Valerie Young
5d4aebf301
Satisfy linter
2019-01-09 18:02:36 -05:00
Valerie Young
ae889304c5
satisfy linter
2019-01-09 17:51:56 -05:00
Valerie Young
d2fec35fd8
Set the period to 10 milliseconds
2019-01-09 17:50:25 -05:00
Valerie Young
338b30a17b
Increase speed of sample
2019-01-09 17:09:08 -05:00
Valerie Young
abf84975bd
Add tilt blocks
2019-01-09 17:08:01 -05:00
Paul Kaplan
c33d6caa2b
Merge pull request #1902 from picklesrus/unknown-monitors
...
Allow projects with unknown monitors to load.
2019-01-09 14:50:25 -05:00
Valerie Young
d3e5c7d928
Remove directions option from hats and use magnitude
2019-01-09 13:55:35 -05:00
Eric Rosenbaum
aebc0d25be
Merge pull request #1903 from ericrosenbaum/bugfix/midi-drum-import
...
Add legacy drum block to specmap
2019-01-08 18:07:43 -05:00
picklesrus
cdec5a1cef
Allow projects with unknown monitors to load.
2019-01-08 15:00:00 -05:00
Eric Rosenbaum
a6421b91f8
Add legacy drum block to specmap
2019-01-08 14:49:34 -05:00
Karishma Chadha
bb8463f14a
Log a warning for currentCostume out of range when incorrect project is being serialized.
2019-01-08 13:26:06 -05:00
Karishma Chadha
c27b624401
When loading a project, clamp the currentCostume number to an appropriate value.
2019-01-08 13:07:46 -05:00
Valerie Young
da608f6f18
degrees/s instead of radians, normalize force
2019-01-08 12:07:39 -05:00
Valerie Young
a0e1b5aa5b
Rename spin speed, make hat blocks work
2019-01-08 11:53:51 -05:00
Valerie Young
be35eb1f70
remove units
2019-01-08 11:15:55 -05:00
Valerie Young
b5decacee2
update name of variable
2019-01-07 18:20:45 -05:00
Valerie Young
5696b76d9a
fix typo
2019-01-07 18:17:20 -05:00
Valerie Young
4d75f7776c
Remove the onClose skeletons
2019-01-07 18:09:23 -05:00
Valerie Young
4529533aa8
Remove accidental double declarations
2019-01-07 17:45:20 -05:00
Karishma Chadha
36fe6378db
Merge pull request #1899 from paulkaplan/less-cloning
...
Do not deep clone before serializing.
2019-01-07 13:36:34 -05:00