Commit graph

352 commits

Author SHA1 Message Date
Eric Rosenbaum
f90807e8a4 add get sound index by name 2016-12-21 16:42:19 -05:00
Eric Rosenbaum
f2793a1d59 Merge branch 'develop' of https://github.com/LLK/scratch-vm into sound
# Conflicts:
#	package.json
#	src/engine/runtime.js
#	src/sprites/clone.js
2016-12-21 15:29:57 -05:00
Ray Schamp
e9da046969 Report full sprite info in targetsUpdate
We need more than just the name for the initial render, so send everything consistent with sprite info reports.
2016-12-07 17:11:08 -05:00
Ray Schamp
adaf2df743 Emit sprite info report for all sprites
This allows costume data to reach listeners even when the sprite isn't the editing target.

Filter out non-editing target reports in the playground to match previous behavior.
2016-11-30 13:21:00 -05:00
Ray Schamp
ce17fdbd30 Include costume data in sprite info reports
Also emit the report on all costume changes
2016-11-30 13:19:49 -05:00
Ray Schamp
d00cdd6b2c Account for done threads on threadCount update
Also rename inactiveThreads -> doneThreads, since this describes them better. They are the threads that have completed in the step.
2016-11-28 10:49:05 -05:00
Ray Schamp
0003b294cb Lint 2016-11-24 10:36:30 -05:00
Ray Schamp
55ac7e269c Add PROJECT_RUN_START/STOP events
These events signal when any threads are running or when all threads have stopped running. This maps to whether the green flag or the stop button should be illuminated in the GUI.
2016-11-23 15:47:49 -05:00
Ray Schamp
2ff719f2ba Fix consistency of existing emits 2016-11-23 15:43:05 -05:00
Tim Mickel
a767c5ec79
Keep min and max scale in relative bounds as in Scratch 2.0 2016-11-14 12:20:29 -05:00
Tim Mickel
4deee071b2 Don't copy threads in step; stable restartThread (#331) 2016-11-10 15:05:49 -05:00
Ray Schamp
2c3e4536eb Merge pull request #316 from tmickel/feature/remove-empty-project
Remove empty project
2016-11-10 12:56:31 -05:00
Tim Mickel
b99f089ae7 Fix #327, "switch costume to [next/previous]" (#330) 2016-11-09 11:22:17 -05:00
Tim Mickel
f235cb47e6
Merge remote-tracking branch 'LLK/develop' into feature/remove-empty-project
# Conflicts:
#	src/index.js
2016-10-31 10:39:36 -04:00
Eric Rosenbaum
6dadaba117 onStopAll function for stop button 2016-10-27 16:28:39 -04:00
Eric Rosenbaum
1e5555e96d add volume and tempo blocks 2016-10-27 11:31:22 -04:00
Tim Mickel
0ede7e6ca1 Rename and delete sprites (#319)
* Add function to rename sprites

* Add delete sprite function

* Add `isSprite` helper and duplicate check for rename
2016-10-26 13:27:24 -04:00
Tim Mickel
56ef01745f Implement sprite info emitting and posting (#320) 2016-10-26 13:27:12 -04:00
Tim Mickel
1dc4aaa2d7 Remove rAF usage and inline into _step (#318) 2016-10-26 11:32:15 -04:00
Tim Mickel
2f0ce7137c Rename Clone -> RenderedTarget (#317) 2016-10-26 11:19:43 -04:00
Tim Mickel
6e9b3f262c Divide rotation center by bitmap resolution (#309) 2016-10-26 10:38:24 -04:00
Tim Mickel
d75f1c5965
Remove empty project 2016-10-26 10:30:16 -04:00
Tim Mickel
cf20ca1add Fix #313 (block specs in shadow) (#315) 2016-10-26 10:26:56 -04:00
Tim Mickel
28a0831e8d Fix 1-1 in daysSince2000 2016-10-26 10:26:03 -04:00
Tim Mickel
5103cfb853 Address #299 and #300 (#314)
* Place clones behind sprite

* Disallow stage from cloning itself
2016-10-26 10:06:58 -04:00
Liam
f75577bcbe Implement '(attribute) of' sensing block (#311)
* Implement '(attribute) of' sensing block

* Remove unused util parameter
2016-10-24 20:37:27 -04:00
Eric Rosenbaum
90867cd14e convert string to number for sound index 2016-10-24 17:00:51 -04:00
Andrew Sliwinski
1b4a1ca1bc Resolve merge conflicts 2016-10-24 15:53:42 -04:00
Andrew Sliwinski
153df22918 Address feedback from PR review 2016-10-24 15:16:06 -04:00
Ray Schamp
659014b45f Fix typo 2016-10-24 14:07:38 -04:00
Ray Schamp
d2a0e6fa2d Disable no-useless-call in case of behavior change 2016-10-24 13:01:57 -04:00
Ray Schamp
22bf947ddb Revert no-lonely-if 2016-10-24 13:01:41 -04:00
Andrew Sliwinski
279a9560af Resolve JSDoc lint errors 2016-10-24 12:04:06 -04:00
Andrew Sliwinski
336bc65e2d Add minimal test coverage and docs for mouse module 2016-10-24 11:56:52 -04:00
Ray Schamp
04d7f4f019 Use consistent function declaration style 2016-10-24 11:49:34 -04:00
Andrew Sliwinski
2de58050dd Conform JSdoc for keyboard module to format used elsewhere 2016-10-24 11:40:07 -04:00
Ray Schamp
9f0c4eb098 Update to eslint-config-scratch 2.0
We are on a fast release cycle here.
2016-10-24 11:39:39 -04:00
Ray Schamp
63cfa4229a Fix space-infix-ops
http://eslint.org/docs/rules/space-infix-ops
2016-10-24 11:19:07 -04:00
Ray Schamp
7712b2902f Fix quote-props 2016-10-24 11:02:19 -04:00
Ray Schamp
14a2dbc50f Revert no-lonely-if 2016-10-24 10:28:31 -04:00
Ray Schamp
73edb65c4d Replace console with minilog 2016-10-23 22:20:30 -04:00
Ray Schamp
f6c0064235 All linting other than console statements 2016-10-23 22:20:29 -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
Andrew Sliwinski
faf8a898a0 Add minimal test coverage and docs for keyboard module. 2016-10-21 18:31:07 -04:00
Tim Mickel
84bd42d734 Functions to add Sprite2/costumes/backdrops (#291)
* Functions to add Sprite2/costumes/backdrops

* Have sb2import return the top-level target
2016-10-20 11:44:01 -04:00
Tim Mickel
3d57c2e74c Drop single-stepping and pause modes (#294) 2016-10-20 11:42:16 -04:00
Tim Mickel
9af9a87cb6 Pass rotation center and bitmap resolution to renderer (#288) 2016-10-19 17:01:48 -04:00
Eric Rosenbaum
0858a22ffb adding theremin block and set instrument 2016-10-19 15:44:30 -04:00
Tim Mickel
e49f076fa1 Interpreter fixes, enhancements, features (#280)
* Thread stepping rework; interp.redraw equivalent

* Add turbo mode and pause mode

* Yielding behavior to match Scratch 2.0

* Implement warp-mode procedure threads

* Add check for recursive call

* Inline wait block timer

* Revert to setInterval and always drawing

* Restore yielding in glide

* 30TPS compatibility mode

* 5-call count recursion limit

* Removing dead primitive code

* To simplify, access runtime.threads inline in `stepThreads`.

* Warp mode/timer fixes; recursive check fixes; clean-up

* Add basic single-stepping

* Add single-stepping speed slider

* Allow yielding threads to run in single-stepping

* Restore inactive threads tracking for block glows

* Add clock pausing during pause mode

* Documentation and clean-up throughout

* Don't look for block glows in `thread.topBlock`.

* Add null check for block glows; rename `_updateScriptGlows` to reflect block glowing

* Use the current executed block for glow, instead of stack

* Add more comments to `stepToProcedure`, and re-arrange to match 2.0

* Tweak to Blocks.prototype.getTopLevelScript

* Revert previous

* Fix threads array to be resilient to changes during `stepThreads`

* Restore inactive threads filtering

* Fix typo in "procedure"

* !! instead of == true
2016-10-17 23:23:16 -04:00
Tim Mickel
060d1ab2a5 Updated blocks for new renderer features (#257)
* Add "touching" block, layers blocks

* Keep in fence, if on edge bounce, fix to touching edge

* Fix degtoRad in "if on edge, bounce"

* Fixes from review
2016-10-17 23:17:55 -04:00