Skip to content
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

Implement sweep (conic) gradients #3

Open
Lorp opened this issue Sep 5, 2023 · 0 comments
Open

Implement sweep (conic) gradients #3

Lorp opened this issue Sep 5, 2023 · 0 comments

Comments

@Lorp
Copy link
Owner

Lorp commented Sep 5, 2023

Sweep gradients are not representable directly in SVG. However sweep gradients are available (called conic gradients) in HTML canvas. So if/when canvas output is added to Samsa, it can be implemented. CanvasRenderingContext2D: createConicGradient() method

Sweep gradients are also available in Skia. Because of that, they are available in CanvasKit - Skia + WebAssembly. This was used by @underware to polyfill COLRv1 in Safari for the Plakato Moiré demo.

Sweep ("conic") gradients are also available in CSS:

background-image: conic-gradient(red, orange, yellow, green, blue);

… and this CSS Tricks article talks about including regular DIVs in SVG as <foreignObject>:
My Struggle to Use and Animate a Conic Gradient in SVG

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

No branches or pull requests

1 participant