Commit graph

13 commits

Author SHA1 Message Date
Eric Rosenbaum
2d8491123e Merge branch 'develop' of https://github.com/LLK/scratch-vm into sound 2017-01-30 11:28:52 -05:00
Christopher Willis-Ford
369c02b5d5 Implement pen blocks
These blocks implement pen features as found in Scratch 2.0

Supporting changes include:
- `Target` is now an event emitter
- `RenderedTarget` now emits an event when it moves
- `Target` can now store arbitrary "extra" data, called "custom state"
  in the code, using a `Target`'s `setCustomState` and `getCustomState`
  methods. This is used to store per-target pen state without requiring
  `Target` or `RenderedTarget` to know anything about the pen.
- `Cast` can now cast to an RGB color object.
- `Color` now has functions to convert between RGB and HSV, constants
  for for black & white, and a `mixRgb` function to lerp between two
  colors.
2017-01-19 11:51:22 -08:00
Eric Rosenbaum
3344c92f7e change ‘drumtype’ to ‘drum’ in specmap 2017-01-10 18:00:02 -05:00
Eric Rosenbaum
f0e01d3e87 fix name of sounds menu 2016-12-22 14:12:20 -05:00
Ray Schamp
7712b2902f Fix quote-props 2016-10-24 11:02:19 -04:00
Ray Schamp
68ed110b49 Pass with eslint --fix
Resolved whitespace issues, e.g., space-before-function-paren and key-spacing
2016-10-23 12:41:45 -04:00
Tim Mickel
8c654bbe60 Procedure blocks (#264) 2016-10-13 13:11:26 -04:00
Tim Mickel
0a66c62f6a Mutations in block representation; an unfeatured procedure call (#212)
* Add scratch3_procedures and no-op for defnoreturn

* Add mutation adapter to parse mutations in CREATE/CHANGE events

* Add mutation-to-XML

* Update spec map for Blockly procedure names

* Placeholder for procedure special cases

* Basic stepping to procedures

* Remove extra case

* Validation for changeBlock
2016-10-03 17:43:24 -04:00
Tim Mickel
c02ee88d02 Add some more info/links to sb2specmap (#197) 2016-09-19 15:24:46 -04:00
Tim Mickel
6b3f0d3d8a Playground update; update SB2 spec map for list, _ of _ blocks (#184)
* Playground update

* Update SB2 spec map for list, _ of _ blocks
2016-09-15 17:10:32 -04:00
Tim Mickel
1ebee14eb0 Update sb2specmap.js for droppable broadcast (#182) 2016-09-14 16:43:21 -04:00
Tim Mickel
3dbfc3fdb6 Tweaks from SB2 importer audit (#137)
* Fix SB2 variable imports!

* Fix expectedArg field types

* motion_pointindirection uses math_angle

* Fix "think for secs" expected input

* Add handling for empty input case (empty if-else, for example)

* Fix opcodes for if_else, repeat_until, set tempo

* Specialized number fields for SB2 import

* Convert color picker numbers to hex in SB2 import

* KEY_OPTIONS -> KEY_OPTION

* Backdrop blocks get BACKDROP

* Update toolbox XML to match naming changes

* Merge in math_angle case

* Move color converter to its own utility

* Fix merge conflicts

* Add negative color check.

* Fix keyoptions naming

* Pen JSON tweak post-scratch-blocks update
2016-09-06 11:46:10 -04:00
Tim Mickel
c70e9759a9 Add initial SB2 importer and spec map 2016-08-31 13:56:05 -04:00