Karishma Chadha
86a8d93eb6
Sprite3 Export/Import.
2018-06-19 08:51:16 -04:00
Connor Hudson
aa16930e34
Add initial implementation of extension serialization/deserialization
2018-06-18 15:00:33 -04:00
Karishma Chadha
f3d49f75c8
Clean up comment serialization, add tests for new and old serialization (old is still valid, just more verbose).
2018-06-15 14:57:49 -04:00
Karishma Chadha
e2eadbf603
Comment save and load.
2018-06-14 14:11:20 -04:00
Florrie
24c6338302
Map costumeName -> costumenumbername [name]
...
...instead of mapping to a new obsolete/hidden block 'costumename'.
Thanks to @kchadha for helping with this!
2018-06-12 19:27:36 -03:00
Florrie
404834018b
Implement costume name block
2018-06-09 21:34:21 -03:00
Karishma Chadha
537dc9bcd5
Addressing PR comments.
2018-05-31 16:33:42 -04:00
Karishma Chadha
f079eb4bbd
Don't serialize x and y for sb2 comments so that they can be auto positioned.
2018-05-30 21:18:45 -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
kchadha
a85f641d25
Merge pull request #1148 from kchadha/stage-layering
...
Layer group ordering.
2018-05-25 09:10:05 -04:00
DD Liu
10aa6979ed
Multiply by bitmap resolution
2018-05-23 14:18:22 -04:00
DD Liu
85689201ed
Always give backdrops a certain rotation center
2018-05-23 14:06:23 -04:00
Karishma Chadha
64c8484066
Refactor so that layer group is optionally passed into createClone (and initDrawable) instead of isStage property getting stored on a sprite.
2018-05-18 10:11:59 -04:00
Karishma Chadha
67b114b9c9
Layer group ordering.
2018-05-15 22:22:44 -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
aae1e083bc
Switched textEncoder to costumeAsset.encodeTextData, and pass in version as an argument instead of in costume
2018-05-09 15:48:49 -04:00
Paul Kaplan
f01558b74e
Address comments from @kchada review
2018-05-09 11:08:49 -04:00
Paul Kaplan
26cfbfe588
Fix stage checking
2018-05-08 17:15:54 -04:00
Paul Kaplan
4713f47fb7
Import monitors from sb2 files.
...
Paired with @kchadha on all of this.
2018-05-08 17:06:19 -04:00
DD
296af1a079
Run quirks mode fixes on costumes loaded from sb2s
2018-05-08 12:03:34 -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
kchadha
54ee628b27
Merge pull request #1099 from towerofnix/scrollcompat-vm
...
"Implement" scroll blocks
2018-05-01 15:52:42 -04:00
kchadha
2b6f96ae0a
Merge pull request #1096 from towerofnix/warpspeed-vm
...
Implement "all at once" block
2018-05-01 15:43:37 -04:00
kchadha
3161831890
Merge pull request #1102 from towerofnix/misc-noop-vm
...
"Implement" miscellaneous no-op obsolete blocks
2018-05-01 15:42:53 -04:00
Florrie
8c2d023925
Implement set/change stretch blocks
2018-04-30 21:29:34 -03:00
Florrie
231402fc53
Implement 'hide all sprites' and 'user id' blocks
2018-04-30 21:03:35 -03:00
Florrie
8e271c70d0
Implementation + tests for loud? block
2018-04-30 19:50:13 -03:00
Florrie
62b8dd93af
Spec maps for scroll blocks + "implementations"
2018-04-30 17:45:35 -03:00
Florrie
b6cb198144
Implement all-at-once block
2018-04-30 12:18:38 -03:00
Andrew Sliwinski
192084e0e7
Do not load extension if prefix is undefined
2018-04-20 11:36:16 -04:00
Andrew Sliwinski
fd97892eb1
Remove console log
2018-04-20 10:58:35 -04:00
Andrew Sliwinski
57b7e9916d
Resolve issue with SB2 import
2018-04-20 10:58:03 -04:00
Andrew Sliwinski
645a42b843
Address feedback from review
2018-04-20 10:49:06 -04:00
Andrew Sliwinski
9ec3d41ea1
Clarify 'core' list for SB2 import
2018-04-20 10:34:17 -04:00
Andrew Sliwinski
f86cad3305
Replace extension delimeter with '_'
2018-04-20 07:54:02 -04:00
Karishma Chadha
dca9270730
Use sound returned from audio engine to set sample rate and sample count since the sound gets resampled by the audio engine. Also, check for an mp3 format in deserialize assets, and otherwise default to wav.
2018-04-13 11:20:16 -04:00
Andrew Sliwinski
3ac2922a07
Merge pull request #1028 from mzgoddard/motion-detect-4
...
Motion detect 4
2018-04-13 08:16:34 -04:00
kchadha
8739a524eb
Merge pull request #1031 from kchadha/block_serialization_compression
...
Block serialization compression
2018-04-11 19:17:42 -04:00
kchadha
7311b103fa
Merge pull request #1045 from kchadha/broadcast-message-shadow-fix
...
Fix import of broadcast block empty string obscured shadow import
2018-04-11 18:13:20 -04:00
Michael "Z" Goddard
8ebd659094
Use string enumerated values for videoSensing sensor block
2018-04-11 10:30:58 -04:00
Karishma Chadha
6f3c84bf77
Ensure we are serializing file extensions for costumes and sounds as lower case.
2018-04-10 17:01:31 -04:00
Karishma Chadha
585a46f334
Add one last pass to block serialization to remove orphan primitive shadow blocks.
2018-04-10 16:55:27 -04:00
Karishma Chadha
0df937f5c0
Adding a bit more clarification to comment.
2018-04-10 16:53:07 -04:00
Karishma Chadha
18c1a20eaa
Remove unnecessary comments.
2018-04-10 15:44:32 -04:00
Karishma Chadha
a4d9ff9266
Fix issue with importing broadcast block with obscured empty string shadow.
2018-04-10 15:16:18 -04:00
Michael "Z" Goddard
d4037808a7
Add VideoState enum to Scratch3VideoSensingBlocks
2018-04-10 14:34:27 -04:00
Corey Frang
e20723994f
fix sb2 conversion to load into correct VIDEO_STATE
2018-04-10 13:59:22 -04:00
Corey Frang
90166dc732
Add extra control blocks for video transparency and on/off control
2018-04-10 13:59:21 -04:00
kchadha
d177f4cd0c
Merge pull request #1033 from towerofnix/counter-vm
...
Implement counter blocks
2018-04-09 13:55:35 -04:00
kchadha
b794e19c31
Merge pull request #1032 from towerofnix/while-vm
...
Implement "while" block
2018-04-09 13:48:08 -04:00
Florrie
797d16be26
Implement counter blocks
2018-04-07 16:02:49 -03:00
Florrie
27d053acff
Add doWhile -> control_while to specmap
2018-04-07 14:04:00 -03:00
Karishma Chadha
5d46f8de99
Not providing a zip to deserialize asset functions is not an error.
2018-04-06 15:04:03 -04:00
Michael "Z" Goddard
0591b475f2
Merge pull request #1020 from gnarf/sb2-spec-when-video-motion
...
Allow specmap to have methods to branch into multiple sb3 opcodes
2018-04-06 14:28:17 -04:00
Karishma Chadha
8c1e6095cb
Remove code that was temporarily accomodating for the old version of the default project in gui.
2018-04-06 11:33:44 -04:00
Karishma Chadha
4ec25b32b1
Code cleanup and commenting.
2018-04-06 11:33:44 -04:00
Karishma Chadha
2dbcdc2244
The stage should always be called 'Stage'.
2018-04-06 11:33:44 -04:00
Karishma Chadha
6c0d257a63
Deserialize tempo, volume, and video related state.
2018-04-06 11:33:44 -04:00
Karishma Chadha
4dd83cf717
Todo comment for clarity...
2018-04-06 11:33:44 -04:00
Karishma Chadha
118c6f0356
Use bitmap asset type and 'png' for various costume formats.
2018-04-06 11:33:44 -04:00
Karishma Chadha
d61ea23e1e
Deserialize compressed primitives.
2018-04-06 11:33:44 -04:00
Karishma Chadha
21d60604ac
Some block serialization compression -- compress primitives. This is a WIP since we don't deserialize blocks serialized in this way.
2018-04-06 11:33:44 -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
kchadha
4b62a938c4
Merge pull request #1000 from kchadha/deserialize-assets-in-sb2
...
Deserialize sb2 assets while loading local .sb2.
2018-04-06 11:33:00 -04:00
Corey Frang
78199c41a5
Allow specmap to have methods to branch into multiple sb3 opcodes
2018-04-05 15:39:41 -04:00
Eric Rosenbaum
21ae14c499
Merge pull request #1014 from ericrosenbaum/bugfix/video-state
...
Import and store video state
2018-04-04 19:59:14 -04:00
Eric Rosenbaum
5dc8e51c6d
Import and store video state
2018-04-03 16:36:58 -04:00
Michael "Z" Goddard
f3d19dc1a1
Use videoSensing extension for sb2 senseVideoMotion
2018-03-29 19:02:07 -04:00
kchadha
51306e3492
Merge pull request #963 from towerofnix/foreach-vm
...
Implement for-each block
2018-03-28 10:52:14 -04: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
ab863096cd
Remove cruft and fix for..in loops.
2018-03-21 17:42:01 -04:00
Karishma Chadha
9d3a3fd12f
When serializing md5+ext, the name should reflect that. Deserializing translates this name back to what vm and other components currently expect.
2018-03-21 16:51:40 -04:00
Karishma Chadha
24e248d4fb
Removing cruft...
2018-03-21 14:46:21 -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
b4f6f24926
Fix up tests.
2018-03-16 11:43:27 -04:00
Florrie
6517bd0974
Make 'key pressed?' block import correctly
2018-03-16 11:58:25 -03:00
kchadha
a3ed4cad99
Remove todo
2018-03-14 22:52:00 -04:00
kchadha
2c551d1739
Some more cleanup.
2018-03-14 22:51:59 -04:00
kchadha
09c8110923
Always serialize parent and next on a block even if they're null.
2018-03-14 22:51:59 -04:00
kchadha
4f6ece9fa8
Be specific about what we're serializing. Flatten targets first by turning them into JSON strings and re-parsing them, and then only serialize the properties necessary for saving and loading.
2018-03-14 22:51:59 -04:00
Florrie
00b151b9ff
Add doForLoop to sb2 specmap
2018-03-05 17:36:17 -04:00
Karishma Chadha
c0afcd2ab3
Ensure that md5 and assetId stay in sync.
2018-03-05 15:16:06 -05:00
Karishma Chadha
605ce4b16d
Configuring scratch-vm to use changes made to scratch-parser.
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
52c77d9fb0
Updating asset serialization code to get data format from stored asset rather than vm state. Storage seems to be more up to date than vm in the case of editing the blank backdrop, which is stored as a png instead of an 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
Eric Rosenbaum
5d658b5ecb
Merge pull request #953 from ericrosenbaum/bugfix/load-tempo-from-sb2
...
Load tempo from sb2
2018-03-01 13:20:37 -05:00
Eric Rosenbaum
7e5e43fbe1
Load tempo from sb2
2018-02-27 11:48:23 -05:00
Eric Rosenbaum
651d46fff0
Add default values for obscured shadows
2018-02-26 17:28:20 -05:00
Eric Rosenbaum
8b18ff7ae9
make inputOP, arg name and menu name the same
2018-02-26 15:56:37 -05:00
Paul Kaplan
57f3d43f4f
Update specmap for sensing blocks that are now fixed menus.
2018-01-13 13:23:33 -05:00
Paul Kaplan
63be5bc487
Transform sb2 looks reporters to new menu blocks
2018-01-04 10:24:13 -05:00
Paul Kaplan
477ef531ba
Update specmap and sb2 import to add new fields to layering blocks.
2017-12-28 14:53:35 -05:00
Karishma Chadha
720c22db0e
Cleanup/refactoring.
2017-12-21 19:06:11 -05:00
Karishma Chadha
bcbe910643
Translating empty string messages from sb2 into messageN, where N is an integer >= n such that messageN is a fresh name.
2017-12-21 19:06:11 -05:00
Karishma Chadha
154987fbb0
SB2 Import functionality for broadcast blocks with pluggable inputs.
2017-12-21 19:06:11 -05:00
Karishma Chadha
aab4a45622
Minor Refactoring/cleanup.
2017-12-01 11:27:54 -05:00
Karishma Chadha
80da989f01
SB2 Import for Broadcast Blocks (not including the input field functionality for 'broadcast' and 'broadcast and wait
...
'). Currently we also cannot import projects where messages and variables share names.
2017-12-01 10:29:32 -05:00
Paul Kaplan
bbb8904467
Merge pull request #789 from paulkaplan/custom-procedure-update
...
Update naming and implementation for custom procedure blocks
2017-11-16 17:07:03 -05:00