Commit Graph
391 Commits
Author SHA1 Message Date
Muffin 4c366e0110 Use a fixed modification date when zipping 2024-07-17 14:27:33 -05:00
Muffin d69256aa2d Replace jszip with @turbowarp/jszip 2024-05-19 21:58:36 -05:00
Muffin 216b5b65d2 Add execute.js to unsupported exports 2024-05-09 18:55:20 -05:00
GarboMuffin ec1f7dea0c Add vm.exports.i_will_not_ask_for_help_when_these_break() (#181) 2024-01-28 16:30:48 -06:00
Muffin 03cd07ff11 Replace usage of log.warning with log.warn 2024-01-14 01:57:03 -06:00
GarboMuffin 8297dd4cc9 Add native loading progress tracking (#180) 2024-01-03 00:56:54 -06:00
Muffin 81a0382e0f merge-upstream: initial merge of upstream/develop
installs & compiles but has test errors

aside from expected merge conflicts, notable changes from upstream:
 - removed husky, commitlint, etc.
 - removed semantic-release etc.
2023-12-22 17:25:21 -06:00
Muffin b9e84b7db2 Implement custom font manager 2023-08-16 10:34:06 -05:00
Muffin efa7e9d639 Refactor asset serialization 2023-08-14 11:27:32 -05:00
Muffin a1d2cd108a Modify saveProjectSb3DontZip asset order to match saveProjectSb3 2023-07-31 22:37:16 -05:00
Muffin 2158aef763 Refactor default extension URL handling 2023-07-28 23:27:14 -05:00
Muffin 67afd7e8e3 Add API to export blocks with extension metadata
Will be used to make backpack work properly with custom extensions
2023-07-28 22:59:06 -05:00
Muffin 88b49da0d9 Serialize costumes before sounds
If file saving breaks and we write a truncated file, this order matters.
Sounds tend to be large (so few will be recoverable) and generally
aren't even original, so recovery is often meaningless. Costumes
are much more likely to be original, and they're much smaller
so more will be recovered.
2023-07-25 23:53:31 -05:00
GarboMuffin 9329427fb5 Export the internal copy of JSZip for extensions 2023-07-16 21:02:38 -05:00
GarboMuffin 21915f4565 Export some internal classes for extensions
This is similar to what we do in TW/scratch-render
2023-05-28 22:48:38 -05:00
GarboMuffin c4561c2f1c Support custom buttons in extensions (#137) 2023-05-26 20:52:52 -05:00
GarboMuffin 398892c6f2 Extension L10N - VM part (#133)
Sandboxed extensions will use navigator.language
Unsandboxed extensions will use the language set by setLocale
2023-05-18 00:00:59 -05:00
GarboMuffin cb2eba9eb3 Document and test that saveProjectSb3DontZip does not copy asset buffers 2023-01-12 03:56:06 -06:00
GarboMuffin b020a60739 Add saveProjectSb3Stream 2023-01-05 16:34:45 -06:00
GarboMuffin b1313e1ce2 Add type option to saveProjectSb3 2023-01-05 16:33:03 -06:00
GarboMuffin 3c5ba8bb55 Fix typo in comment 2023-01-05 16:31:41 -06:00
GarboMuffin 40394f0c43 Revert "Move allAsyncExtensionsLoaded call from installTargets to _loadExtensions"
The async extensions loading counter is not the most reliable thing,
so let's not break block sharing if something went wrong.

This reverts commit 042f979d59.
2022-11-05 21:47:37 -05:00
GarboMuffin 042f979d59 Move allAsyncExtensionsLoaded call from installTargets to _loadExtensions 2022-11-05 19:10:57 -05:00
GarboMuffin 96d76031bb Add Scratch.vm and Scratch.renderer to unsandboxed extension API 2022-10-29 22:34:30 -05:00
GarboMuffin dcc0d961d7 Automatically load custom extensions saved in project
Requires disabled-by-default security manager configuration
2022-10-22 22:02:30 -05:00
GarboMuffin e09bdf37cb Replace workerMode with fine-grained per-extension control
A new object called the "security manager" has been added. It is supposed to be overwritten by users.
2022-10-22 20:35:42 -05:00
GarboMuffin a4291cef17 Save extension URLs in project.json 2022-10-22 16:12:08 -05:00
GarboMuffin d8984c80a2 Ignore error in performance.measure() if browser garbage collects a mark 2022-08-27 22:20:42 -05:00
GarboMuffin 106a1daa1f Remove loadProject ExtendedJSON hack
We now do this in scratch-parser instead.
Moving it to scratch-parser allows the alternative parser to run on
projects loaded from compressed files in addition to JSON projects
2022-08-14 19:39:57 -05:00
GarboMuffin 458b9b7aad Allow rotation center preservation in exported SVGs
Requires additional changes in scratch-gui
2022-08-01 23:50:50 -05:00
GarboMuffin 7ea25cbbe8 Fix turbo mode stored in project not appearing in GUI state 2022-07-18 16:34:35 -05:00
Thomas Weber 7f0291a1ae Fix addSound error when target does not exist
Promise.reject() is not a constructor.
Additionally, rejecting with an Error instead of a string means
developer tools can show proper stack information.
Related to #82
2022-07-01 16:32:08 -05:00
Thomas Weber 29d4823e4a Add methods to update any costume 2022-05-31 16:32:04 -05:00
Thomas Weber 20de0556d2 Merge branch 'develop' of https://github.com/llk/scratch-vm into develop 2022-05-26 14:53:37 -05:00
Karishma Chadha f7e5272618 Delete sound.broken when updating the sound buffer 2022-05-25 18:23:23 -04:00
Thomas Weber 9a3f131477 Fix tests broken by merge 2022-05-23 19:13:19 -05:00
Thomas Weber fe6bea498d Merge branch 'develop' of https://github.com/llk/scratch-vm into develop 2022-05-23 19:01:17 -05:00
Karishma Chadha 3e193565ee Hook up error handling to bitmap loading flow and add tests for loading missing and corrupt bitmpas from sb2 and sprite2 files 2022-05-23 19:54:45 -04:00
Karishma ChadhaandChristopher Willis-Ford 36849c9f40 Fix lint error
Co-authored-by: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com>
2022-05-19 12:55:09 -04:00
Karishma Chadha 4679d06ac0 Update storage and update 'loadSound' to handle null asset from storage. Track additional metadata for broken costumes: 'bitmapResolution' and 'dataFormat'. 2022-05-18 21:26:36 -04:00
Karishma Chadha 11f938f8a9 Update to latest version of storage which fixes issue where an HTML 404 page was being returned for missing asset data. Update VM to handle null assets properly. 2022-05-18 16:55:46 -04:00
Karishma ChadhaandChristopher Willis-Ford fd31a777e2 Code clean up from code review
Co-authored-by: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com>
2022-05-16 16:07:08 -04:00
Karishma Chadha 70a78cf7db Add tests for load costume error handling. Fix issue where asset data was not getting saved out properly. 2022-05-13 19:07:34 -04:00
Karishma Chadha deadce3bc6 Let GQM replace broken costume data but explicitly save and serialize broken costume data before finishing loading the costume. 2022-05-11 10:57:24 -04:00
Thomas Weber c373c50ed0 Remove VirtualMachine.isTurboWarp 2022-03-29 15:26:58 -05:00
Thomas Weber 04e5c2bd4a Add VirtualMachine.getAddonBlock 2022-02-13 12:18:21 -06:00
Thomas Weber bf1156dd3f Add convertToPackagedRuntime stub 2022-02-12 15:59:43 -06:00
Thomas Weber 208b0818c2 Add Runtime.setStageSize helper and STAGE_SIZE_CHANGED event 2022-01-16 17:31:25 -06:00
Thomas Weber 77945b9a04 Convert inEditor compiler option to separate setInEditor 2021-12-29 11:32:27 -06:00
Thomas Weber 2160d6f947 Tune sb1 error handling 2021-11-28 13:50:42 -06:00