DD Liu
01a4057fe3
Merge pull request #621 from adroitwhiz/stamp-pen-layer-scale
...
Take render target dimensions into account when drawing
2021-06-29 17:07:45 -04:00
Christopher Willis-Ford
aaebd14ef3
Merge pull request #817 from adroitwhiz/remove-extractdrawable
...
Remove extractDrawable
2021-06-29 13:35:13 -07:00
Christopher Willis-Ford
9d64e582ea
Merge pull request #745 from adroitwhiz/remove-svgrenderer-dependency
...
Move SVG renderer logic back into SVGSkin
2021-06-29 13:27:48 -07:00
Christopher Willis-Ford
3b21ee98b6
add comment explaining onload choice
2021-06-29 13:25:20 -07:00
adroitwhiz
7af5b3e207
Use one SVG image and track loaded state w/ flag
...
Instead of creating a new image every time `setSVG` is called and
checking whether that image is complete with `loaded`, reuse the same
image, override its `src`, & use `onload` instead of `addEventListener`
to replace the previous event listener. This is necessary to avoid race
conditions with the `_svgImageLoaded` flag.
2021-06-10 08:56:15 -04:00
DD Liu
c92e9f5a4d
Merge pull request #815 from adroitwhiz/fix-resetmips-jsdoc
...
Fix JSDoc for resetMIPs and setSVG
2021-03-25 19:13:48 -04:00
adroitwhiz
e25b8946bc
Remove extractDrawable
2021-03-05 05:25:31 -05:00
adroitwhiz
801b0dab1f
Move SVG renderer logic back into SVGSkin
...
This will allow for fancier stuff to be done with the SVG viewbox in the
future to avoid subpixel jitter.
2021-03-04 11:50:07 -05:00
adroitwhiz
c6e51c2662
Fix JSDoc for resetMIPs and setSVG
2021-03-04 11:00:57 -05:00
adroitwhiz
e075e5f5eb
Add unit tests for color conversion functions
2021-02-11 18:41:20 -05:00
adroitwhiz
438e0491b7
Pass size to _drawThese when extracting drawable
2020-11-13 18:31:21 -05:00
Chris Willis-Ford
c19971b219
Merge pull request #566 from adroitwhiz/usenearest-skin
...
Move useNearest from Drawable to Skin
2020-11-13 13:03:35 -08:00
Sarah Otts
00710f3347
Fix spacing in 'You clicked on' console log
2020-11-10 09:28:26 -05:00
adroitwhiz
26fe38c0d8
Take render target size into account when drawing
2020-11-09 18:30:48 -05:00
adroitwhiz
5b36e937e2
Inline the last _getDrawableScreenSpaceScale call
2020-11-09 18:28:50 -05:00
seotts
1e5ce914a2
replace .apply() with spread
2020-11-09 17:05:56 -05:00
seotts
65fca3e3c7
fix lint errors in playground
2020-11-09 17:05:56 -05:00
seotts
ad1831ebfa
Don’t call hasOwnProperty directly on object
2020-11-09 17:05:56 -05:00
DD Liu
96f36ff50f
Merge pull request #624 from adroitwhiz/update-silhouette-differently
...
Move `updateCPURenderAttributes` calls to where they're actually needed
2020-10-29 15:49:33 -04:00
DD Liu
98caee67c3
Merge pull request #557 from adroitwhiz/penskin-cleanup
...
Clean up PenSkin code
2020-10-29 15:25:58 -04:00
Chris Willis-Ford
4ebea93adf
Merge pull request #445 from adroitwhiz/optimize-transformed-hull
...
Cache and don't re-create transformed hull points
2020-10-08 12:46:53 -07:00
adroitwhiz
205a8c9131
Use draw region for accessing pen framebuffer
2020-09-30 17:20:39 -04:00
adroitwhiz
8ac7ed20da
Clean up PenSkin code
2020-09-30 17:09:49 -04:00
adroitwhiz
26d2677409
Also pass in drawable to useNearest
...
This makes the code messier but I'm not sure what else to do since the
texture filtering method to be used depends on the drawable's properties
(e.g. transform, enabled effects). We still need to pass in the scale
separately because in the main rendering path, we multiply it by the
screen-space scale factor.
2020-09-30 17:05:17 -04:00
adroitwhiz
f4d5e52a8f
Clarify SVGSkin.useNearest comments
2020-09-30 17:04:08 -04:00
adroitwhiz
97605f9e55
Move useNearest to skin classes
2020-09-30 17:04:06 -04:00
DD Liu
ce288ea11a
link to file
2020-08-27 17:28:03 -04:00
DD Liu
ffa53a66df
Fix syntax and bump the error allowance
2020-08-27 16:58:30 -04:00
DD Liu
931990bfca
Revert "Revert "Put back in "Merge pull request #489 from adroitwhiz/touching-white-fixes"""
2020-08-27 16:58:01 -04:00
DD Liu
0ae9cdd85c
Revert "Put back in "Merge pull request #489 from adroitwhiz/touching-white-fixes""
2020-08-27 15:17:40 -04:00
DD Liu
63513a924c
Add back todo as well
2020-08-25 20:07:40 -04:00
DD Liu
13d62bd75a
Add back clamping in sampleColor4b, and handling of values near zero in getLocalPosition
2020-08-25 03:26:30 -04:00
DD Liu
4a168693dd
Merge branch 'develop' into pull676
2020-08-20 15:38:54 -04:00
Chris Willis-Ford
7356a5c0c7
Merge pull request #654 from adroitwhiz/no-touching-bubbles
...
Don't include text bubbles in touching queries
2020-08-20 12:22:40 -07:00
Chris Willis-Ford
60a2ea8b45
Merge pull request #574 from adroitwhiz/fixelate
...
Fix pixelate effect on CPU path
2020-08-17 12:39:12 -07:00
Chris Willis-Ford
50ff576bc5
Merge pull request #542 from adroitwhiz/effect-transform-parity
...
Update EffectTransform.transformColor to match GPU "color" + "brightness" effects
2020-08-17 12:13:36 -07:00
Chris Willis-Ford
310f6b5d2d
move hue modulo into hsvToRgb
...
this makes it safer to call hsvToRgb without worrying about h=1, which previously caused incorrect results
2020-08-17 12:06:46 -07:00
DD Liu
b0acea9f35
Pull in parts of pull 479 which move clamping to texture space into silhouette
2020-08-13 14:53:13 -04:00
DD Liu
5fa9c765d7
Change local space to clamp to texture space in is touching queries
2020-08-13 14:06:37 -04:00
DD Liu
749b110301
Add todo
2020-08-13 13:14:48 -04:00
DD Liu
b119d359bb
Fix floating point issues near 0
2020-08-13 00:50:43 -04:00
DD Liu
00554dfb74
Handle null bounds
2020-08-11 18:51:32 -04:00
DD Liu
90040dfa55
Revert "Revert "Revert "Revert "Merge pull request #489 from adroitwhiz/touching-white-fixes""""
2020-08-11 16:12:52 -04:00
DD Liu
70fae9665a
Revert "Revert "Revert "Merge pull request #489 from adroitwhiz/touching-white-fixes"""
2020-08-05 19:20:10 -04:00
DD Liu
46274c7908
Merge pull request #649 from adroitwhiz/no-vector-blur
...
Always use SVG mipmaps that match or exceed the skins' screen-space size
2020-08-04 17:17:03 -04:00
DD Liu
b2346252f1
Revert "Revert "Merge pull request #489 from adroitwhiz/touching-white-fixes""
2020-08-04 16:31:10 -04:00
adroitwhiz
ade45c0363
Move CPU render updates only where they're needed
2020-07-24 13:19:09 -04:00
adroitwhiz
0babe1e0cb
Merge pull request #664 from adroitwhiz/alias-istouching
...
Move isTouching logic to updateCPURenderAttributes
2020-07-23 17:04:26 -04:00
adroitwhiz
ffddd7fba6
Merge pull request #667 from adroitwhiz/fix-safari-pen-again
...
Move pen point difference calculation from shader code to JS
2020-07-23 16:42:03 -04:00
adroitwhiz
8b45114a57
Move pen point difference calculation to JS
...
I'm giving up on coding and becoming a farmer. I hate this code so much
2020-07-23 03:15:31 -04:00