-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle subpixel viewboxes for SVG skins #594
base: develop
Are you sure you want to change the base?
Commits on Feb 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2727fbe - Browse repository at this point
Copy the full SHA 2727fbeView commit details -
refactor: give skins a "native" & "quad" size and center
Skins' "native size" is the size that their bounds are supposed to be. Their "quad size" is the size the quadrilateral is really rendered at.
Configuration menu - View commit details
-
Copy full SHA for a00bd79 - Browse repository at this point
Copy the full SHA a00bd79View commit details -
Configuration menu - View commit details
-
Copy full SHA for 826b3bd - Browse repository at this point
Copy the full SHA 826b3bdView commit details -
refactor: remove createMIP zero-size checks
_setSubpixelViewbox ensures nonzero image dimensions at all rendered scales.
Configuration menu - View commit details
-
Copy full SHA for 8d024ce - Browse repository at this point
Copy the full SHA 8d024ceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9d3f7b7 - Browse repository at this point
Copy the full SHA 9d3f7b7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c04d8c - Browse repository at this point
Copy the full SHA 6c04d8cView commit details -
Configuration menu - View commit details
-
Copy full SHA for e044419 - Browse repository at this point
Copy the full SHA e044419View commit details -
Configuration menu - View commit details
-
Copy full SHA for 05c8f8a - Browse repository at this point
Copy the full SHA 05c8f8aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5992f5c - Browse repository at this point
Copy the full SHA 5992f5cView commit details -
Configuration menu - View commit details
-
Copy full SHA for b3a840f - Browse repository at this point
Copy the full SHA b3a840fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b4251b - Browse repository at this point
Copy the full SHA 3b4251bView commit details -
Configuration menu - View commit details
-
Copy full SHA for d475570 - Browse repository at this point
Copy the full SHA d475570View commit details -
refactor: make _calculateRotationCenter private
...and just return nativeRotationCenter in getSkinRotationCenter to do so.
Configuration menu - View commit details
-
Copy full SHA for d0962a6 - Browse repository at this point
Copy the full SHA d0962a6View commit details -
refactor: reflow text bubble lines non-lazily
This was a case of premature optimization that needs to go for the next commit's optimization to work.
Configuration menu - View commit details
-
Copy full SHA for d94dc1a - Browse repository at this point
Copy the full SHA d94dc1aView commit details -
perf: replace skin size getters with properties
This is an optimization from PR scratchfoundation#470 that was taken out because of other unrelated changes in that PR which kept breaking things. We can put it back in now, and it's especially useful here to avoid going through a nested getter when accessing quadSize.
Configuration menu - View commit details
-
Copy full SHA for 8d427ae - Browse repository at this point
Copy the full SHA 8d427aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f3995f - Browse repository at this point
Copy the full SHA 3f3995fView commit details -
perf: optimize "logical bounds" shader calculation
Now we only mess around with "logical bounds" in the shader if effects which distort the sprite are enabled. This also avoids passing the extra v_logicalCoord varying.
Configuration menu - View commit details
-
Copy full SHA for 9a30de3 - Browse repository at this point
Copy the full SHA 9a30de3View commit details -
refactor: move effect transform + bounds check out of getLocalPosition
This results in a tad bit of duplicated code, but considering that we have 4 different code paths (colorAtNearest, colorAtLinear, isTouchingNearest, and isTouchingLinear) for sampling a silhouette, that's to be expected. This more closely matches the GPU pipeline, in which color and position calculations are more intertwined. This replaces the hacky fix in scratchfoundation#424 with a solution that matches the GPU: instead of not transforming points outside the skin bounds, just return transparency/false early.
Configuration menu - View commit details
-
Copy full SHA for 9a9ebb2 - Browse repository at this point
Copy the full SHA 9a9ebb2View commit details -
perf: use _skin instead of getter in "touching" methods
This provides a slight but noticeable performance improvement, and gains back some of what was lost in the previous commit.
Configuration menu - View commit details
-
Copy full SHA for f3a6c47 - Browse repository at this point
Copy the full SHA f3a6c47View commit details -
Configuration menu - View commit details
-
Copy full SHA for e88fb6b - Browse repository at this point
Copy the full SHA e88fb6bView commit details