663 Commits

Author SHA1 Message Date
Christopher Willis-Ford
413c1d8027 Extract svg-renderer out into a separate module 2018-01-12 10:56:28 -08:00
Chris Willis-Ford
89d09e9b98
Merge pull request #226 from cwillisf/check-for-webgl-support
Check & report if browser supports this renderer
2018-01-11 11:38:57 -08:00
Christopher Willis-Ford
7dd707db17 Revert getWebGLContext => getContext change
This change allowed TWGL to create a WebGL 2 context when available and
fall back to WebGL 1 when that's the only option. This should in theory
be harmless, but deserves more extensive testing before rolling it out.
2018-01-11 10:07:42 -08:00
Chris Willis-Ford
0eeba9345e
Merge pull request #229 from LLK/greenkeeper/babel-eslint-8.2.1
chore(package): update babel-eslint to version 8.2.1
2018-01-10 20:33:32 -08:00
Chris Willis-Ford
28983666fd
Merge pull request #228 from LLK/greenkeeper/twgl.js-4.4.0
chore(package): update twgl.js to version 4.4.0
2018-01-10 20:06:08 -08:00
Christopher Willis-Ford
a38c74c2c1 Fix Drawable's use of m4 for TWGL 4.x
The `create` method of `m4` has disappeared; call `identity` instead.
2018-01-10 18:22:57 -08:00
Christopher Willis-Ford
e958e4bfff Fix playground, plus misc. cleanup
The playground was trying to build with a now-missing entry point.
Also, I fixed some JSDoc comments, added HTML labels, etc. until IDEA
had no meaningful complaints about `playground/index.html`.
2018-01-10 17:42:38 -08:00
Christopher Willis-Ford
63fc1c6f64 Update packaging to use UMD and the browser field
The web build is now packaged as UMD, and the `browser` field in
`package.json` now points to the web build output.
2018-01-10 12:58:10 -08:00
Christopher Willis-Ford
07a6ae57be Check & report if browser supports this renderer
`RenderWebGL`'s constructor will now throw if TWGL init fails. There's
also a new static method to check whether or not we expect TWGL init to
succeed.
2018-01-10 12:28:54 -08:00
Paul Kaplan
ab05c9aa32
Merge pull request #225 from paulkaplan/fix-edge
Fix working on Edge
2018-01-10 14:52:35 -05:00
Chris Willis-Ford
d7c7a56e25
Merge pull request #178 from LLK/greenkeeper/eslint-config-scratch-5.0.0
Update eslint-config-scratch to the latest version 🚀
2018-01-10 11:30:53 -08:00
Chris Willis-Ford
7571be21f0
Merge pull request #203 from LLK/greenkeeper/tap-11.0.0
Update tap to the latest version 🚀
2018-01-10 11:23:09 -08:00
Paul Kaplan
4ce8b8f655 Do not change properties on bbox directly it throws errors in edge. 2018-01-10 13:56:49 -05:00
Paul Kaplan
f5a638367f
Merge pull request #223 from paulkaplan/fix-broken-say-xml
Escape xml before putting user text into text bubble
2018-01-10 09:20:06 -05:00
Paul Kaplan
140bab5965 Escape xml before putting user text into svg 2018-01-09 11:23:04 -05:00
greenkeeper[bot]
861308c9f1 chore(package): update babel-eslint to version 8.2.1 2018-01-09 01:53:15 +00:00
greenkeeper[bot]
bf042c2362 chore(package): update twgl.js to version 4.4.0
Closes #180
2018-01-06 14:18:53 +00:00
Andrew Sliwinski
38057dd884
Merge pull request #219 from LLK/greenkeeper/webpack-3.10.0
chore(package): update webpack to version 3.10.0
2017-12-20 17:01:46 -05:00
Chris Willis-Ford
1afae3acbd
Merge pull request #204 from cwillisf/use-linear-filtering
Use bilinear filtering except when we shouldn't
2017-12-11 11:54:57 -08:00
Paul Kaplan
a0c3c3fd94
Merge pull request #213 from paulkaplan/touching-invisible
Ignore sprite visibility when testing for touching color
2017-12-11 09:16:16 -05:00
Paul Kaplan
43aa62e747 Update comment 2017-12-11 09:15:24 -05:00
Christopher Willis-Ford
96f416467d Remove 3 unnecessary blank lines 2017-12-08 16:36:04 -08:00
Paul Kaplan
1c4e166aa8 Return false instead of undefined 2017-12-08 12:38:04 -05:00
Paul Kaplan
7bb15c7444 Ignore sprite visibility for touching color 2017-12-08 12:27:45 -05:00
Paul Kaplan
71e8a23164
Merge pull request #211 from paulkaplan/do-not-pick-invisibles
Exclude hidden drawables from picking.
2017-12-08 09:02:11 -05:00
Paul Kaplan
8f3254470a Filter out drawables that are not visible. 2017-12-07 15:05:43 -05:00
Chris Willis-Ford
9a79345e75
Merge pull request #210 from cwillisf/fix-mobile-color-bug
Fix mobile color bug
2017-12-06 16:21:02 -08:00
Christopher Willis-Ford
61c75172d0 Remember: no Hungarian 2017-12-06 15:28:41 -08:00
Christopher Willis-Ford
408b259055 Simplify & document RGB->HSL conversion 2017-12-05 11:01:12 -08:00
Christopher Willis-Ford
e83673ffb8 Increase epsilon for RGB2HCV to fix mobile NaN
Some mobile GPUs end up dividing by "zero" with the previous epsilon
value. The larger epsilon doesn't cause any problems on systems which
didn't exhibit the bug (like my main dev machine).
2017-12-04 15:31:18 -08:00
greenkeeper[bot]
a60b6d75aa chore(package): update webpack to version 3.10.0 2017-12-04 19:01:40 +00:00
Paul Kaplan
cde61630ab
Merge pull request #207 from paulkaplan/double-render
Fix double render issue by clearing canvas just before drawing
2017-12-01 11:46:34 -05:00
Paul Kaplan
8caa4240ee
Merge pull request #206 from paulkaplan/fix-convex-hull-bug
Fix convex hull calculation bug
2017-12-01 11:27:07 -05:00
Paul Kaplan
101b74455c Clear the canvas just before the image is ready to draw. 2017-12-01 10:22:35 -05:00
Paul Kaplan
8a1f3306b7 Check if x has been incremented to OR above the width.
Fixes a bug with the convex hull calculation where the bounds could not
be calculated for certain costumes with non-integer sizes.
2017-12-01 08:56:12 -05:00
Christopher Willis-Ford
9307e09031 Use bilinear filtering except when we shouldn't
Use bilinear filtering unless the Drawable is angled by a multiple of 90
degrees and is either a raster image (like a BitmapSkin) or is around
its native resoluion. This makes both bitmaps and vectors look better in
most cases. This is roughly the same logic that Scratch 2.0 used; we may
want to tweak it over time to see if we can make it even better.
2017-11-29 20:55:50 -08:00
greenkeeper[bot]
e2bce19b22 chore(package): update tap to version 11.0.0 2017-11-26 01:02:13 +00:00
Chris Willis-Ford
72af98d2cf
Merge pull request #193 from griffpatch/touching-color-white
Touching color white always returns "true"
2017-11-20 17:25:42 -08:00
Chris Willis-Ford
8495c6c4e2
Merge pull request #196 from mzgoddard/alpha-shape
Emulate silhouette rendering for pick and _getConvexHullPointsForDrawable
2017-11-20 13:29:39 -08:00
Michael "Z" Goddard
59f6492742
Use isTouching methods in RenderWebGL.pick and getConvexHull
Use Drawable.isTouching and Skin.isTouching to implement pick and
_getConvexHullPointsForDrawable to emulate rendering the drawable's
silhouette and determining what is picked or the points for a convex
hull.
2017-11-20 14:00:37 -05:00
Michael "Z" Goddard
8bdf56705e
Add Drawable.isTouching
Use EffectTransform and Skin.isTouching to implement
Drawable.isTouching.

Drawable.isTouching takes a world coordinate.
2017-11-20 13:46:34 -05:00
Paul Kaplan
d7d5e75567
Merge pull request #199 from paulkaplan/fix-webpack-dev-server
Fix webpack dev server
2017-11-17 12:32:26 -05:00
Paul Kaplan
1c879f11e2 Include production=false in install 2017-11-17 11:48:56 -05:00
Paul Kaplan
0d40cc0199 Add node env to travis yml 2017-11-17 10:08:02 -05:00
Paul Kaplan
067eb1940d Only uglify if building for production.
Uglify was trying to run always, including the dev-server output, which
included es6 that broke uglifier.
2017-11-17 10:04:57 -05:00
Chris Willis-Ford
77e3d63da9
Merge pull request #195 from mzgoddard/whirl-fisheye-without-condition
Whirl and Fisheye shaders without conditions
2017-11-16 16:47:17 -08:00
Chris Willis-Ford
d99176bb5f
Merge pull request #197 from cwillisf/fix-ifyloader-windows
Fix ify-loader test on Windows / Cygwin
2017-11-16 12:00:38 -08:00
Ray Schamp
0f69cb7f7c
perf(setRotationCenter): compare new setRotationCenter values after truncating to 32bit
Compare new setRotationCenter values after truncating to 32bit
2017-11-16 09:45:06 -05:00
griffpatch
10762c7f7c Fix misunderstanding of mask3b now that I can bypass the build failure and test 2017-11-16 08:33:10 +00:00
Christopher Willis-Ford
c3445971fd Fix ify-loader test on Windows / Cygwin
On Windows and Cygwin the path to JS source files may contain
backslashes, forward slashes, or a mix. The regex used to test whether
or not to use `ify-loader` contains path separators; this change allows
either slash instead of requiring only forward slashes.
2017-11-15 17:20:54 -08:00