Commit graph

111 commits

Author SHA1 Message Date
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
963078210a Add test coverage 2017-08-11 01:37:10 +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
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
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
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
Paul Kaplan
bd3a29650b Fix variable import scoping 2017-07-17 12:28:44 -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
a83c0808a0 Add public API for costume and sound renaming with tests 2017-07-07 08:19:32 -04:00
Paul Kaplan
7ec45d9519 Satisfy linter 2017-07-06 17:23:25 -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
marisaleung
875ccf5b88 Updated variables and var_fire event listener. 2017-06-23 09:57:01 -07:00
Ray Schamp
ecf535f4c3 Merge pull request #579 from cwillisf/load-jpeg-backdrops
Specify dataFormat when loading asset for import
2017-06-02 09:06:37 -04:00
DD Liu
875eba568b fix file name in test 2017-05-30 10:24:09 -04:00
DD Liu
809760b954 Merge branch 'develop' into immutableState 2017-05-26 13:50:50 -04:00
Christopher Willis-Ford
eb931fd99b Specify dataFormat when loading asset for import
When importing a project we know the file extension for each asset to be
loaded. This change provides that information to the storage system so
that we can load assets which don't use the default. For example, this
allows loading JPG-format backdrops.

In support of this change, there's a new function on `StringUtil` called
`splitFirst`, which splits a string on the first instance of a separator
character. This change includes unit tests for this new function.
2017-05-24 15:35:10 -07:00
Chris Willis-Ford
3970883e45 Merge pull request #549 from cwillisf/device-manager-client
Device manager client
2017-05-24 14:43:28 -07:00
DD Liu
5df3d4ab68 Merge branch 'develop' into immutableState 2017-05-24 15:42:54 -04:00
DD Liu
1902848ea4 Switch to ordered maps of monitor records for monitor state 2017-05-24 15:42:29 -04:00
Paul Kaplan
423da12c3c Handle more cases of deleting costumes 2017-05-22 08:17:28 -04:00
Paul Kaplan
30a0c0d251 Allow deleting the last sound 2017-05-22 08:17:28 -04:00
Paul Kaplan
a608ca4fed Make rendered targets in charge of deleting their own sounds and costumes 2017-05-22 08:17:28 -04:00
Paul Kaplan
71081502fe Add to the vm spec 2017-05-22 08:17:28 -04:00
DD Liu
48c51ab2ec switch to nested immutables state 2017-05-19 17:28:00 -04:00
DD Liu
9645a513b1 Only send monitor update on change 2017-05-19 12:28:05 -04:00
Paul Kaplan
beaef901a7 Add failing test for gui issues 370
Fix rename increment when renamed to itself
2017-05-18 09:13:31 -04:00
Christopher Willis-Ford
96c74867b5 Remove test for canceling a search
When no Device Manager instance is present this test takes a long time
and can cause timeouts. We'll need to fake the HTTP requests if we want
to do this sort of test reliably.
2017-04-28 15:06:42 -07:00
Christopher Willis-Ford
9a9c509e76 Implement a few tests for io/deviceManager 2017-04-28 14:50:57 -07:00
Ray Schamp
f785117e1d Lint and fix failing tests 2017-04-27 17:49:57 -04:00
Ray Schamp
2a4af8a9ca Fix up most linting/merge errors 2017-04-26 16:50:53 -04:00
Ray Schamp
a4cdb027ab Merge branch 'develop' of github.com:morantsur/scratch-vm into feature/serialization
# Conflicts:
#	src/playground/index.html
#	src/serialization/sb2.js
#	src/sprites/rendered-target.js
#	src/virtual-machine.js
#	test/unit/serialization_sb2.js
2017-04-26 11:44:53 -04:00
Ray Schamp
bafdf8d9f2 Use ES6 linting rules in the project root
Update all tests for `no-var` and `prefer-arrow-callback` (using `--fix`)
2017-04-24 15:37:58 -04:00
Andrew Sliwinski
8dc94391b0 Merge pull request #527 from CSnap/add_testing
Added testing to rendered-target
2017-04-24 10:15:55 -04:00
SillyInventor
a158db8aff Implemented Proposed Fixes
Moved 'fake renderer' to fixtures
Fixed spacing after ()
Removed extra line break
2017-04-24 10:04:06 -04:00
SillyInventor
da6ce9182d Added testing to rendered-target
Added a fake renderer with known predictable output
Added testing for most if not all functions
2017-04-07 14:50:13 -04:00
Paul Kaplan
80e8003fb2 Add tests for rendered target 2017-04-06 09:46:40 -04:00
Paul Kaplan
771f18e23b Merge pull request #516 from paulkaplan/add-sound-public-api
Expose VM#addSound publicly
2017-04-04 09:05:45 -04:00
Chris Willis-Ford
a4aa3810ae Merge pull request #462 from griffpatch/optimise/reduceGetBlockCalls
Optimise reducegetblockcalls
2017-04-03 13:00:05 -04:00
Paul Kaplan
251244ce9c Expose VM#addSound publicly 2017-04-03 09:33:23 -04:00
Chris Willis-Ford
c8b4871b19 Merge pull request #498 from cwillisf/use-scratch-storage
Load projects & costumes through scratch-storage
2017-03-23 22:10:25 -07:00
griffpatch
220d854f28 Merge remote-tracking branch 'refs/remotes/LLK/develop' into optimise/reduceGetBlockCalls
# Conflicts:
#	src/engine/execute.js
2017-03-22 08:58:01 +00:00
griffpatch
25429b1192 Tidy up commit and revert direct member access 2017-03-22 08:48:30 +00:00
Paul Kaplan
8bbb395b35 Add sprite name incrementing and reserved naming 2017-03-20 12:52:57 -04:00
Paul Kaplan
052ecef91c Add string utils with tests 2017-03-20 12:12:38 -04:00
Paul Kaplan
5d2352e471 Add test for skipping rename on blank input 2017-03-20 11:14:25 -04:00
Paul Kaplan
627fc1d9c3 Add tests for existing vm.renameSprite functionality 2017-03-20 11:13:24 -04:00
Chris Willis-Ford
3d7f1187e5 Merge branch 'develop' into use-scratch-storage 2017-03-13 15:48:21 -07:00