-
Notifications
You must be signed in to change notification settings - Fork 99
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
Gradient config #28
Comments
I made a change to how the angle works now, so that you specify degrees (0-360). You can no longer specify length. |
This still feels a bit limited. We could create
|
bubbly({
bubbles: 30,
compose: 'lighter',
shadowBlur: 1,
shadowColor: '#fff',
gradientFunc: (ctx) => {
const gradient = ctx.createLinearGradient(0, 0, ctx.canvas.width, ctx.canvas.height);
gradient.addColorStop(0, "#2AE");
gradient.addColorStop(1, "#17B");
return gradient;
},
radiusFunc: () => 4 + Math.random() * window.innerWidth / 25,
fillFunc: () => `hsla(0, 0%, 100%, ${Math.random() * 0.1})`,
angleFunc: () => Math.random() * Math.PI * 2,
velocityFunc: () => 0.1 + Math.random() * 0.5,
animate: true,
}); |
Actually, we can set the "fillStyle" rather than "a gradient". This will let us do this: Screen.Recording.2023-04-04.at.06.22.14.mov |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@abalazsik, I'm looking at the gradient config. We also don't support more than 2 color stops, but it would be simple enough to add any number, this could potentially replace "gradientLength".
The text was updated successfully, but these errors were encountered: