Commit graph

4896 commits

Author SHA1 Message Date
Christopher Willis-Ford
47b46fb1aa Update Webpack config like scratch-storage
- Move build outputs into `dist/`
- Make build output file names more consistent
- Update `playground/index.html` for new output file name
- Explicitly specify target => Node output is much smaller
- Minor fixes / cleanup in `.gitignore` and `src/index*.js`
2016-12-12 12:06:05 -08:00
Tim Mickel
b35f684478 A start on SVG "quirks mode" ()
* Start of an SVG rendering quirks mode

* Provide font defaults in SVG quirks mode

* Remove svg-to-image dependency

* Remove fonts and use package fonts instead.

* try/finally for getBBox
2016-11-07 17:40:59 -05:00
Chris Willis-Ford
8be289b7ee Merge pull request from cwillisf/watch-poll
Windows compat: Tell webpack-dev-server to poll
2016-11-02 14:02:31 -04:00
Chris Willis-Ford
722d7224f9 Merge pull request from cwillisf/whirl-direction
Change whirl direction to match Scratch 2.0 3D
2016-11-02 14:02:22 -04:00
Christopher Willis-Ford
85bdbdb721 Windows compat: Tell webpack-dev-server to poll
When running on Windows, Webpack seems to more reliably notice altered
files when running in polling mode. We already use the `--watch-poll`
argument in the `watch` script, but this change adds equivalent settings
to the config used in the `start` script by `webpack-dev-server`.
2016-11-02 10:39:10 -04:00
Christopher Willis-Ford
6c4715f793 Change whirl direction to match Scratch 2.0 3D
The whirl effect's direction was reversed in Scratch 2.0 with the
introduction of Stage3D. This "bug" has existed for long enough to
become the expected whirl direction. This change adjusts the Scratch 3.0
whirl direction to match the Scratch 2.0 3D whirl direction instead of
the Scratch 2.0 2D whirl direction.
2016-11-02 10:32:40 -04:00
Tim Mickel
be6d2dc4e4 Bounding-box optimizations for touching color, touching drawables ()
* Add Rectangle utility and use it in Drawable.getBounds

* Add `getAABB`, `getFastBounds`.

* Add width and height getters to Rectangle

* Add rectangle clamp

* Optimized isTouchingColor

* Optimized isTouchingDrawables

* Rectangle.ceil -> Rectangle.snapToInt

* Refactor to common _touchingQueryCandidates

* Split helper into two
2016-10-24 13:19:20 -04:00
Tim Mickel
2cffa7b643 Add rotation center and bitmap/costume resolution () 2016-10-19 17:02:04 -04:00
Ray Schamp
a484fda1a6 Merge pull request from rschamp/Makefile--
Replace Makefile with npm scripts
2016-10-18 09:44:44 -04:00
Ray Schamp
662ba3c645 Replace Makefile with npm scripts
Allows Windows users to run what's currently in the Makefile
2016-10-17 09:56:32 -04:00
Tim Mickel
85c8b599a0 Update dirty transform before calculating bounds () 2016-10-12 15:20:40 -04:00
Tim Mickel
8e7a85d1a6 Fix y coordinates of bounding box () 2016-10-12 14:32:14 -04:00
Tim Mickel
c00f0f55fc Math.max mix-up
Bounding to a minimum, we should use `Math.max`...
2016-10-12 13:46:32 -04:00
Tim Mickel
1fa97d248b Expose skin/costume size ()
* Expose skin/costume size

* Return skin size as a copy
2016-10-11 18:43:57 -04:00
Tim Mickel
a62d52a2d0 Calculating tight bounding boxes for Drawables () 2016-10-11 18:14:14 -04:00
Tim Mickel
f1ac1a8211 Add RenderWebGL.prototype.isTouchingDrawables () 2016-10-11 18:13:46 -04:00
Tim Mickel
14018f5ff6 Apply ghost effect after discard () 2016-10-11 17:37:28 -04:00
Tim Mickel
7629b2ab6d Add setDrawableOrder for layering ()
* Add `setDrawableOrder` for layering

* Add 0-limit for newIndex
2016-10-07 17:57:47 -04:00
Ray Schamp
d261b57cd1 Merge pull request from LLK/npm
Publish to NPM and Github Pages
2016-09-27 10:28:17 -04:00
Ray Schamp
d813dd9191 Lint 2016-09-27 09:42:04 -04:00
Ray Schamp
053092c85b Alphabetize 2016-09-27 09:29:42 -04:00
Ray Schamp
9fa35524de Be accurate in version comment 2016-09-27 09:22:01 -04:00
Ray Schamp
d7d1f92a13 Remove empty dependencies field 2016-09-27 00:53:25 -04:00
Ray Schamp
59337ef8b5 Update version format for usage with semver
Tracking the version under one `-prerelease` channel allows other packages to depend on `^0.1.0-prerelease` for the most up to date version.

Track the git sha for the release in package.json

Reuse the json package needed for writing the sha to retrieve the package.json version field
2016-09-27 00:52:27 -04:00
Ray Schamp
09dc67fa83 Set playground as dev server content base
For consistency with scratch-vm.
The redirect from index to playground was already unnecessary.
2016-09-26 11:58:26 -04:00
Ray Schamp
856f919970 Add explanatory comments, update gh-pages message 2016-09-25 13:52:40 -04:00
Ray Schamp
9f26ab17eb Publish playground to gh-pages 2016-09-24 15:26:37 -04:00
Ray Schamp
d91ddf4158 Publish to NPM 2016-09-24 15:26:37 -04:00
Ray Schamp
201ceaba77 Merge pull request from rschamp/build-dist
Use path to webpack for postinstall
2016-09-20 16:48:10 -04:00
Ray Schamp
a6c8be8226 Use path to webpack for postinstall 2016-09-20 16:25:24 -04:00
Ray Schamp
89402a88c7 Merge pull request from LLK/build-dist
Build module to be imported
2016-09-20 15:39:05 -04:00
Ray Schamp
278cddf04e Build module to be imported
If another package wants to import `src/index.js`, it needs to replicate the loader config in `webpack.config.js`. To avoid this, package the module in `dist.js` and set that as the module to require.

I changed `main` to point to this so that other packages can just `require('scratch-blocks')`, but it would also work for our purposes to add `"webpack": "./dist.js"` if we want to keep `src/index.js` as `main`.
2016-09-20 09:13:35 -04:00
Tim Mickel
fb3f677e2c Remove worker support ()
* Remove WebWorker support

* Recompile Sept. 14
2016-09-15 19:01:44 -04:00
Tim Mickel
a5fb65ebeb Recompile 3 Sept. 12 () 2016-09-12 12:24:51 -04:00
Tim Mickel
2b81b791b3 Use the right skin format in playground demo () 2016-09-12 12:08:56 -04:00
Tim Mickel
042f0f0353 Fix asset URL handling from ()
* Fix URL handling of assets

* Recompile 2 Sept 12
2016-09-12 11:55:08 -04:00
Tim Mickel
69821db56f Recompile Sept 12 () 2016-09-12 11:06:53 -04:00
TheBrokenRail
3277584da9 Offline Sprites ()
* Added Scratch Cat SVG

* Offline Scratch Cat

* Moved To SRC

* Update README.md

* Delete Travis

* Add Travis YML

* Recompile

* Add files via upload

* Recompile Part 1

* Recompile Part 1

* Recompile Part 1

* Recompile Part 1

* Recompile!

* Not Needed

* Recompile For Real

* Update README.md

* Added Stage Offline

* Less Hacky Offline

* Recompile

* Fixed Line Length
2016-09-12 11:03:57 -04:00
Andrew Sliwinski
19bb8b99c3 Build 2016-08-08 15:00:04 -04:00
Andrew Sliwinski
bf26fe41e8 Update demo worker based on feedback from @cwillisf 2016-08-08 14:59:51 -04:00
Andrew Sliwinski
92fc916b86 Synchronize with master branch 2016-08-08 14:58:35 -04:00
Andrew Sliwinski
f5cd625be8 Fix issue in worker where 'window' is undefined 2016-08-08 14:28:06 -04:00
Andrew Sliwinski
b8cc5f5245 Update documentation in README 2016-08-08 14:23:25 -04:00
Andrew Sliwinski
47b5d07497 Update gitignore 2016-08-08 14:23:01 -04:00
Andrew Sliwinski
672947ca56 Normalize build result naming to match VM conventions 2016-08-08 14:22:54 -04:00
Andrew Sliwinski
fc7db05978 Add Travis configuration 2016-08-08 14:22:21 -04:00
Andrew Sliwinski
3dca142bb9 Move “demo” into “playground” directory as to match VM and Blocks 2016-08-08 14:22:06 -04:00
Andrew Sliwinski
894ada4960 Move development dependencies into “devDependencies” in package.json 2016-08-08 14:21:21 -04:00
Andrew Sliwinski
86ae0d63e3 Remove unused test commands and clean-up Makefile 2016-08-08 14:21:01 -04:00
Andrew Sliwinski
5c75fc0112 Remove IDEA IDE specific configuration files. 2016-08-08 14:20:32 -04:00