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
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
6c0d257a63
Deserialize tempo, volume, and video related state.
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
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
Karishma Chadha
b4f6f24926
Fix up tests.
2018-03-16 11:43:27 -04: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
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
70959cc7f5
First cut at turning lists into typed variables
2017-11-09 17:19:34 -05: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
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
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
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
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
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
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
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