Commit graph

92 commits

Author SHA1 Message Date
Christopher Willis-Ford
058685f41e fix: use web-worker to replace tiny-worker and worker-loader
for webpack 5 compatibility
2024-03-04 11:10:29 -08:00
Christopher Willis-Ford
8dbcc1fc8f style: fix hasOwnProperty lint complaints 2023-12-15 17:40:05 -08:00
Christopher Willis-Ford
840ffb5df0 test: don't use process.exit to end tests
Newer versions of `tap` run more asynchronously, so sometimes using `process.nextTick(process.exit)`
to end a test would prevent the test from completing correctly. Removing all instances of
`process.nextTick(process.exit)` put tests into three categories:
* the test still worked correctly -- no fixup needed.
* the test would hang because the VM's `_steppingInterval` was keeping
  Node alive. These tests call a new `quit()` method which ends the
  stepping interval.
* the `load-extensions` test needed special attention because the "Video
  Sensing" extension starts its own loop using `setTimeout`. I added a
  `_stopLoop()` method on the extension and directly call that from the
  test. I'm not completely happy with this solution but anything more
  general would likely require a change to the extension spec, so I'm
  leaving that as a followup task.
2022-06-07 11:44:06 -07:00
Karishma Chadha
21430a5366 Add support for image argument type in extensions. Add example in core example extension. 2019-09-20 15:19:14 -07:00
Chris Willis-Ford
eba89d57d8 Merge branch 'develop' into non-droppable-extension-menus 2019-06-18 16:52:47 -07:00
Karishma Chadha
9af2e4c086
Merge pull request #2161 from LLK/e16n
Supporting VM changes for extensionification
2019-06-18 18:53:20 -04:00
Christopher Willis-Ford
3c28f714bb respond to code review 2019-06-17 21:14:21 -07:00
Christopher Willis-Ford
cfee656306 fix tests: empty menus shouldn't be an array 2019-06-14 12:29:32 -07:00
Christopher Willis-Ford
e7bf49c8df support non-droppable menus in extensions 2019-06-14 12:29:32 -07:00
Karishma Chadha
dbcbe8b94f Revert "synth extension"
This reverts commit dbd513d85b.
2019-05-24 11:27:20 -04:00
Karishma Chadha
d1b261d56e Revert "lightplay extension stub"
This reverts commit 36de7517bd.
2019-05-24 11:27:08 -04:00
Carmelo Presicce
36de7517bd lightplay extension stub 2019-05-23 21:26:57 -04:00
Carmelo Presicce
dbd513d85b synth extension 2019-05-23 20:22:03 -04:00
Eric Rosenbaum
79c8a815a3 Do not load speech2text extension 2019-05-20 12:53:16 -04:00
Christopher Willis-Ford
833d33355c retrieve blockInfo from args when isDynamic is set 2019-04-19 16:06:11 -07:00
Christopher Willis-Ford
638062e982 pass blockInfo to extension methods
Sometimes a single extension method needs to service several different
instances of the same opcode. This can happen with variables or custom
procedures, for example. This change allows the extension method to
inspect the `blockInfo` for instance data, including arbitrary
extension-specific properties if necessary.
2019-04-19 14:35:35 -07:00
Kevin Nørby Andersen
f02433510a
Merge pull request #2061 from knandersen/boostextension
Add LEGO BOOST Scratch 3.0 extension
2019-04-03 19:05:37 -04:00
Christopher Willis-Ford
4cdbb26f57 Explicitly check that every extension block has an opcode 2019-04-03 11:01:00 -07:00
Christopher Willis-Ford
bed54bae1f Allow extensions to make buttons 2019-04-01 18:09:09 -07:00
Karishma Chadha
e89f5d0361
Merge pull request #2060 from kchadha/load-core-extension
Load core extensions synchronously
2019-03-28 14:05:16 -04:00
Karishma Chadha
2fbd152c53 Make loadExtensionURL consistent with error handling logic in loadExtensionIdSync 2019-03-27 17:42:10 -04:00
Kevin Nørby Andersen
b608a4856b
Merge branch 'develop' into boostextension 2019-03-27 10:21:32 -07:00
Karishma Chadha
eccdeff2ce Use async require with coreExample extension. Log a warning when attempting to load a non-built in extension synchronously. Simplify unit test. 2019-03-26 12:03:00 -04:00
Eric Rosenbaum
b9a6f4165a Load Vernier extension code 2019-03-25 17:13:39 -04:00
Karishma Chadha
061b0b081f Refactor loadExtensionURL for readability. 2019-03-25 16:39:00 -04:00
Karishma Chadha
efcb801fe3
Apply suggestions from code review
Add error cases in new functions and remove todo comment.

Co-Authored-By: kchadha <kchadha@media.mit.edu>
2019-03-25 16:32:51 -04:00
Karishma Chadha
0e710ba3d9 Allow loading extensions synchronously. Add example extension to list of known internal extensions. 2019-03-22 12:20:06 -04:00
Kevin Andersen
256758122d Merge changes from LLK/develop 2019-03-21 14:11:27 -04:00
Michael "Z" Goddard
a5009b4c59
delay extension evaluation until that extension is installed
Reduce the amount of code that needs to evaluated before we can
starting the target project if there is one. It is key to note that the
music extension includes ~2MB of base64 encoded sound samples. This
skips evaluating those samples and decoding base64 into binary typed
arrays.
2019-03-06 11:11:44 -05:00
Kevin Andersen
e99a217ba5 Merge branch 'develop' of https://github.com/LLK/scratch-vm into boostextension 2019-02-14 13:31:13 -05:00
Chris Willis-Ford
a02fb3877b
Merge pull request #1871 from Affonso-Gui/fix_dynamic_menu_string
Fix dynamic menus for string arrays
2019-02-13 10:41:36 -08:00
Kevin Andersen
245ba998d2 merge changes from origin/develop 2019-02-12 13:18:28 -05:00
Eric Rosenbaum
5d329663aa do not load vernier extension yet 2019-01-15 15:20:05 -05:00
Kevin Andersen
af800956fe Initial commit. WIP 2019-01-09 10:06:48 -05:00
Valerie Young
a0bf69f17c Change extension name 2019-01-07 11:29:26 -05:00
Valerie R Young
26067a9287 Draft of goforce blocks 2019-01-07 11:29:26 -05:00
Guilherme Affonso
f4c6816ea7 Fix dynamic menus for string arrays 2018-12-26 19:26:59 +09:00
Eric Rosenbaum
7198ace595
Makey Makey extension (#1782)
* Initial working makey makey extension

* Cleanup and localization

* Add block icon

* Localization and cleanup

* Docs and cleanup

* Update block icon

* Cleanup

* Fix key press args
2018-11-29 10:45:40 -05:00
Eric Rosenbaum
2cff4159bb
Use the new note picker field in music and EV3 extensions (#1720)
* Add note field type

* Note picker in music extension plays notes

* Use note picker in EV3 beep block
2018-11-07 11:50:15 -05:00
Eric Rosenbaum
64a1d3e02b
fix ids and names for text2speech and speech2text extensions (#1583) 2018-09-13 15:44:18 -04:00
Christopher Willis-Ford
701fb6c1c5 Enable extension monitors, add flag to disable
Extension reporters now offer a monitor checkbox by default, unless the
`disableMonitor` flag is set in the extension block metadata.
2018-09-07 11:13:13 -07:00
Kreg Hanning
06c4e5516f Add micro:bit matrix field block (#1314)
* Add micro:bit matrix field block

* Remove debug logs

* Remove rowcol menu

* Fix lint errors
2018-07-11 16:13:49 -04:00
chrisgarrity
849412ba82 Switch setLocale to return a promise
Convert refreshBlocks to a function returning a promise, and return that from setLocale. Now GUI can ensure that refreshing the toolbox and workspace only happens after all the blocks have refreshed.
2018-07-11 08:35:22 -04:00
Andrew Sliwinski
c9d71488c3
Merge pull request #1311 from thisandagain/feature/polly
Update text-to-speech extension to use new audio engine
2018-07-10 08:30:52 -04:00
Andrew Sliwinski
ace5ae40d0 Update text-to-speech extension to use new audio engine 2018-07-09 14:40:13 -04:00
Evelyn Eastmond
2d8ad05a78 Adding Ev3 extension with three test blocks to latest device-connection work, auto-connecting to device for now. 2018-07-09 13:49:40 -04:00
Andrew Sliwinski
55b1a794ce Add initial working version of the Amazon Polly extension 2018-06-05 17:51:55 -04:00
picklesrus
968eeaf936 Fix missing comma from bad merge. 2018-05-31 12:14:55 -07:00
picklesrus
adf5d0acfd Add speech extension to the extension manager. 2018-05-30 13:22:07 -07:00
Kreg Hanning
82fd6f0d2f Add micro:bit Scratch 3.0 extension (#1113)
* Add micro:bit Scratch 3.0 extension

* Fix lint errors in micro:bit extension

* Fix doc. Incorrect return type

* Check for valid pin in when pin connected block

* Drop mapping function

* Drop question mark from tilt hat block

* Generate list of symbols from object keys

* Trim display text block to max 20 characters
2018-05-14 13:52:49 -04:00