Commit Graph
5440 Commits
Author SHA1 Message Date
GarboMuffin 4325486bef Fix tests now that we always emit field default value 2022-07-27 17:01:36 -05:00
GarboMuffin 21eff9a311 Remove autoplay restriction from iframe extension worker feature policy
Regardless of this, the browser is not guaranteed to actually let the page play audio
We just won't add our own restriction on top of the browser's
2022-07-27 16:10:52 -05:00
GarboMuffin 3afb16c831 Fix custom extension inputs with default value "" being converted to undefined 2022-07-27 16:09:39 -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 bbd9631a41 Only call renderer.markSkinAsPrivate if it exists 2022-07-13 23:47:03 -05:00
Thomas Weber 2257f975f8 Remove explicit allow from iframe worker feature policy
Feature policy is allow by default.
2022-07-12 01:22:19 -05:00
Thomas Weber 91afd10407 scratchx: Use block color like ScratchX 2022-07-09 19:19:55 -05:00
Thomas Weber 40a9ae057d scratchx: Force upgrade all $.ajax URLs to HTTPS 2022-07-09 19:07:05 -05:00
Thomas Weber 24bdd21bdd Disable test that relies on currentStepTime defaulting to null 2022-07-09 16:41:22 -05:00
Thomas Weber 09df19b60b Add test for edge activated hat returning promise
Adds test for bug fixed in
3062334108
2022-07-09 16:32:28 -05:00
Thomas Weber c4fa4a84a8 Set Runtime.currentStepTime to a number by default instead of null 2022-07-09 16:28:28 -05:00
Thomas Weber 3062334108 Fix edge-activated hats that return promises
This fixes a Scratch bug affecting custom extensions.
There were two bugs in the interpreter:
 - Thread status wouldn't reset after promise resolves
 - Loop finding logic broke on hats and mangled the stack
2022-07-09 02:19:22 -05:00
Thomas Weber 7cbfab1273 Don't use ScratchX block in unknown-opcode-as-reporter-block test
We now support ScratchX blocks, so the test now fails as it assumes we don't.
The test was modified to use a different invalid opcode that isn't a ScratchX block.
2022-07-08 22:35:58 -05:00
Thomas Weber 25e81a4f67 Allow importing simple ScratchX (.sbx) project files
Extends .sb2 importer to convert extension blocks from ScratchX project files
(.sbx) to the format we require.
This doesn't automatically load extensions; they still must be loaded manually.
2022-07-08 22:24:33 -05:00
Thomas Weber 95f57eaf96 scratchx: Extract some functions to separate module 2022-07-08 20:03:03 -05:00
Thomas Weber b182b0afd0 scratchx: Add test for block type ' ' being equivalent to '' 2022-07-08 02:24:55 -05:00
Thomas Weber 651b72f677 scratchx: Add displayName support 2022-07-08 02:22:56 -05:00
Thomas Weber a595b83798 scratchx: Add more to ScratchExtensions.getStatus 2022-07-08 02:20:25 -05:00
Thomas Weber d79cde6047 scratchx: Extract argument index -> id conversion to function 2022-07-08 01:41:49 -05:00
Thomas Weber 3a0cfeae82 scratchx: Implement $.ajax with dataType=script 2022-07-08 01:27:12 -05:00
Thomas Weber 8e0a940231 scratchx: Add stubs for $.getScript, $.ajax, ScratchExtensions.getStatus
Fixes extensions:
https://ericrosenbaum.github.io/tone-synth-extension/tone-synth.js
http://khanning.github.io/scratch-isstracker-extension/iss_extension.js
http://khanning.github.io/scratch-weather-extension/weather_extension.js
https://ericrosenbaum.github.io/spotify-extension/extension.js
2022-07-08 01:21:18 -05:00
Thomas Weber 274cf02d47 scratchx: Fix default value of default argument values 2022-07-07 17:47:55 -05:00
Thomas Weber 3a7e75930a scratchx: Use shorter prefix for generated extension IDs
No projects use this yet so it's safe to change.
2022-07-07 17:47:55 -05:00
Thomas Weber 64ae031026 Don't reference HTMLCanvasElement; breaks tests 2022-07-07 17:47:55 -05:00
Thomas Weber 6ae5412ba8 Update bitmap loader to take advantage of new TurboWarp/scratch-render memory optimization
If we have to generate a canvas for a bitmap skin,
make sure to never reuse that canvas for any other costume.
This lets us set reusable=false which lets renderer avoid reading ImageData
eagerly.
2022-07-07 17:36:13 -05:00
Thomas Weber 5b8ccf55b0 Merge branch 'scratchx' into develop
Adds extremely primitive custom extension support
2022-07-07 11:01:30 -05:00
Thomas Weber 65f32ba0f9 Print full custom extension block errors to console 2022-07-07 11:00:47 -05:00
Thomas Weber 6bbedd479b scratchx: Add support for menu arguments using : as a separator 2022-07-07 02:30:37 -05:00
Thomas Weber 9115616f47 scratchx: Add support for more types of separators 2022-07-07 02:21:09 -05:00
Thomas Weber ef0e7cffe2 scratchx: Implement separators 2022-07-07 02:02:34 -05:00
Thomas Weber 2c693860a2 scratchx: Implement async blocks 2022-07-07 01:50:51 -05:00
Thomas Weber d991629a49 scratchX: Set Scratch 3 docsURI to ScratchX url 2022-07-07 01:38:23 -05:00
Thomas Weber f424b2e03e scratchx: Add menu support 2022-07-07 01:37:00 -05:00
Thomas Weber 65e58845fc scratchx: Add primitive support for ScratchX extensions 2022-07-07 01:25:19 -05:00
Thomas Weber 6c037a9c65 Mark video as private using new TurboWarp/scratch-render API 2022-07-05 22:04:05 -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 f8ec0084ad Add Runtime#getNumberOfCloudVariables 2022-06-27 22:57:18 -05:00
Thomas Weber bfc0960553 Remove tw_getLastKeyPressed monitor from all serialized projects 2022-06-17 17:09:34 -05:00
Thomas Weber 0312e28ecb Dirty hack to enable warp timer for loops that use timer in their condition 2022-06-13 21:12:33 -05:00
Thomas Weber 1bf8a18e6b ir: Improve error logging for unknown inputs 2022-06-13 13:47:00 -05:00
Thomas Weber 930caca9de Don't allow negative framerates 2022-06-03 16:57:06 -05:00
Thomas Weber 29d4823e4a Add methods to update any costume 2022-05-31 16:32:04 -05:00
Thomas Weber 339cdd4453 Move TW runtime tests to separate file, revert unnecessary changes 2022-05-28 19:13:16 -05:00
Thomas Weber d18af5ab18 Move TW VM tests to separate file 2022-05-28 19:05:27 -05:00
Thomas Weber 3e7b17fa86 Move TW mouse tests to separate file 2022-05-28 19:05:09 -05:00
Thomas Weber c8502b7928 Move TW keyboard tests to separate file 2022-05-28 19:05:02 -05:00
Thomas Weber 21374cebc7 Rename sound tests 2022-05-28 19:04:50 -05:00
Thomas Weber 1207e5ec2b Rename pen tests 2022-05-28 19:04:44 -05:00
Thomas Weber e97a277ab1 Revert unnecessary change to Infinity/NaN encoding test 2022-05-28 18:56:01 -05:00
Thomas Weber 27699bb755 Re-enable another disabled cloud variable limit test
This should have been re-enabled a while ago when the limit was made configurable
2022-05-28 18:54:38 -05:00