Commit graph

41 commits

Author SHA1 Message Date
Christopher Willis-Ford
243d68f88b Use Webpack to generate the whole playground
The previous configuration mixed Webpack output with static content in
order to create the playground. This change moves that static content
from `/playground/` into `/src/playground/` and adds a Webpack rule to
copy it into the playground as part of the build.

On the surface this might seem unnecessary, but it provides at least two
benefits:
- It's no longer possible to accidentally load stale build output
  through `webpack-dev-server` in the event of a misconfiguration. This
  was very easy in the previous configuration, and might in fact be the
  only way that `webpack-dev-server` ever worked for this repository.
- It's simpler to ensure that various rules apply to the hand-authored
  content and not build outputs. This includes lint rules, `.gitignore`,
  IDE symbol search paths, etc.
2017-02-10 14:21:37 -08:00
Chris Willis-Ford
9b04392211 Move build outputs into a dist/ subdirectory (#375)
* Move Node output: /dist.js => /dist/node/scratch-vm.js
* Move web output: /vm{.js,.min.js} => /dist/web/scratch-vm{.js,.min.js}
* Update build output references in package.json and the playground's index.html
* Move the VirtualMachine class out of index.js into its own file, referenced by index.js. The VirtualMachine class is otherwise unchanged.
* Add .gitattributes rules for new file types which were added to this repository without specifying their text/binary attributes
* Turn on source maps in webpack and add corresponding .gitignore rule
2017-01-13 13:34:26 -08:00
Tim Mickel
56ef01745f Implement sprite info emitting and posting (#320) 2016-10-26 13:27:12 -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
Tim Mickel
dcda82a009 Use default toolbox XML (#265) 2016-10-13 17:05:53 -04:00
Tim Mickel
5c6d80ab8e Toolbox update Oct 7 (#246)
* Toolbox XML update October 7

* Blocks font CSS
2016-10-07 15:51:03 -04:00
Tim Mickel
dd624aea06 Update toolbox for data_list rename (#227) 2016-10-03 11:44:08 -04:00
Ray Schamp
a99f9ad5ff Provide playground dependencies with webpack
This confines all the files the playground needs to the playground directory.
2016-09-26 09:42:37 -04:00
TheBrokenRail
470f686662 Update Playground With Procedure Blocks (#191) 2016-09-18 11:32:24 -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
6b3f0d3d8a Playground update; update SB2 spec map for list, _ of _ blocks (#184)
* Playground update

* Update SB2 spec map for list, _ of _ blocks
2016-09-15 17:10:32 -04:00
TheBrokenRail
b6e30a7b23 Added 'New Project' Button (#171)
* Added 'New Project' Button

* Added 'New Project' Button Functionality

* Changed To addEventListener

* Move To Import/Export
2016-09-13 22:04:44 -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
3dbfc3fdb6 Tweaks from SB2 importer audit (#137)
* Fix SB2 variable imports!

* Fix expectedArg field types

* motion_pointindirection uses math_angle

* Fix "think for secs" expected input

* Add handling for empty input case (empty if-else, for example)

* Fix opcodes for if_else, repeat_until, set tempo

* Specialized number fields for SB2 import

* Convert color picker numbers to hex in SB2 import

* KEY_OPTIONS -> KEY_OPTION

* Backdrop blocks get BACKDROP

* Update toolbox XML to match naming changes

* Merge in math_angle case

* Move color converter to its own utility

* Fix merge conflicts

* Add negative color check.

* Fix keyoptions naming

* Pen JSON tweak post-scratch-blocks update
2016-09-06 11:46:10 -04:00
TheBrokenRail
2b84c8d0fe Move Load SB2 To Import/Export Section (#132) 2016-09-02 14:44:39 -04:00
TheBrokenRail
8e217a75ab Variable catagory like scratch-blocks (Code From Scratch-blocks) (Create Variable Button) (#131) 2016-09-02 11:42:59 -04:00
Tim Mickel
86f136dd10 Merge pull request #115 from tmickel/feature/2.0-loader
Start of a 2.0 project loader
2016-09-02 11:16:35 -04:00
Tim Mickel
bb48189e6f CSS tweaks to import/export (#121) 2016-09-02 08:41:12 -04:00
TheBrokenRail
4586507a8a XML Import/Export (#119)
* Added Import/Export Area In Block Representations (Copied Some Code From scratch-blocks)

* Better TextArea Size For XML

* Made Import/Export It's Own Catatagory 1/3

* Made Import/Export It's Own Catatagory 2/3

* Made Import/Export It's Own Catatagory 3/3

* Added A Newline

* Removed Port 80 From StartServerWindows.bat

* </a> before <br />

* Removed taChange from HTML

* No More taChange()
2016-09-02 08:27:43 -04:00
Tim Mickel
75212c5958 Add playground tools for targets, loading 2.0 projects 2016-08-31 12:28:44 -04:00
Tim Mickel
7a44dce816 Add stats.js meter to playground 2016-08-11 22:54:57 -04:00
Tim Mickel
c47a061edb Updates for newly released scratch-render repo 2016-08-08 15:43:52 -04:00
Tim Mickel
30735bc06e Update toolbox XML July 14 2016-07-14 13:25:56 -04:00
Tim Mickel
1098178fc7 Add Blockly messages to playground 2016-07-14 13:24:39 -04:00
Tim Mickel
34c46adb9c Toolbox update 2016-07-06 13:17:14 -04:00
Tim Mickel
a47a9a9b7e Add show, hide, direction to palette 2016-07-01 12:57:13 -04:00
Tim Mickel
1eaed6fff3 Implement graphic effects and size blocks 2016-06-30 18:59:47 -04:00
Tim Mickel
7db2981ddc Add additional motion block implementations 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
ab6e0d3839 Remove YieldTimers, unused WeDo blocks 2016-06-30 18:56:31 -04:00
Tim Mickel
59ff650de1 Update playground to use unified interface and worker 2016-06-21 15:30:36 -04:00
Tim Mickel
a1be1d6566 Update playground and block implementations to match scratch-blocks 2016-06-14 18:08:41 -04:00
Tim Mickel
f2734950d7 Add tab to VM playground to show threads 2016-06-07 20:44:08 -04:00
Tim Mickel
bbc66a95a7 Add green flag and stop button to playground 2016-06-01 14:17:18 -04:00
Tim Mickel
6593c399c1 Update to use syntax highlighting in block explorer 2016-06-01 13:13:52 -04:00
Tim Mickel
4df584bc20 Turn off spell check in playground block explorer; increase font size. 2016-06-01 13:13:52 -04:00
Tim Mickel
8374d116bf Add a block representation explorer to playground 2016-06-01 13:13:41 -04:00
Tim Mickel
1c253df3a2 Add a basic demo playground with scratch-blocks 2016-06-01 13:13:41 -04:00