Commit graph

228 commits

Author SHA1 Message Date
Eric Rosenbaum
ed650ba487 Merge remote-tracking branch 'LLK/develop' into develop 2016-10-05 17:16:13 -04:00
Tim Mickel
5728d648b1 Ensure clone.effects is defined on each instance (#225)
* Ensure clone.effects is defined on each instance

* Add regression test for GH-224
2016-10-03 10:16:43 -04:00
Tim Mickel
2226fda19e Implement rotation style (#223) 2016-09-28 17:09:04 -04:00
Tim Mickel
d10ba11c8f Round costume values (#221) 2016-09-28 16:43:12 -04:00
Tim Mickel
a585a08a93 Remove extra calls to updateAllDrawableProperties (#222) 2016-09-28 16:43:04 -04:00
Eric Rosenbaum
6988cfc0d3 starting to load sounds from project files 2016-09-28 16:42:25 -04:00
Tim Mickel
a118d50056 Variables and lists (#187)
* Import lists and variables from SB2

* Switch to Variable and List objects

* Add Clone.lookupOrCreateVariable, Clone.getVariable, Clone.setVariable

* Add (get, set, change) variable blocks.

* Copy variables and lists on clone instantiation

* Move variable options closer to blocks

* Add list primitives

* Move variable and lists storage to `Target` instead of `Clone`

* Move _computeIndex to a Cast function

* Rename `getList` -> `getListAsString`

* Renames renames

* Remove extra check in Cast.isNaN
2016-09-21 16:38:33 -04:00
Tim Mickel
aa5e8d2648 Clear graphic effects on green flag (#199) 2016-09-21 16:31:07 -04:00
Ray Schamp
499ba5235c Scope renderer to instance
This allows usage without global scope to attach a renderer to the VM. It also provides the ability to have multiple VMs/renderers to be used at once.
2016-09-20 02:52:33 -04:00
Tim Mickel
9744bcbb70 Clones (#150)
* Provide property to Clone to distinguish "original" clones

* Provide method to clone a clone's properties

* Don't report clones in the UI target list

* Add target info to Thread

* Allow hats to skip clones (for green flag)

* Green flag skips clones

* Implement "create clone" and hat

* Pass the runtime to sprites and clones (for start hats)

* Clone disposal; trigger hats after drawable initializes.

* Separate stop threads for target; fix handling of stop button

* Remove extraneous `skipClones` property

* Add global clone limit

* Don't allow a non-clone to delete itself.

* Rename `cloneClone` -> `makeClone`

* Variable updates in runtime.js

* Synchronous drawable initialization (until we put it back to promises)
2016-09-15 19:37:12 -04:00
Tim Mickel
542899949e Update for RenderWebGLLocal -> RenderWebGL (#181)
* Update for RenderWebGLLocal -> RenderWebGL

* Move button under title
2016-09-15 19:02:03 -04:00
Tim Mickel
bbea1af5a3 Better shadow evaluation (#160)
* Better shadow evaluation

* Audit and improve casting for all primitives

* Force repeat times to int

* Remove colorPicker shadow menu
2016-09-12 13:14:16 -04:00
Tim Mickel
d93eeed05d More color utilities, touching color, color touching color (#155)
* Fill out color utilities

* Amend Color.decimalToHex name

* Add `Cast.toScaledRgbColor`

* Add touching color, color touching color blocks

* Fix scale of Cast.toRgbColor

* Fix format of colors to use renderer-style lists

* Update `Color.decimalToRgb`

* Lint self
2016-09-12 10:58:50 -04:00
Tim Mickel
797f844de3 Stage, costumes, backdrops (#149)
* Add `Clone.prototype.getCostumeIndexByName`, keep in range

* Add basic costume primitives from Scratch 2.0

* Add costume getter block

* Add properties and methods for distinguishing stage and sprites-vs-clones

* Add backdrop-related looks blocks

* Fix up "switch to backdrop" to be working

* Costume/backdrop reporters are 1-indexed

* Fire "when backdrop switched" hats

* Cut cloning helpers for a separate PR

* Disable many blocks on the stage

* Refactor into _setCostumeOrBackdrop; implement switch backdrop and wait

* Fire hats even when backdrop unchanged
2016-09-08 09:40:27 -04:00
Tim Mickel
ad82a5cb74 Add naming mechanism for targets/clones 2016-08-31 11:50:10 -04:00
Tim Mickel
8339e2769f Clean up and add documentation to sprite/clone 2016-08-31 11:30:09 -04:00
Tim Mickel
be06078df1 Update sprite and clones to have basic costume support 2016-08-31 11:21:32 -04:00
Tim Mickel
2c031d87f6 Make renderer/self nullable in the Clone
Fixes a test issue where renderer is not necessarily defined.
2016-08-08 18:29:44 -04:00
Tim Mickel
67c3ceff86 Update clone's scale to match renderer update 2016-08-08 16:47:52 -04:00
Tim Mickel
c650de8520 Real version of Clone.prototype.setVisible 2016-07-13 16:52:46 -04:00
Tim Mickel
7c24bdc612 More documentation in sprite, clone 2016-07-06 14:09:06 -04:00
Tim Mickel
798368b6c5 Add documentation in src/sprites/clone.js 2016-07-06 13:57:58 -04:00
Tim Mickel
460760bd06 Stub "say" and "think" blocks with console.log 2016-07-06 13:47:32 -04:00
Tim Mickel
ce941c6fd8 Add show/hide blocks using ghost effect as backend 2016-07-01 12:56:59 -04:00
Tim Mickel
1eaed6fff3 Implement graphic effects and size blocks 2016-06-30 18:59:47 -04:00
Tim Mickel
727d2c0d23 Clamp clone direction like Scratch 2.0 2016-06-30 18:59:47 -04:00
Tim Mickel
19da0b0032 Add renderer demo using scratch-render-webgl 2016-06-30 18:59:47 -04:00
Tim Mickel
809528abdc Straw-man implementation of targets/sprites/clones 2016-06-30 18:59:17 -04:00