Commit graph

487 commits

Author SHA1 Message Date
Andrew Sliwinski
1b4a1ca1bc Resolve merge conflicts 2016-10-24 15:53:42 -04:00
Ray Schamp
595be5c193 Merge pull request #298 from rschamp/scratch-lint
Use shared lint config: eslint-config-scratch
2016-10-24 15:43:31 -04:00
Andrew Sliwinski
153df22918 Address feedback from PR review 2016-10-24 15:16:06 -04:00
Andrew Sliwinski
5b73ffa66c Add minimal test coverage for control blocks 2016-10-24 14:38:24 -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
50b896e935 Unify integration and unit tests to resolve issue with coverage reporting 2016-10-24 12:04:22 -04:00
Andrew Sliwinski
279a9560af Resolve JSDoc lint errors 2016-10-24 12:04:06 -04:00
Andrew Sliwinski
8b87b36ed3 Resolve race condition with the clock tests 2016-10-24 12:03:43 -04:00
Andrew Sliwinski
49d7ad8564 Add coverage/* to eslintignore 2016-10-24 11:58:38 -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
0e909cb9a5 Fix comma-spacing 2016-10-24 10:57:52 -04:00
Ray Schamp
14a2dbc50f Revert no-lonely-if 2016-10-24 10:28:31 -04:00
Ray Schamp
1bd1d8e8d1 Keep up with non-breaking lint changes 2016-10-23 22:21:59 -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
Ray Schamp
36e4683aa8 Install and use eslint-config-scratch 2016-10-23 12:03:59 -04:00
Andrew Sliwinski
faf8a898a0 Add minimal test coverage and docs for keyboard module. 2016-10-21 18:31:07 -04:00
Andrew Sliwinski
7e9745ce3f Add basic test coverage for clock module. 2016-10-21 12:42:32 -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
Ray Schamp
0cf21b26f0 Merge pull request #290 from rschamp/fix-playground
Prevent npm from outputting repo URL on gh-pages publish
2016-10-18 13:01:42 -04:00
Ray Schamp
bcfb4ea8c9 Add docs for publishing the playground 2016-10-18 12:57:12 -04:00
Ray Schamp
fa0918b592 Prevent npm from outputting repo URL 2016-10-18 12:56:53 -04:00
Ray Schamp
9d4eaffd43 Merge pull request #289 from rschamp/fix-playground
Fix scratch-* dependency versions for npm update
2016-10-18 12:05:21 -04:00
Ray Schamp
1b9f9e63d6 Fix scratch-* dependency versions for npm update
The issues:
* The scratch-blocks@0.1.0 version exists because I accidentally published 0.1.0 (no -prerelease modifier) while setting up NPM
* I added a step that causes Travis to run `npm update` after installing
* The "0.1.0-prepublish" dependency version makes no sense

This made Travis install the old version of scratch-blocks that I published accidentally, which breaks the playground.
2016-10-18 12:00:52 -04:00
Ray Schamp
2abfe25d6d Fix gh-pages commit messages
Don't output full logs, just the commit that the build is for. And use the author, not the committer, since GitHub is almost always the committer on develop.
2016-10-18 10:16:34 -04:00
Ray Schamp
4cb680c047 Merge pull request #276 from rschamp/Makefile--
Replace Makefile with npm scripts
2016-10-18 09:44:32 -04:00
Ray Schamp
525a230a48 Add .gitattributes so eslint can run on Windows 2016-10-18 09:38:28 -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
Tim Mickel
352c6516d3 Fix parent setting in sb2 importer (#283) 2016-10-17 16:44:33 -04:00
Cosmic Web Services
454eb904a3 Add days since 2000 block (#272)
* Add days since 2000 block

* Empty line addition

* Add semicolin

* Empty line addition

* Tabed

* Remove extra line

* Make it exactly like scratch 2 was

* Fixed spacing
2016-10-17 13:57:25 -04:00
Ray Schamp
2904152318 Merge pull request #282 from rschamp/feature/vm.clear
Add VM.clear method
2016-10-17 13:56:37 -04:00
Ray Schamp
5615583fb2 Lint 2016-10-17 13:54:27 -04:00
Ray Schamp
bd95c1461d Add VM.clear method
Use it before loading projects so targets don't accumulate when multiple projects are loaded on the same instance.

Move check to see if the clone is the original clone onto the block implementation so all clones can be removed.

Fixes #274
2016-10-17 13:43:38 -04:00
Andrew Sliwinski
1615c47d80 Merge pull request #279 from thisandagain/bugfix/229
Fix `degToRad` function definition
2016-10-17 11:56:48 -04:00
Andrew Sliwinski
9cd4d96101 Add test coverage for SB2 importer (#278) 2016-10-17 11:55:21 -04:00
Andrew Sliwinski
ace9a96fc2 Fix degToRad function definition. Resolves GH-229 2016-10-17 11:52:02 -04:00
Andrew Sliwinski
80fa2d5a58 Resolve merge conflicts 2016-10-17 10:50:24 -04:00
Ray Schamp
503de088fe Merge pull request #259 from TheBrokenRail/patch-19
Copy Assets To Playground With Webpack
2016-10-17 09:49:14 -04:00
Ray Schamp
9db0dc1bd0 Merge pull request #277 from rschamp/bettertravis
Update packages after installing
2016-10-17 09:47:10 -04:00