386 Commits

Author SHA1 Message Date
Karishma Chadha
39ce51c6f0 Store offsets for each layer group and use full draw list for updates. 2018-05-20 18:56:39 -04:00
DD
71ecef29a2 Merge branch 'develop' into removeRenderQuirks 2018-05-16 15:16:11 -04:00
DD
528ae873d7 Remove speech bubbles' reliance on svg quirks mode's _transformText 2018-05-16 15:00:04 -04:00
Karishma Chadha
b7ac54293d @type tag does not permit descriptions. 2018-05-16 11:17:57 -04:00
Karishma Chadha
2a4f6f9f02 Add layer groups to control explicit and implicit layer ordering. 2018-05-15 22:06:27 -04:00
Paul Kaplan
d35a3205bd Actually fix the font in the say bubbles 2018-05-11 14:41:39 -04:00
Paul Kaplan
e8ba24a43e Prevent errors when testing empty silhouettes 2018-05-11 14:05:16 -04:00
Paul Kaplan
905a346161 Subvert the font converter to maintain the font in text bubbles 2018-05-11 13:23:13 -04:00
DD
3be6a4d4a8 Fix jsdoc 2018-05-04 10:22:47 -04:00
Paul Kaplan
c85a13958a
Merge pull request #267 from paulkaplan/sudo-fix-color-bug
Fix color inversion bug on mobile
2018-05-02 07:43:22 -04:00
Paul Kaplan
0b849296c0
Merge pull request #268 from paulkaplan/fix-blurry-fullscreen
Scale the drawable scale by the ratio of pixel size to native size.
2018-05-02 07:43:07 -04:00
Paul Kaplan
085931cb4f Scale the drawable scale by the ratio of pixel size to native size.
This makes the vector sprites not blurry in fullscreen mode
2018-04-30 16:33:35 -04:00
Paul Kaplan
bd8ca26bb7 Fix color inversion bug on mobile 2018-04-30 15:54:13 -04:00
Mx Corey Frang
2b8371e5af
Rewrite isTouchingDrawables on CPU (#263)
* avoid gl.readPixels at all costs
2018-04-27 16:19:25 -04:00
DD
26f2039f39 We decided that it should not be the renderers responsibility to know a detail about how the paint editor works, and have the bitmap resolution passed in instead 2018-04-26 17:58:48 -04:00
DD Liu
d9c5b595a2
Merge pull request #264 from fsih/updateBitmap
Add updateBitmapSkin to renderer
2018-04-25 14:11:57 -04:00
DD
a49c455d9b Update bitmap 2018-04-24 17:01:59 -04:00
Karishma Chadha
ac1f5564a3 Bitmap (+ double resolution) support. 2018-04-22 21:30:28 -04:00
Karishma Chadha
1f574d6ee3 Provide an api to get the calulated rotation center from the rendered costume 2018-04-20 00:01:41 -04:00
Paul Kaplan
bbcf6f73d3 Add method for getting the size of a skin by skin id.
Renamed the `getSkinSize` method to `getCurrentSkinSize`, since it was
using the drawables current skin. Added a new `getSkinSize` method that
works by skin id.
2018-04-10 10:00:54 -04:00
Paul Kaplan
e02cc5ae03
Merge pull request #248 from paulkaplan/fix-bubble-bounds
Add "get bounds for bubble" method.
2018-03-23 14:35:52 -04:00
Paul Kaplan
0b731b92a6 Add "get bounds for bubble" method.
Note there was an inconsequential coordinate flip in the original
transformation code, which was fixed in order for the sliced bounds to
work. The change is at line 388
2018-03-23 10:58:21 -04:00
Chris Willis-Ford
57d834c42e
Merge pull request #235 from mzgoddard/calc-transform-cache
Drawable _calculateTransform cache and inline work
2018-01-24 15:41:31 -08:00
Chris Willis-Ford
f8c781c163
Merge pull request #227 from cwillisf/use-browser-field
Update packaging to use UMD and the browser field
2018-01-24 15:21:16 -08:00
Michael "Z" Goddard
b59b5a3075
Put Drawable skin scale updating behind dirty flag
- Clean out "showing your work" in calculate transform
- Add comments on inline math blocks from twgl
2018-01-23 14:15:59 -05:00
Michael "Z" Goddard
46bc30e4ee
Inline most calculateTransform math 2018-01-23 14:14:38 -05:00
Michael "Z" Goddard
40ab1bd59d
Cache drawable's rotation matrix and rotation center vector
Building a rotation matrix needs to call trigonometry functions. Cache the
resulting matrix to save future time on non-rotation motion.
2018-01-23 14:14:01 -05:00
DD
d46cc4fec7 Merge branch 'develop' into pull231 2018-01-19 17:33:17 -05:00
DD
008abed073 correct case 2018-01-19 17:19:58 -05:00
Paul Kaplan
8a04fcd541 Cache image element in the SVG renderer. 2018-01-17 09:46:07 -05:00
Christopher Willis-Ford
89b5ed32d0 First pass at re-rasterizing SVGs when scaled 2018-01-17 01:05:44 -05:00
Christopher Willis-Ford
bc423cef46 Use require, not import, for SVG renderer 2018-01-12 13:12:55 -08:00
Christopher Willis-Ford
f45442f879 Merge branch 'develop' into extract-svg-renderer 2018-01-12 10:59:46 -08:00
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
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
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
140bab5965 Escape xml before putting user text into svg 2018-01-09 11:23:04 -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
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
8f3254470a Filter out drawables that are not visible. 2017-12-07 15:05:43 -05:00