Commit graph

117 commits

Author SHA1 Message Date
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
Paul Kaplan
34dfbb50ba Update naming and implementation for custom procedure blocks 2017-11-16 14:17:08 -05:00
Paul Kaplan
1e27d21b15
Merge pull request #782 from kchadha/list-typed-variable
List typed variable
2017-11-15 12:48:56 -05:00
Karishma Chadha
fe86e38210 Addressing PR review comments. 2017-11-15 09:17:20 -05:00
Karishma Chadha
386045f033 Some code cleanup. 2017-11-13 16:55:57 -05:00
Karishma Chadha
038a65b460 Finishing up lists. 2017-11-13 14:24:30 -05:00
Karishma Chadha
70959cc7f5 First cut at turning lists into typed variables 2017-11-09 17:19:34 -05:00
Eric Rosenbaum
533ed60d98 Update sb2 specmap with music extension blocks 2017-11-07 11:27:50 -05:00
Chris Willis-Ford
ef961c5a4b
Merge pull request #756 from cwillisf/autoload-extensions
Autoload extensions
2017-11-03 13:59:01 -07:00
Christopher Willis-Ford
0ad03f8d70 Actually finish SB2 specMap for WeDo 2.0
Apparently I took a break at the wrong time and forgot to come back to
this... :/
2017-11-03 13:48:05 -07:00
Christopher Willis-Ford
c88a8fa55a Fix tests & a typo 2017-11-03 11:42:20 -07:00
Christopher Willis-Ford
0af3de9bf0 Load extensions when loading a project or sprite
- Accumulate extension info while deserializing JSON
- Install extensions (if any) before installing target(s)
- Merged 'install' steps of the "add sprite" and "load project" paths
2017-11-03 11:20:24 -07:00
Paul Kaplan
e2ac6947af
Merge pull request #753 from paulkaplan/provide-argument-ids
Provide argument id list with callers and procdef blocks
2017-11-03 09:48:37 -04:00
Paul Kaplan
007fe2ed53 Fix linting 2017-11-02 17:14:00 -04:00
Paul Kaplan
5b9d4ae23e Provide argument id list with callers and procdef blocks 2017-11-02 17:03:12 -04:00
Paul Kaplan
082e051cce Support legacy pen block op codes 2017-11-01 11:30:15 -04:00
Chris Willis-Ford
7051ccfd69 Merge pull request #687 from cwillisf/builtin-extensions
Builtin extensions
2017-10-13 09:48:56 -07:00
Paul Kaplan
b0870518a4 Changing parsing of custom procedures for new style 2017-10-06 16:26:19 -04:00
Christopher Willis-Ford
b6727a766f Fix pen tests 2017-10-04 16:07:50 -07:00
Paul Kaplan
0f04c99e67 Merge pull request #676 from paulkaplan/duplicate
Add sprite duplication method
2017-09-13 11:57:13 -04:00
Paul Kaplan
81370f7625 Refactor method exports to fix linting and CWF comment 2017-09-11 10:11:48 -04:00
Ray Schamp
5113876588 Pass with --fix 2017-08-26 13:24:10 -04:00
neurosie
86e2b2338e Fix variable deserializing 2017-08-08 16:00:31 -04:00
Paul Kaplan
bd3a29650b Fix variable import scoping 2017-07-17 12:28:44 -04:00
Paul Kaplan
b0fb4f0b55 Merge pull request #614 from marisaleung/develop_cherry-picks
Updated variables and var_fire event listener.
2017-06-23 13:05:03 -04:00
marisaleung
875ccf5b88 Updated variables and var_fire event listener. 2017-06-23 09:57:01 -07:00
Paul Kaplan
93bac9ad85 Merge pull request #608 from paulkaplan/unshadow-variable-dropdown
Use variable field instead of input shadow
2017-06-15 10:02:08 -04:00
Paul Kaplan
5df4456c4a Use variable field directly 2017-06-14 16:31:29 -04:00
Christopher Willis-Ford
884ba19aab Add support for older SB3 JSON
If the `dataFormat` field is absent, fall back on the older `assetType`
field. That can at least help us tell if something is a vector or bitmap
image, though it doesn't tell us which kind of bitmap.
2017-06-13 14:56:06 -07:00
Ray Schamp
ecf535f4c3 Merge pull request #579 from cwillisf/load-jpeg-backdrops
Specify dataFormat when loading asset for import
2017-06-02 09:06:37 -04:00
Ray Schamp
b810b7be0a Merge pull request #583 from rschamp/bugfix/save-clones-bad
Don't serialize clones when saving
2017-05-30 10:24:52 -04:00
Christopher Willis-Ford
eb931fd99b Specify dataFormat when loading asset for import
When importing a project we know the file extension for each asset to be
loaded. This change provides that information to the storage system so
that we can load assets which don't use the default. For example, this
allows loading JPG-format backdrops.

In support of this change, there's a new function on `StringUtil` called
`splitFirst`, which splits a string on the first instance of a separator
character. This change includes unit tests for this new function.
2017-05-24 15:35:10 -07:00
TheBrokenRail
5b81c8b087 Update sb2_specmap.js 2017-05-21 12:26:16 -04:00
Ray Schamp
cf188bc5e4 Don't serialize clones when saving 2017-05-18 02:07:35 +09:00
Ray Schamp
efe31f4825 Fix costume deserialization 2017-05-04 12:41:54 -04:00
Ray Schamp
f785117e1d Lint and fix failing tests 2017-04-27 17:49:57 -04:00
Ray Schamp
c9ce6776aa Get SB3 imports working
For now, store the md5 + extension on costumes in the VM. This way we can load them the same way as we load SB2 assets.
2017-04-27 17:08:06 -04:00
Ray Schamp
2a4af8a9ca Fix up most linting/merge errors 2017-04-26 16:50:53 -04:00
Ray Schamp
a4cdb027ab Merge branch 'develop' of github.com:morantsur/scratch-vm into feature/serialization
# Conflicts:
#	src/playground/index.html
#	src/serialization/sb2.js
#	src/sprites/rendered-target.js
#	src/virtual-machine.js
#	test/unit/serialization_sb2.js
2017-04-26 11:44:53 -04:00
Moran
d8e1d42bf2 Merge branch 'develop' of https://github.com/LLK/scratch-vm into develop 2017-03-03 15:23:43 -05:00
morant
19275799df Load md5 information from sounds 2017-02-09 10:44:28 -05:00
morant
ed978e3062 Read sprite costume names from JSON, and write currentCostume to JSON 2017-02-07 20:12:55 -05:00
morant
6b545ea16d Update isStage for each sprite when loading JSON, removing things copied from SB2 which are not relevant. 2017-02-07 18:38:44 -05:00
morant
0dc1883e9f Write costumes and sounds to JSON on save 2017-02-07 18:15:11 -05:00
morant
e16f2924a3 Merge branch 'develop' of https://github.com/LLK/scratch-vm into develop 2017-02-07 09:53:17 -05:00
morant
c6c1a63ff0 Merge branch 'feature/194' of https://github.com/morantsur/scratch-vm into develop
+ Solve code conflicts, and handle deserialization of 3.0 projects.

# Conflicts:
#	src/index.js
#	test/unit/serialization_sb2.js
2017-01-27 20:05:54 -05:00
Andrew Sliwinski
6d83931341 WIP clean-up 2016-12-30 10:19:58 -05:00