Commit graph

207 commits

Author SHA1 Message Date
Eric Rosenbaum
58eaeaaf6a Add pen transparency, clamped 0-100 2017-09-05 18:00:34 -04:00
Eric Rosenbaum
2b89063827 Merge branch 'patch-1' of https://github.com/Kenny2github/scratch-vm into Kenny2github-patch-1 2017-09-05 11:38:27 -04:00
Ken
3185eb27e1 Rewrote transparency block
Wrapping of the value is now handled by a new function, _wrapTransparency;
_updatePenColor now handles the transparency value;
DEFAULT_PEN_STATE now includes a transparency value (100).
2017-09-01 14:11:09 +08:00
Ken
f61366643d Clamp transparency value (at least for set) 2017-08-31 09:24:41 +08: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
Ken
8a77329c79 Fix lint issue and update maximums
Inferring from the issue, the maximum seems to be 100, not 255 (default for set is 50 and change is 10). Changed that.
A comment line was too long (thanks lint) so it has now been reworded.
2017-08-25 15:24:56 +08:00
Ken
e30e5809d1 Add new blocks
change pen transparency by (num)
set pen transparency to (num)
2017-08-25 15:07:38 +08:00
SillyInventor
525b601253 Switch from parseInt to Math.floor 2017-08-22 10:30:41 -04: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
Paul Kaplan
44298fd71b Use soundId instead of md5 for playing sounds 2017-07-25 12:20: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
Chris Willis-Ford
47fc38fd9a Merge pull request #619 from cwillisf/clone-custom-state
Clone custom state
2017-06-27 22:37:30 -07:00
Eric Rosenbaum
01f801a2a2 Remove all audio effects except pitch and pan 2017-06-19 14:56:29 -04:00
Christopher Willis-Ford
06d5994a32 Use targetWasCreated event to clone pen state
Remove explicit cloning of `_customState` in favor of smarter,
state-specific cloning.
2017-06-16 14:22:51 -07:00
DD Liu
fb986effe6 Merge pull request #593 from fsih/fixWaitCalledEveryFrame
Change wait to use a promise instead of being called every frame
2017-06-08 15:35:48 -04:00
Chris Willis-Ford
d41997b58b Merge pull request #556 from cwillisf/wedo2-blocks
Add WeDo 2.0 blocks
2017-06-07 09:57:36 -07:00
DD Liu
e237d24846 fix lint 2017-06-06 10:21:27 -04:00
DD Liu
ab0cef52eb Change wait to use a promise instead of being called every frame 2017-06-05 16:55:15 -04:00
Christopher Willis-Ford
cbfbc5d600 Convert motor duration: seconds -> milliseconds
The block takes seconds, whereas the device takes milliseconds. Turning
on a motor for 1 millisecond isn't very dramatic.
2017-05-24 16:40:55 -07:00
Christopher Willis-Ford
06fe701624 Implement WeDo 2.0 blocks 2017-05-24 16:40:55 -07:00
Christopher Willis-Ford
2625529ebe Create WeDo 2.0 device communication classes 2017-05-24 16:40:55 -07:00
Ray Schamp
548aa6dd70 Fix no-useless-call todo
The linter is correct that `devObject[func].call(devObject, args)` is unnecessary because it's equivalent to `devObject[func](args)`.

@tmickel probably either meant to allow passing an array of arguments to be applied, or to call the function with the provided argument. Since we probably want to be able to use multi-argument functions, use `apply` and fix the one place that uses `ioQuery` with an argument.
2017-05-15 21:11:38 -07:00
Ray Schamp
a4f095db5e Use ES6 style classes 2017-04-17 19:42:48 -04:00
Ray Schamp
e01c4ae108 Pass with --fix 2017-04-17 15:10:04 -04:00
Rasmus Haglund
b693d4f4ef Fix rounded get size reporting 2017-04-08 19:35:29 +02:00
Eric Rosenbaum
092084cc6b Merge pull request #513 from ericrosenbaum/feature/loudness
Add loudness block
2017-04-07 14:06:18 -04:00
Eric Rosenbaum
b74c03dbbd Loudness returns -1 if no audio engine exists
To match Scratch 2.0 behavior
2017-03-27 13:20:44 -04:00
Silly Inventor
77775cdadb Switch to using number directly, instead of toNumber for costume switch (#499) 2017-03-23 18:34:04 -04:00
Eric Rosenbaum
b4a94c266f Add loudness block 2017-03-20 17:01:44 -04:00
Eric Rosenbaum
106db6a024 Clamp range for each audio effect 2017-03-20 14:53:04 -04:00
Eric Rosenbaum
c9338f37ed Clamp tempo range
The function in AudioEngine for change tempo can now be removed
2017-03-17 18:13:33 -04:00
Eric Rosenbaum
f2ac365859 Clamp beat durations for play note, play drum and rest 2017-03-17 17:29:23 -04:00
Eric Rosenbaum
1ba7ad0218 Clamp range for “play note” input
Clamp to 36-96, which is C2-C7.

This is a temporary fix to prevent errors, until we have a new instrument player implementation, which may have a different range.
2017-03-17 17:23:53 -04:00
Chris Willis-Ford
a56db95aba Merge pull request #446 from magmaboat/hasownproperty
Perform hasOwnProperty validation
2017-02-22 13:55:54 -08:00
Eric Rosenbaum
99be466aa7 Merge pull request #444 from ericrosenbaum/bugfix/playnote-volume
Pass volume to audioengine playnote
2017-02-10 14:09:55 -05:00
Magmaboat
85eee4f18e Perform hasOwnProperty validation 2017-02-09 21:12:47 -05:00
Eric Rosenbaum
cd750b5dda pass volume to audioengine playnote 2017-02-09 14:52:15 -05:00
Chris Willis-Ford
cde9ebd6bf Merge pull request #442 from griffpatch/bug/PenColorOpacity
Bug pen opacity reset
2017-02-09 07:53:15 -08:00
griffpatch
2ba177aa0f Bug - Return pen opacity to opaque
When setting the pen color using pen blocks, the opacity should be reset
to fully opaque if no alpha is supplied.
2017-02-09 08:50:37 +00:00
griffpatch
9cb595312e Implement "Stop this script" function
Existing implementation incorrectly terminates the entire thread.
See: http://llk.github.io/scratch-vm/#144142535
2017-02-08 09:44:10 +00:00
Andrew Sliwinski
92ff57de7d Add basic test coverage for the sound blocks 2017-02-03 17:39:36 -05:00
Eric Rosenbaum
9741dc2e35 Merge branch 'develop' of https://github.com/LLK/scratch-vm into sound 2017-02-02 16:37:07 -05:00