Commit Graph
715 Commits
Author SHA1 Message Date
Christopher Willis-Ford e7c727977a Adjust for LLK/scratch-gui#655 & code review
- Move extension from this repository into LLK/scratch-gui
- Rename `EXTENSION_WAS_ADDED` event to `EXTENSION_ADDED`
2017-09-06 00:57:03 -06:00
Christopher Willis-Ford d43749d675 WIP for demo 2017-09-06 00:57:03 -06:00
Christopher Willis-Ford aaa7784d39 Add methods to fetch scratch-blocks XML and JSON 2017-09-06 00:57:03 -06:00
Christopher Willis-Ford 64bde25d22 Offer a promise for extension worker init 2017-09-06 00:57:03 -06:00
Christopher Willis-Ford 403adb743c Track extension blocks in the Runtime 2017-09-06 00:57:03 -06:00
Christopher Willis-Ford 42255bbcfa Collect extension info, prep scratch-blocks data
The Extension Manager now calls an extension's `getInfo` method, then
creates `scratch-blocks`-compatible XML and JSON block data from the
results.
2017-09-06 00:57:03 -06:00
Christopher Willis-Ford 7fb7f0dc7b WIP Extension Manager
When asked to load an extension, the Extension Manager starts up a new
Worker. That worker runs the message dispatch system as well as an
instance of the new `ExtensionWorker` class, which will load the desired
extension and register it with the extension system.

Extensions, placed in `./src/extensions/*.js`, are now processed by
Webpack as separate entry points and packed into an `extensions`
subdirectory in the output.

Still to do: query an extension's information, including the blocks it
provides, and register that information with the VM, GUI, etc.
2017-09-06 00:57:03 -06:00
DD 5606b067e5 More comment fixes 2017-08-31 13:41:47 -04:00
DD 7d3b9a866c Fix comment 2017-08-31 11:55:17 -04:00
DD e5208445ac Add updateSVG to tell the renderer about the updated drawing 2017-08-31 11:43:41 -04:00
DD 5f5f7b1684 add get svg function 2017-08-30 14:23:03 -04:00
Ken fc4f073526 Add glide (number) secs to [dropdown] block (#662)
* Add glide to dropdown block

* Use helper functions instead of copy-paste

* Wrong syntax for array 😒

* Aha

* Fix some Travis issues

* Aha!! This should work

* Wow, Travis is strict about spacing!

* Make requested changes

Rename function getTarget to getTargetXY
Rename parameter TO to targetName
2017-08-28 15:44:34 -04:00
Ray Schamp f367f2d358 Merge pull request #670 from rschamp/eslint-config-scratch-4
Update eslint and eslint-config-scratch
2017-08-26 13:26:05 -04:00
Ray Schamp 32bc087bba Fix remaining lint issues 2017-08-26 13:24:10 -04:00
Ray Schamp 5113876588 Pass with --fix 2017-08-26 13:24:10 -04:00
Ray Schamp f6189903f8 Merge pull request #668 from SillyInventor/develop
Switch from parseInt to Math.floor
2017-08-24 12:24:13 -04:00
Andrew Sliwinski d1af3ef808 Merge pull request #562 from bigeyex/feature/fix-deleted-clone-sequence-order
Fix the next thread is skipped after clone deleted
2017-08-23 09:51:38 -04:00
SillyInventor 525b601253 Switch from parseInt to Math.floor 2017-08-22 10:30:41 -04:00
Chris Willis-Ford 2665ef2b2b Merge pull request #640 from cwillisf/feature/message-dispatch
Implement message dispatch system
2017-08-17 10:57:23 -07:00
Ken 884e24f782 *facepalm* 2017-08-11 02:23:43 +12:00
Ken 28e61dbf48 Cleaned up 2017-08-11 01:58:59 +12:00
Ken 328514ae63 This kinda doesn’t make sense, but ok 2017-08-11 01:46:26 +12:00
Ken 5af99566fa Wait includes is case sensitive
Made it convert to lowercase before comparing
2017-08-11 01:27:31 +12:00
Ken 3b601e8595 Add string contains string 2017-08-11 00:52:41 +12:00
Christopher Willis-Ford b4c0cfe940 Refactor common code in {central,worker}-dispatch
Central dispatch and worker dispatch share most of their code now by
inheriting from a new shared dispatch class.

Also, the format of passed messages has been altered to make it easier
to understand in a debugger.
2017-08-09 17:30:00 -04:00
neurosie 86e2b2338e Fix variable deserializing 2017-08-08 16:00:31 -04:00
DD Liu a48efe681e tests 2017-07-31 17:57:51 -04:00
DD Liu cc1678fa9e Also run monitor blocks every frame 2017-07-28 14:38:26 -04:00
DD Liu 2aef75bc11 Merge branch 'develop' into timerBlock 2017-07-28 11:35:47 -04:00
TheBrokenRail 936ff04b0f Fix setting Infinity to direction (#612)
* Create rendered-target.js

* Update math-util.js

* Update rendered-target.js

* Update math-util.js

* Update rendered-target.js
2017-07-26 17:44:02 -04:00
Paul Kaplan f2bd32a81a Merge pull request #653 from paulkaplan/sound-ids
Use sound ID instead of md5 for playing sounds
2017-07-26 09:00:00 -04:00
Paul Kaplan 25a0e2ffaf Use new audio engine api to retreive and set sound buffers 2017-07-25 17:03:26 -04:00
Paul Kaplan 44298fd71b Use soundId instead of md5 for playing sounds 2017-07-25 12:20:32 -04:00
Paul Kaplan 0cf05647d2 Merge branch 'develop' into fix-asset-naming 2017-07-25 10:48:25 -04:00
Paul Kaplan f96a92b4d1 Move renaming and adding into rendered-target with tests 2017-07-25 10:32:25 -04:00
Christopher Willis-Ford 97d67d75f4 Allow 'then' on service registration
This allows a service to postpone communication with other services
until it can be sure that it's registered with central dispatch. Service
registration on the main thread always happens immediately, but that
version of `setService` still returns a Promise for consistency.
2017-07-21 13:23:52 -07:00
Christopher Willis-Ford 0fcc248ac1 Add tests for message dispatch system; fix bugs
The tests run using TinyWorker, which emulates web workers on Node.
There are quite a few quirks in that situation due to the differences
between Node and Webpack as well as the differences between TinyWorker
and real Web Workers.

The tests also exposed a few bugs in the dispatch system, which have now
been fixed. Most notably, if a method called through the dispatch system
throws an exception that exception will now be passed back to the
caller. Previously the exception would escape the dispatch system and
the caller would never hear any response at all.
2017-07-21 13:23:52 -07:00
Christopher Willis-Ford 09d3fe330f Implement message dispatch system
This message dispatch system allows a "service" to register itself under
a particular name, and then anyone can call any method on that service
from any context (the main "window" thread or any worker). Return values
are passed back through promise resolution.
2017-07-21 13:22:14 -07:00
Paul Kaplan bd3a29650b Fix variable import scoping 2017-07-17 12:28:44 -04:00
DD Liu 912e7daa81 Merge pull request #636 from fsih/deleteMonitors
Update monitors when deleting or renaming variables
2017-07-17 11:06:29 -04:00
Paul Kaplan 0e33d061fe Merge pull request #633 from paulkaplan/fix-sound-indexing
Fix sound indexing and add tests
2017-07-13 15:08:05 -04:00
Paul Kaplan eb04fcab57 Merge pull request #634 from paulkaplan/sound-costume-renaming
Add public API for costume and sound renaming
2017-07-13 09:00:19 -04:00
DD Liu 3722aefb17 fix greater than hat block click activation, and also event activation which was only on half the time 2017-07-12 15:46:23 -04:00
DD Liu 01db5da8ce fix value 2017-07-11 13:08:18 -04:00
DD Liu 4b1307bb11 fix test 2017-07-11 11:51:47 -04:00
DD Liu 7f1f9079e3 support rename variable 2017-07-10 18:29:25 -04:00
Paul Kaplan a83c0808a0 Add public API for costume and sound renaming with tests 2017-07-07 08:19:32 -04:00
Paul Kaplan 2ddb6215fd Add tests and fixes for set instrument and play drum 2017-07-06 14:56:46 -04:00
Paul Kaplan 1b6baf8114 Make playSound use one indexing 2017-07-06 14:28:11 -04:00
Paul Kaplan 6fa49b1e7a Merge pull request #629 from marisaleung/develop
ChangeBlock uses id's of variable instead of name.
2017-06-30 08:10:55 -04:00