Skip to content

Fix: Not collapsable gradients with canvas renderer#3152

Open
Quatern1on wants to merge 1 commit intoairbnb:masterfrom
Quatern1on:master
Open

Fix: Not collapsable gradients with canvas renderer#3152
Quatern1on wants to merge 1 commit intoairbnb:masterfrom
Quatern1on:master

Conversation

@Quatern1on
Copy link
Copy Markdown

@Quatern1on Quatern1on commented Feb 4, 2025

When gradient color stops offsets do not align with alpha stops offsets, Canvas renderer just renders without using alpha at all. This PR uses algorithm that merges colors and alpha stops into single array of colors with alpha that correctly represents such gradient and can be used with CanvasGradient.
Example animation that is rendered differently with canvas renderer: break.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant