-
-
Notifications
You must be signed in to change notification settings - Fork 456
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
[Question] Fill pixel by pixel #554
Comments
I was looking up for ways, and found that using a |
Sorry for the delay, if you'd like to "paint" like p5.js you can do this in the var two = new Two({
type: Two.Types.canvas,
overdraw: true
}).appendTo(document.body); This gives you the control to manually clear the canvas when you need or want to. So, you can make a |
Interesting.. thanks, didn't know that... I´ll test this approach in my code... |
Closing question due to inactivity |
Hi,
I'm working on a project where, part of it, I fill the canvas pixel by pixel with a Simplex Noise algorithm (I did it that way on p5).
I was thinking about doing it with a
Two.Group
withTwo.Rectangle
s, but when doing it, the page freezes and fps drops. I suppose it's because the quantity of rectangle objects. Then I thought about using aTwo.Points
, but those doesn't let me change the color for each vertices, which would be good the be able to as I explained here: #553.Looking up through
Two.
on console, I see that there is aTwo.Gradient
, would that be what I need? but how do I use it? There are only docs forTwo.RadialGradient
andTwo.LinearGradient
...Is there another way to "paint" a shape/canvas with a better performance? or is there another alternative?
I want to do something like this but with color gradients and not characters...
The text was updated successfully, but these errors were encountered: