Evelyn Eastmond
96327c66f3
Passing custom alert messages with PERIPHERAL_ERROR.
2018-09-22 14:04:37 -04:00
Ray Schamp
e2c6c7667b
Merge pull request #1604 from ericrosenbaum/feature/listening-indicator
...
Add event to show and hide a mic indicator for Speech to Text
2018-09-21 09:24:59 -04:00
Eric Rosenbaum
e2a79ed58f
VM emits MIC_LISTENING
2018-09-20 17:13:51 -04:00
Ray Schamp
6c94c85c9a
Add API for the attached renderer
...
Resolves #1281
2018-09-18 15:47:47 -04:00
Evelyn Eastmond
ec432e3b2f
Refactor for hardware extensions ( #1555 )
...
* Beginning refactor: renaming 'device' to 'peripheral', shortening function names, reordering functions, etc.
* Continuing refactoring: renaming some functions to be more verbose in the runtime, adding JSDocs, etc.
* Changing 'device' to 'peripheral', etc.
* Changing 'session' to 'socket'.
* Fixing EV3 menus and menu arg validation, reordering functions, etc.
* Add _send, add some references to documentation, etc.
* Factored out _outputCommand and _inputCommand, renamed some enums, etc.
* Fixed _outputCommand, some other minor cleanup.
* Make _outputCommand and _inputCommand public.
* Added TODO.
* Renamed BLE UUID enums to be clearer.
* Change WeDo2 in comments to WeDo 2.0, etc.
* Changed some WeDo2Motor command names, cleaned up some JSDocs.
* Beginning a major EV3 refactor.
* WeDo2 formatting and comment changes.
* Motor refactoring in EV3: motorTurnClockwise and motorTurnCounterClockwise initial working state.
* Add reminders to possibly cast motor menu args in WeDo2.
* Continue to move motor commands in EV3 to EV3Motor class, don't create new EV3Motor on every poll cycle, etc.
* Factoring EV3 polling value commands, etc.
* Fixing EV3 motor power, position and button pressed, and some commenting, etc.
* Move EV3 motor position parsing to EV3Motor class, move directCommand and directCompoundCommand functions, some commenting, etc.
* Changed WeDo2 motor label enum name.
* Removed some EV3 motor functions that aren't needed, changed menu label enum names, moved some opcodes up to enums.
* Fixing comments and documentation.
* Some commenting.
* Adding further documentation and references to PDFs, changed reply check to be safer, etc.
* Some comment changes.
* Moving some functions around in EV3 and WeDo2 to match.
* Commenting, etc.
* Some renaming of session, etc.
* Fix stopAllMotors in EV3.
* Fixing clearing of motors in EV3.
* Some comment changes.
* Change runtime .extensions/registerExtension to .peripheralExtensions/registerPeripheralExtension.
* Renaming outputCommand/inputCommand to generateOutputCommand/generateInputCommand, etc.
* Moved motorCommandIDs to EV3Motor class, renamed directCommand to generateCommand, etc.
* Adding a reminder to rename something.
* JSDoc fix in EV3Motor class.
* Fixing microbit function name.
* Adding a todo item.
* Changing Ev3 menu formats to be backwards compatible, moving a BLE function up.
* Fixing EV3 ports again, and button pressed returning a boolean.
* Fixing menu value to be a string in EV3.
2018-09-07 17:01:23 -04:00
Karishma Chadha
e5ca208a41
Return function to restore a costume when it gets deleted.
2018-08-21 15:33:19 -04:00
Karishma Chadha
24b098257b
Return restore sound function when deleting a sound.
2018-08-17 14:01:24 -04:00
Karishma Chadha
b95350da6e
Fix issue where deleting a sprite with a monitored local variable creates that local variable on all other sprites after switching sprites twice or more.
2018-08-15 14:31:40 -04:00
kchadha
ec41b4a113
Merge pull request #1438 from kchadha/return-add-sprite-function-when-deleting
...
Export the sprite and return an add function when deleting the sprite.
2018-08-09 15:25:45 -04:00
Karishma Chadha
a1f03f58e1
Add integration test for deleting and restoring a sprite, and restoreFunciton should return a promise.
2018-08-09 11:53:37 -04:00
Karishma Chadha
5ef246a2b0
Export the sprite and return an add function when deleting the sprite.
2018-08-08 18:29:54 -04:00
Ray Schamp
4b5cf6505a
Merge pull request #1398 from paulkaplan/publish-docs
...
Publish jsdoc to gh-pages
2018-08-08 16:46:48 -04:00
Paul Kaplan
79ab2fcb72
Add turbo mode events
2018-08-02 10:00:21 -04:00
Paul Kaplan
138d7136af
Fix various jsdoc issues preventing the docs from building
2018-07-31 11:22:42 -04:00
Paul Kaplan
8540c139dc
Add an extra param for adding sounds and costumes to specific targets
2018-07-31 09:47:48 -04:00
chrisgarrity
d4f20522b8
Merge pull request #1367 from chrisgarrity/issue/gui2530-blockwidth-locale
...
Add function to return the current VM/blocks locale
2018-07-18 10:57:24 -04:00
chrisgarrity
4ba7e9373f
Add function to return the current VM/blocks locale
2018-07-18 09:52:55 -04:00
Evelyn Eastmond
c4ee7065a2
EV3/Microbit critical fixes for code freeze ( #1354 )
...
* Resolves - BLESession and BTSession should emit PERIPHERAL_SCAN_TIMEOUT #1348 .
* Resolves - BLESession should handle 'could not find service' error #1350 .
* Resolves - BTSession should handle 'no peripheral connected' error #1351 .
* Fixing a typo that caused device scan timeout bugs.
* Resolves - Add casting and clamping throughout the EV3 extension #1352 .
* Fixing a linting error.
* Further fixes for issue #1351 .
2018-07-17 16:03:05 -04:00
Karishma Chadha
2b2fc2e561
Code cleanup, refactor, abstraction
2018-07-13 12:58:45 -04:00
Karishma Chadha
13df3e7bd6
Add unit tests and fix object shallow vs. deep copying bug.
2018-07-13 09:36:43 -04:00
Karishma Chadha
406e59fc18
Fix variable conflicts that arise when sharing the love of a sprite-local variable with the stage.
2018-07-13 09:36:43 -04:00
DD Liu
004f38190a
Merge branch 'develop' into loadCostume
2018-07-12 15:16:17 -04:00
chrisgarrity
849412ba82
Switch setLocale to return a promise
...
Convert refreshBlocks to a function returning a promise, and return that from setLocale. Now GUI can ensure that refreshing the toolbox and workspace only happens after all the blocks have refreshed.
2018-07-11 08:35:22 -04:00
DD Liu
704be2d83f
fix comment
2018-07-10 10:39:47 -04:00
DD Liu
6aefd13af6
Break load costume into more functions, and update how bitmaps are loaded
2018-07-10 10:30:38 -04:00
Eric Rosenbaum
6f5ff31eb3
Add disconnectExtensionSession and getPeripheralIsConnected
2018-07-09 13:49:41 -04:00
Evelyn Eastmond
9d66c54f8a
Adding error reporting to runtime from BLESession.
2018-07-09 13:41:57 -04:00
Eric Rosenbaum
d778ddf00e
wip
2018-07-09 13:41:57 -04:00
Karishma Chadha
a0a11f2f19
Add 'islocal' flag to XML serialization for variables.
2018-07-06 13:02:23 -04:00
kchadha
d187517d85
Merge pull request #1256 from kchadha/sprite-save-load
...
Sprite save load
2018-06-25 11:21:01 -04:00
Karishma Chadha
55a5592ab6
Add optional type param to export sprite API.
2018-06-25 09:23:04 -04:00
Corey Frang
4431b43e45
A few leftover loadSound that werent updated
2018-06-22 09:45:23 -04:00
Michael "Z" Goddard
c268bbae47
add decoded SoundPlayer's to a Sprite's SoundBank ( #1260 )
2018-06-21 17:23:33 -04:00
Karishma Chadha
b75a779540
Call fixUpVariableReferences in installTargets, before emitting the workspace update.
2018-06-20 12:12:33 -04:00
Karishma Chadha
86a8d93eb6
Sprite3 Export/Import.
2018-06-19 08:51:16 -04:00
Paul Kaplan
1dcd174dea
Add shareSound and shareCostume APIs with unit tests to the VM
2018-06-18 10:39:22 -04:00
Paul Kaplan
4b64df222a
Hoist target list assignment to simplify code.
2018-06-13 10:09:22 -04:00
Paul Kaplan
0ec0ea6ef7
Add reorderTarget API to VM
2018-06-13 09:20:22 -04:00
Paul Kaplan
0cd50fbb2c
Propagate the return value of reorder functions, update comments
2018-06-06 11:13:30 -04:00
Paul Kaplan
e6ebc33e9e
Add sound and costume reordering methods and tests to top-level API
2018-06-06 09:43:54 -04:00
Paul Kaplan
a11d1be3fc
Fix comments
2018-06-05 16:08:14 -04:00
Paul Kaplan
3a697ae0ac
Add top-level API for getting and setting variable values
2018-06-05 10:46:06 -04:00
Karishma Chadha
537dc9bcd5
Addressing PR comments.
2018-05-31 16:33:42 -04:00
Karishma Chadha
1401d54add
Parse SB2 comments and attach block comments to the blocks they belong to. Send comment xml on workspace update so they can be rendered.
2018-05-30 21:15:14 -04:00
DD Liu
5c003641f9
Merge pull request #1126 from fsih/fixQuirksOnLoadCostume
...
Run quirks mode fixes on costumes loaded from sb2s
2018-05-10 13:42:48 -04:00
DD
589dd7d5e0
Attach the svg renderer instead of providing it in order to fix VM tests
2018-05-10 12:03:38 -04:00
Paul Kaplan
36a01cf0cb
Fix clearing monitor state
2018-05-09 12:06:24 -04:00
kchadha
16c6868779
Merge pull request #1110 from kchadha/sprite-upload
...
Support for Sprite Upload
2018-05-04 14:56:31 -04:00
Karishma Chadha
3db2083294
Address PR comment.
2018-05-04 14:48:29 -04:00
Karishma Chadha
8cdc9dc2cd
Updating vector should make bitmap resolution 1.
2018-05-04 14:39:20 -04:00
Karishma Chadha
0156dd139d
Do not delete bitmap resolution property when vector is edited because there are other things that still rely on it.
2018-05-04 13:37:07 -04:00
Karishma Chadha
9b1aa7d7c7
Move comments
2018-05-04 11:00:45 -04:00
Karishma Chadha
55352e88b1
Tests and cleanup of addSprite3 so that .sprite3 format does not need to be nested inside an extra {targets: ...}
2018-05-04 11:00:45 -04:00
Karishma Chadha
adf7571851
Add API to generically validate and add sprite based on validation results.
2018-05-04 11:00:45 -04:00
DD Liu
5e6873628e
Merge pull request #1082 from fsih/updateBitmap
...
Add updateBitmap function. getCostume can now serve bitmaps as well as svgs
2018-05-01 17:05:34 -04:00
Mx Corey Frang
dbdee0ca8b
Fix downloadProjectId method ( #1093 )
...
* Fix downloadProjectId method
* use .data not .data.buffer
2018-05-01 08:56:22 -04:00
Andrew Sliwinski
326d1c491a
Merge pull request #1086 from mortendybdal/feature/add-sprite-3
...
Included a function to add sprite 3 to vm
2018-05-01 08:38:08 -04:00
Morten Dybdal
41be65ba4d
Fixing js linting issues
2018-05-01 13:23:21 +02:00
DD
bd772e5f77
Remove bitmap resolution from svgs
2018-04-30 19:58:48 -04:00
DD
78cd327237
Move the place where we divide rotation center by resolution into the VM. Also revert the method of putting data into storage to the one that was convoluted but working
2018-04-30 16:35:24 -04:00
kchadha
8e65b3d80f
Merge pull request #1092 from kchadha/refactor-video-io
...
Refactor Video IO
2018-04-30 09:27:10 -04:00
DD
9f0f2fcd27
Pass a data uri
2018-04-27 17:23:30 -04:00
DD
b2aa87da77
fix lint
2018-04-26 18:43:49 -04:00
DD
009253a8d1
Code review
2018-04-26 18:34:35 -04:00
DD
3a3d807cba
switch polyfill to one that doesn't break tests
2018-04-26 15:14:51 -04:00
DD
c73b06a254
add polyfill
2018-04-26 15:14:51 -04:00
DD
f1e70c430f
updateBitmap
2018-04-26 15:14:51 -04:00
DD
fc36ea5208
Rename getCostumeSvg to getCostume
2018-04-26 13:36:51 -04:00
Karishma Chadha
5f4139cbe4
Use video provider instead of making call to getUserMedia directly.
2018-04-26 13:24:31 -04:00
Morten Dybdal
d033271a1f
Included a function to add sprite 3 to vm
2018-04-26 10:59:53 +02:00
Karishma Chadha
dfa3408add
Update sound dataFormat after editing
2018-04-20 14:13:57 -04:00
kchadha
8739a524eb
Merge pull request #1031 from kchadha/block_serialization_compression
...
Block serialization compression
2018-04-11 19:17:42 -04:00
Paul Kaplan
f23b5a9625
Merge pull request #1041 from paulkaplan/fix-clone-drag
...
Only select the original target after a drag.
2018-04-11 10:04:25 -04:00
Paul Kaplan
64c2d1f7b1
Merge pull request #1038 from paulkaplan/skin-size
...
Attach the costume size to the costume when loaded and modified
2018-04-11 09:30:02 -04:00
Paul Kaplan
4a9adcc3d9
Make stopDrag deal with bare targets and add tests
2018-04-11 09:12:43 -04:00
Chris Willis-Ford
631d7fb4de
Merge pull request #1021 from cwillisf/features-for-control-extension
...
Features for control extension
2018-04-10 12:17:43 -07:00
Paul Kaplan
da539ea6cd
Only select the original target after a drag.
...
This allows you to still drag clones around, but when you stop dragging,
the original sprite gets selected.
2018-04-10 14:31:49 -04:00
Paul Kaplan
89eb1ce39b
Set the costume asset size when a costume is loaded or modified.
2018-04-10 09:51:29 -04:00
Karishma Chadha
e92db8fa1e
Don't really need level 9 compression.
2018-04-06 15:47:24 -04:00
Karishma Chadha
334058b081
Block and variable compression. No need to serialize uid of block and shadow if they are the same, reduce duplication of information.
2018-04-06 11:33:44 -04:00
Christopher Willis-Ford
3be16eddb1
Add code to load 'core' extensions
2018-04-05 12:20:03 -07:00
Karishma Chadha
b8e67a7727
Hookup sb2 import code to deserialize assets from local sb2 file.
2018-03-25 18:14:30 -04:00
kchadha
dbc7b9597f
Merge pull request #979 from kchadha/serialization-cleanup
...
SB3 Serialization & Load Project
2018-03-23 10:11:49 -04:00
Karishma Chadha
c4ad76eef1
Turns out ArrayBuffers are not views of themselves.
2018-03-22 16:19:36 -04:00
Karishma Chadha
3a4f620318
Check if loadProject input is any typed array using ArrayBuffer.isView. This allows us to pass a project's asset.data (from storage) directly instead of calling toString on it first.
2018-03-22 14:04:58 -04:00
Karishma Chadha
2c3e3472ed
Add warning to 'fromJSON' function since it is now just a wrapper around loadProject. Change vm sb3_serialization test to use 'loadProject' function instead of 'fromJSON'.
2018-03-21 17:55:02 -04:00
Karishma Chadha
ce6ef92eb5
Clear runtime after validation success instead of before.
2018-03-21 17:46:39 -04:00
Paul Kaplan
140094a7ad
Make "when clicked" blocks target dependent.
...
This involves adding a new opcode, event_whenstageclicked, and adding a
method to the blocks container to update the opcode pair depending on
whether the target is the stage. This method is then called in two
places: first after the sb2 import parses the blocks (not done in the
sb2 parsing itself because no other blocks are target specific) and then
again when blocks are shared between targets.
Also added tests for the block container method, and a fixture project
that tests the opcode splitting on sb2 import.
2018-03-20 10:41:50 -04:00
Karishma Chadha
003ed01015
Update VM to use scratch-parser callback interface
2018-03-15 22:40:40 -04:00
kchadha
0d55e4c74f
Modifying apis to accomodate existing tests.
2018-03-14 22:52:00 -04:00
kchadha
22be2b15f3
Major refactor of project loading. Removed loadProjectLocal, in favor of going back to single API (loadProject). loadProject uses scratch-parser to unpack and validate project. Scratch-parser is getting updated to return validated project, with appended project metadata, and unpacked zip (JSZip object) if provided a buffer.
2018-03-14 22:52:00 -04:00
kchadha
d59a4ffd55
VM receives input buffer representing project to load and unpacks it as zip. This functionality will eventually move to storage.
2018-03-08 10:25:58 -05:00
Karishma Chadha
d6e248aab8
VM should do the heavy lifting of saving project to a zip file, and return a promise of the zip to gui.
2018-03-05 17:20:36 -05:00
Karishma Chadha
c0afcd2ab3
Ensure that md5 and assetId stay in sync.
2018-03-05 15:16:06 -05:00
Karishma Chadha
e0b23cde31
Can load saved sb3 files (including sounds and costumes that were modified in the 3.0 editors and saved in the sb3 zip when the project was saved). Tests still need to be fixed.
2018-03-05 15:16:06 -05:00
Karishma Chadha
089df0a50f
Sounds get updated in storage and vm runtime when they are updated in the sound editor. The updateSvg function ensures that the costume that was edited has an updated dataFormat property in the vm runtime. This is specifically for when pngs get edited in the vector editor. Their file format should then get updated to svg.
2018-03-05 15:16:06 -05:00
Karishma Chadha
525a8c2ce7
Serializing sounds and costumes into file descriptors upon 'saveProjectSb3'.
2018-03-05 15:16:06 -05:00
kchadha
a0c7d9aeb3
Merge pull request #956 from kchadha/validate-sb2
...
Validate sb2
2018-03-02 10:28:53 -05:00
DD
b885402081
Merge branch 'develop' into privateSprite
2018-03-01 17:27:10 -05:00
Karishma Chadha
d9fb315e3b
Removing log messages.
2018-02-28 17:10:54 -05:00