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