-
Notifications
You must be signed in to change notification settings - Fork 350
Synchronous SVG mipmaps #527
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
Synchronous SVG mipmaps #527
Conversation
8bf0e75
to
af7eb6b
Compare
af7eb6b
to
bf5d666
Compare
I tested this out locally and it looked good. All tests are passing too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! I just have one concern, commented below. What do you think, @adroitwhiz?
Co-Authored-By: Chris Willis-Ford <[email protected]>
Also, this is blocked on #534 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This PR depends on scratchfoundation/scratch-svg-renderer#107.
Resolves
Resolves #518
Proposed Changes
This PR builds on @ktbee's excellent work on SVG mipmaps in #431.
When investigating #518, I discovered that once an SVG string is loaded into an
SvgRenderer
, it can be drawn synchronously at any scale.The synchronous SVG-drawing method from scratchfoundation/scratch-svg-renderer#107 allows the SVG mipmap logic to be considerably simplified. No callbacks need to be passed around anywhere, much less state needs to be managed and kept track of, and the array of
SVGMIP
s is now an array ofWebGLTexture
s.Reason for Changes
This considerably simplifies the state management logic of
SVGSkin
s.Reducing the complexity of
SVGSkin
s' logic will greatly ease the steps needed to fix #427.