360 Commits

Author SHA1 Message Date
peabrainiac
fe01fea9d0
Update RenderWebGL.js 2019-03-03 18:49:04 +01:00
peabrainiac
5fb9346036
Update RenderWebGL.js 2019-03-03 18:42:10 +01:00
peabrainiac
3d373571f8
Update PenSkin.js 2019-03-03 18:40:09 +01:00
peabrainiac
152cf028cc
Update Skin.js 2019-03-03 18:39:40 +01:00
peabrainiac
147b79d319
Update RenderWebGL.js 2019-03-03 18:12:13 +01:00
peabrainiac
f2a7085492
Update RenderWebGL.js 2019-03-03 17:58:12 +01:00
peabrainiac
996a1d6cf7
Update sprite.frag 2019-03-03 17:55:55 +01:00
peabrainiac
61bf4c84c3
Update RenderWebGL.js 2019-03-02 22:35:42 +01:00
peabrainiac
7628c1e7f9
Update RenderWebGL.js
Modified blend function in `_drawThese` to blend skins with premultiplied alpha correctly
2019-03-02 20:59:00 +01:00
peabrainiac
9f7bd971c9
Update PenSkin.js
changed clearColor on `_setCanvasSize`
2019-03-02 00:29:21 +01:00
peabrainiac
44d2fdeba8
Update PenSkin.js 2019-02-27 08:48:45 +01:00
Michael "Z" Goddard
e022222365
replace Silhouette._data with Silhouette._colorData
_colorData holds the same (and more) data that _data holds. Dropping
the _data array saves a lot of memory for a tiny performance
degradation in regards to touching object.
2019-02-22 17:08:53 -05:00
Michael "Z" Goddard
be5ab2e689
receive ImageData directly in Silhouette.update
Given ImageData we can skip drawing the input and getting image data.
This can help if update's color can also use the ImageData directly.
2019-02-22 17:08:04 -05:00
Chris Willis-Ford
c9f86ef53b
Merge pull request #406 from cwillisf/playground-webpack
Add "query playground"
2019-02-14 10:33:31 -08:00
Katie Broida
1f0f89920a Always use getAABB for bitmap skins when determining fenced position 2019-02-11 11:56:59 -05:00
Christopher Willis-Ford
c390124df4 Convert 'force GPU' flag into 'useGpuMode' enum 2019-02-06 10:47:49 -08:00
Katie Broida
c8b9516219 Use Math.ceil and Math.floor to match Scratch 2 logic 2019-02-04 16:03:33 -05:00
Christopher Willis-Ford
028b4eba3f Adjust cursor coordinates for devicePixelRatio 2019-01-30 16:37:59 -08:00
Christopher Willis-Ford
59cef02fdb Mark correct viewport corners with red dots 2019-01-30 15:58:51 -08:00
Christopher Willis-Ford
99d6e46f7e Adjust rendering for crisp pixels
- Adjust the rotation center of the cursor so that its single pixel is
  gets rendered onto a single stage pixel instead of being split across
  2-4 stage pixels.
- Add canvas CSS to make most browsers scale the canvases without
  interpolation.
2019-01-30 11:00:27 -08:00
Christopher Willis-Ford
992977d6c6 Add debug canvas support to isTouching CPU path 2019-01-30 11:00:14 -08:00
Christopher Willis-Ford
a358c8f916 Lint cleanup 2019-01-28 12:25:58 -08:00
Christopher Willis-Ford
e8d71277e2 Use query playground to compare GPU vs. CPU implementations 2019-01-28 11:43:38 -08:00
Christopher Willis-Ford
fba2d90fda Stub queryPlayground.html 2019-01-25 17:28:51 -08:00
Christopher Willis-Ford
31db3d8596 Build playground using Webpack 2019-01-25 17:28:02 -08:00
Evelyn Eastmond
fc6fcd0543 Removing console log comment. 2019-01-24 10:56:11 -05:00
Evelyn Eastmond
b77f4c663a Removing console log. 2019-01-24 10:54:08 -05:00
Evelyn Eastmond
5e5a423d39 Fixing checkFramebufferstatus check. 2019-01-24 10:54:08 -05:00
Evelyn Eastmond
402cfbf99f Adding a console log for testing. 2019-01-24 10:54:08 -05:00
Evelyn Eastmond
a0dd716c23 Adding some sanity checks and error handling that aren't fully working yet. 2019-01-24 10:54:08 -05:00
Evelyn Eastmond
183919a20a Fixing a comment. 2019-01-24 10:54:08 -05:00
Evelyn Eastmond
3cfafebb2e Fixing extraction of a drawable to not clip bounds. 2019-01-24 10:54:08 -05:00
DD Liu
cc448951f9 Update silhouette after getting texture at a new scale 2019-01-22 13:58:59 -05:00
Katie Broida
2b224eb9da
Merge pull request #400 from ktbee/fence-width-compat
Add inset logic that is closer to Scratch 2's inset
2019-01-17 13:25:37 -05:00
Katie Broida
ad1b7111c8 Add inset logic that is closer to Scratch 2's inset 2019-01-17 11:59:22 -05:00
Christopher Willis-Ford
355a8c5395 Change brightness effect to match Scratch 2.0 in 2D mode 2019-01-15 19:45:45 -08:00
Paul Kaplan
bb84abab87 Revert "Merge pull request #394 from paulkaplan/defer-silhouette-updates"
This reverts commit a5f852fcc23d1c46942b68bb792d7d1b95832e50, reversing
changes made to e616ab5d35307b26d7937c89388910f06321e5e6.
2019-01-14 16:51:26 -05:00
Paul Kaplan
07544595fd Implement updateSilhouette to allow updates to happen when needed 2019-01-09 14:22:08 -05:00
Paul Kaplan
6e072ea026
Revert "Increase maximum texture size and back it off if GL fails to render" 2019-01-08 15:59:09 -05:00
DD Liu
230a68d564
Merge pull request #391 from LLK/blurrybg
Increase maximum texture size and back it off if GL fails to render
2019-01-08 12:41:49 -05:00
DD Liu
0676e0f54a Use callback for loop, and update maxTextureScale during callback 2019-01-07 10:00:31 -05:00
Karishma Chadha
ba93f21795 Fix uncaught error when drawable.skin does not exist. Log a warning in this case instead. 2019-01-06 18:02:33 -05:00
DD Liu
5be561133d Increase maximum texture size and back it off if GL fails to render 2019-01-05 00:43:55 -05:00
DD
5f38cd1ee1 Always use nearest for raster textures 2019-01-03 12:00:28 -05:00
Katie Broida
770ae92b25 Align the bounding box to the center of the pixel instead of top left 2018-12-21 16:51:36 -05:00
Florrie
4189377128 Fix empty speech bubbles showing up squished 2018-11-16 11:29:06 -04:00
Andrew Sliwinski
4ae7e32b8c
Merge pull request #354 from mzgoddard/fix-touching-mouse
Fix touching mouse
2018-11-02 08:59:07 -04:00
Andrew Sliwinski
9ab14e34dd
Merge pull request #339 from mzgoddard/round-position
Round drawable position
2018-10-29 08:52:17 -04:00
Michael "Z" Goddard
14813e590c
replace hsl color handling with hsv (#355)
Scratch 2 color and brightness effects in HSV color space.
2018-10-23 15:13:54 -04:00
Michael "Z" Goddard
bd14d53fb2
make sure drawable matrix and silhouette for mouse touching
RenderWebGL methods that test drawable touching should call
updateMatrix and updateSilhouette before calling drwaable.isTouching.
These methods are called by RenderWebGL instead of isTouching because
isTouching can be called repeatedly in quick succession. Calling update
methods in isTouching would waste a lot of cycles.
2018-10-04 11:50:38 -04:00