Muffin
6399562b90
Revert running unsandboxed extensions with fetch() and new AsyncFunction instead of <script>
...
It causes other issues:
- It *will* break projects
- Stack traces from errors in extensions are unusable
- We do not even get some of the originally intended benefits like parallel loading
2023-08-22 11:24:20 -05:00
GarboMuffin
9caca1c510
Merge pull request #157 from TurboWarp/modernize-loading
...
Use fetch() and AsyncFunction instead of `<script>` for unsandboxed extensions
2023-08-22 10:48:54 -05:00
Muffin
683620994f
Fix tests
2023-08-22 10:43:04 -05:00
Muffin
55cda8242c
Run unsandboxed extensions with fetch() and new AsyncFunction instead of <script>
...
Benefits:
- IIFE no longer needed
- Extensions can await
- Better error messages
Downsides:
- CORS now required to load extensions
2023-08-22 10:00:36 -05:00
Muffin
b23fb1e8be
Refactor ScratchX compatibility layer
2023-08-16 16:39:09 -05: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
186ad43b5b
Add extensive event and hat test
2023-08-13 16:53:25 -05:00
Muffin
afb04f83d8
Run existing hat tests in both interpreter and compiler
2023-08-13 16:53:25 -05:00
Muffin
391c3dc979
Do not ignore compilation errors related to edge-activated hats
...
They can now be compiled, so this code is dead.
2023-08-13 16:53:25 -05:00
Muffin
ff41d1dcf8
Fix compiler's hat implementation
...
Now supports edge-activated and predicate-based hats
2023-08-13 16:53:25 -05:00
Muffin
843b4c3839
Add API to add a new "builtin" extension at runtime
...
This will be used by tests
2023-08-13 16:53:25 -05:00
Muffin
c549569651
Comment out test entirely to clean up logs
2023-08-08 22:56:17 -05:00
GarboMuffin
461ef267da
Merge pull request #144 from TurboWarp/xml-blocktype
...
BlockType.XML
2023-08-06 22:08:30 -05:00
Muffin
c32c66679f
Add test
2023-08-06 21:48:18 -05:00
Muffin
a1d2cd108a
Modify saveProjectSb3DontZip asset order to match saveProjectSb3
2023-07-31 22:37:16 -05:00
Muffin
2bd4d4201a
Include compile errors in snapshot tests
2023-07-29 10:50:52 -05:00
Muffin
791189b7b9
Fix incorrect command in snapshot test error
2023-07-29 10:50:37 -05:00
Muffin
9cded93814
Fix return value of non-existent procedure in compiler
2023-07-29 10:45:28 -05:00
GarboMuffin
fbc62badf6
Merge pull request #150 from TurboWarp/return
...
Allow custom blocks to return values - VM part
2023-07-29 09:56:57 -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
8453a47848
Update addon block tests
2023-07-26 20:39:34 -05:00
Muffin
6681b22349
Include extension list in exported .sprite3 files
...
closes https://github.com/TurboWarp/extensions/issues/767
2023-07-25 23:53:31 -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
Muffin
b8892efba6
Disable tests that are now intentionally broken
2023-07-23 15:17:44 -05:00
GarboMuffin
9329427fb5
Export the internal copy of JSZip for extensions
2023-07-16 21:02:38 -05:00
GarboMuffin
5ff2a56bdc
Add Scratch.canGeolocate() extension API
2023-07-16 09:38:46 -05:00
GarboMuffin
f42b260cc0
Refactor procedure return tests into more manageable pieces
2023-07-14 22:22:22 -05:00
GarboMuffin
83605d0216
Fix execution order in recursive procedure reporters in compiler
2023-07-14 20:48:33 -05:00
GarboMuffin
f033067b6f
Non-warp recursion should yield in interpreter
...
Matches normal procedure blocks. Already worked in compiler.
2023-07-14 19:28:13 -05:00
GarboMuffin
40e053daf4
Export internal block being executed on StackFrame
2023-07-14 18:43:07 -05:00
GarboMuffin
6300494cc2
Update snapshot tests
2023-07-10 22:12:30 -05:00
GarboMuffin
b8bc8571f1
Add reasonably comprehensive tests for return blocks
2023-07-10 21:49:38 -05:00
GarboMuffin
9ee3974242
Merge pull request #146 from TurboWarp/translate-fail-handling
...
Return original message if translation request fails
2023-07-07 19:57:39 -05:00
GarboMuffin
a515991c37
Return original message if translation request fails
...
For games that put their entire interface through translate blocks, this
allows them to be more usable when no internet connection is present.
Has convenient side effect of breaking some online detectors.
2023-07-07 19:49:11 -05:00
GarboMuffin
33439939d2
Add API for extension block to be dropped anywhere
2023-07-07 19:32:56 -05:00
GarboMuffin
19c9e8f591
Fix Scratch.translate in unsandboxed custom extensions
2023-05-29 01:16:04 -05:00
GarboMuffin
f6ab22e280
Merge pull request #135 from TurboWarp/default-extension-urls
...
Add default extension URL for compatibility with Scratch Lab animated text projects
2023-05-28 23:57:08 -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
ea81f29955
Always force noreferrer when opening new windows
2023-05-26 22:32:03 -05:00
GarboMuffin
c4561c2f1c
Support custom buttons in extensions ( #137 )
2023-05-26 20:52:52 -05:00
GarboMuffin
227dec235a
Add canRecordAudio, canRecordVideo, canReadClipboard, canNotify
2023-05-26 20:17:09 -05:00
GarboMuffin
7e29bbef17
Add default extension URL for compatibility with Scratch Lab animated text projects
2023-05-22 20:09:08 -05:00
GarboMuffin
584e3452a3
Add BEFORE_EXECUTE and AFTER_EXECUTE events in _step
...
These are for extensions.
2023-05-22 20:00:22 -05:00
GarboMuffin
2b4de3e62b
Update tests
2023-05-18 01:17:05 -05:00
GarboMuffin
d4bc61714e
Fix serializing extensions used only by monitors
2023-05-18 00:58:25 -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
True Fantøm and GarboMuffin
8a7ae3f774
Add LABEL BlockType ( #132 )
...
Co-authored-by: GarboMuffin <muffin@mailbox.org >
2023-05-17 23:54:03 -05:00
GarboMuffin
c73f821abf
Add ArgumentType.COSTUME and ArgumentType.SOUND
2023-03-25 14:33:57 -05:00