Commit graph

50 commits

Author SHA1 Message Date
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
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
d75f1c5965
Remove empty project 2016-10-26 10:30:16 -04:00
Ray Schamp
7712b2902f Fix quote-props 2016-10-24 11:02:19 -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
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
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
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
Tim Mickel
1e86d48a31 Clicking blocks in the toolbox (#267) 2016-10-13 17:15:49 -04:00
dekrain
91037a261e Fix relative localization for assets 2016-10-13 16:19:42 +02:00
dekrain
49d6bd3b67 Fix new project creation (#256)
* Fix new project creation

* Fix new project creation

* const -> var
2016-10-12 13:56:31 -04:00
TheBrokenRail
9b07889b3f Fix Stage PNG (#241)
* Fix Stage PNG

* Add New Stage PNG

* Remove Old Stage PNG

* Delete backdrop1.png

* Rename New Stage PNG

* Delete stage.png

* Fix Stage Resolution
2016-10-04 20:38:11 -04:00
Tim Mickel
a687184c3c Fix and improve playground threads display (#198) 2016-09-21 16:31:23 -04:00
Ray Schamp
4e547556a8 Use attachRenderer rather than the constructor
This makes the renderer optional as well as making the order of instantiation flexible.
2016-09-20 15:09:21 -04:00
Ray Schamp
fa10a2279a Only expose VirtualMachine to window for bundles 2016-09-20 10:29:47 -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
08b40b4d1d Drop worker support (#175)
* Take out worker code

* Fix Blockly event listening (minus worker)

* Recompile Sept. 13
2016-09-13 17:49:45 -04:00
Tim Mickel
79346c0925 Fixes for #138 (#166)
* Markup/CSS adjustments

* Move assets to folder

* Strip extra font-family

* More robust handling of project-load fail state

* Move empty project creation to its own function

* Move green flag/stop back out of the tab

* Restore default id
2016-09-12 12:03:24 -04:00
TheBrokenRail
40b530fa7e Offline Support [READY TO MERGE?] [ALONG WITH THE SCRATCH-RENDER PR] (#138)
* Remove Fallback Project

* Added A Newline and Removed Fallback Project

* Made The SB2 Project Import Field Fit In  More With All Other Textboxes

* Better Description Of SB2 Import Field

* Oops!

* The XML Import Area Doses Not Need To Be Resizable!

* That Didn't Work As Planned

* Now it won't rezize

* Added SB3New

* Add Code For SB3New

* Better 404

* Indentation

* NodeJS complains about quotes

* Moved And Renamed SB3New

* Renamed Refrences

* Prefix With ./

* Typo

* Newline Fix

* Scratch Cat By Default!

* Single Quotes And Max Legth Fixed

* Better Comment Above loadProject

* Move newProject to index.js

* Added Dependincies to index.js

* Deleted newProject.js

* Removed Unneeeded Semicolon

* @param {?string}

* Added SVG For Scxratch Cat

* Now Uses Scratch Cat Offline (REQUIRES PULL REQUEST MADE TO SCRATCH-RENDER TO BE MERGED OR IT WILL NOT WORK)

* Added Stage PNG

* Added Stage Creation

* Fix Sizing Issues

* Import And Compatibility With Less Hacky Image Import (Scratch-Render)

* Import And Compatibility With Less Hacky Image Import (Scratch-Render)

* Fixed Line Length

* Added Navigation Bar

* Added CSS For Drop Down Menus

* Nicer Scale

* Nicer Dropdowns

* Remobved Dropdown CSS (It Didn't Work)

* Add Scratch Player Bar CSS

* Add Scratch Player Bar HTML
2016-09-12 11:05:16 -04:00
Tim Mickel
5df0acc895 Better glows (#152)
* Strip out old script glowing in thread management

* Add new tracking mechanism for glowing scripts

* Track parents and use them to determine script glows

* Use top-block for a thread if there's nothing on the stack

* Remove `console.log`
2016-09-08 09:40:53 -04:00
Tim Mickel
ae89cfbb6b Comment nit 2016-09-02 09:47:27 -04:00
Tim Mickel
c70e9759a9 Add initial SB2 importer and spec map 2016-08-31 13:56:05 -04:00
Tim Mickel
3e749fb9f1 Add loadProject, setEditingTarget, and UI emits 2016-08-31 12:28:09 -04:00
Tim Mickel
d4a43639f3 Add editingTarget and map block events to that target 2016-08-31 12:08:54 -04:00
Tim Mickel
aebcfde492 Add VM "I/O devices", clock, mouse as demo 2016-08-15 21:37:36 -04:00
Tim Mickel
c47a061edb Updates for newly released scratch-render repo 2016-08-08 15:43:52 -04:00
Tim Mickel
9c6dca8131 Add visual reporting of top-level reporter execution 2016-07-07 19:42:38 -04:00
Tim Mickel
660029010d Feed in requestAnimationFrame events to VM
Not sure exactly how to use these yet, but it seems helpful to have them in there.
2016-07-01 11:52:43 -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
Tim Mickel
b97974e2ac Implement WebWorker interface 2016-06-21 15:30:27 -04:00
Tim Mickel
783a3688aa Update index.js to support worker environment 2016-06-21 14:48:54 -04:00
Tim Mickel
7a42e9ae68 Move blockListener to blocks.js; combine flyout listener 2016-06-08 13:44:09 -04:00
Tim Mickel
2be27cbc7d Merge pull request #57 from tmickel/feature/full-tree
Update for VM block management
2016-06-07 13:27:41 -04:00
Tim Mickel
f158af18b1 Case problem with blocks.js in index.js 2016-06-06 16:19:57 -04:00
Tim Mickel
0efe7e2b27 Fix block events for flyout blocks 2016-06-06 15:44:13 -04:00
Tim Mickel
9be33089a8 Refactor block management into a separate module. 2016-06-06 15:29:34 -04:00
Tim Mickel
e5b677c7f6 Fix naming of MOVE event in index.js 2016-06-06 14:53:27 -04:00
Tim Mickel
b28c50e6a5 Rewrite of adapter to support trees of blocks, inputs 2016-06-06 14:09:27 -04:00
Tim Mickel
9ce3783940 Fix handling of stack click
Previously was improperly reading `e.type`.
2016-06-01 13:48:54 -04:00
Tim Mickel
cfed4e1bba Add "stack click" event handler to VM
See: https://github.com/LLK/scratch-blocks/pull/360
2016-06-01 10:26:06 -04:00
Tim Mickel
11c6537f42 Add listener for new blocks that doesn't add to stacks 2016-04-29 16:49:08 -04:00
Andrew Sliwinski
981b85e78f AST create / change / move / delete from blockly 2016-04-26 09:49:52 -04:00
Andrew Sliwinski
53779220b7 WIP 2016-04-18 18:03:18 -04:00
Andrew Sliwinski
f9f47ed103 WIP 2016-04-18 17:20:30 -04:00