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.
This commit is contained in:
Christopher Willis-Ford committed 2017-01-19 11:51:22 -08:00
1 parent d33af47a87
commit 369c02b5d5
7 files changed
+382 -6

No files matched your search

+1
View File
@@ -15,6 +15,7 @@ var defaultBlockPackages = {
scratch3_looks: require('../blocks/scratch3_looks'),
scratch3_motion: require('../blocks/scratch3_motion'),
scratch3_operators: require('../blocks/scratch3_operators'),
scratch3_pen: require('../blocks/scratch3_pen'),
scratch3_sound: require('../blocks/scratch3_sound'),
scratch3_sensing: require('../blocks/scratch3_sensing'),
scratch3_data: require('../blocks/scratch3_data'),