Commit Graph
3425 Commits
Author SHA1 Message Date
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 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 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 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 fee8b1e8ee Reduce delay between persistentReadImage attempts
It doesn't make sense to increase the backout time anyways
Might fix broken tests too
2022-05-28 18:45:31 -05:00
Thomas Weber 27291b1c1f Make sure custom stage size is a round number and at least 1 2022-05-28 18:17:59 -05:00
Thomas Weber 16b146ec08 Fix broken tests due to timeouts 2022-05-26 15:21:41 -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 49dccef719 Remove special case for blocks from old default project
This hasn't done anything in a long time and was always a terrible hack.
2022-05-23 20:54:59 -05: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
Thomas Weber 0562999ca2 Fix unsafe variable value fixer not running on lists that didn't contain null 2022-05-22 19:54:40 -05:00
Thomas Weber d372273fd4 Merge branch 'develop' of github.com:TurboWarp/scratch-vm into develop 2022-05-22 19:50:55 -05:00
Thomas Weber 02bbfba1e9 Convert more unsafe values to string when serializing variables and lists 2022-05-22 19:50:53 -05:00
Thomas Weber 7033c72fad Convert errors returned by custom extensions to strings 2022-05-22 19:44:02 -05:00
Thomas Weber 3ecac744e7 Convert non-number, string, boolean values returrned by custom extensions to strings 2022-05-22 19:43:17 -05:00
Simon Shiki b74e73c60e this.frame -> this.currentFrame (#76)
This can probably be removed entirely
2022-05-22 11:08:13 -05:00