We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hey guys,
There is probably a really easy solution to this, but I have a sketch that I am drawing on using peril noise and a flow field of Pvectors. Each frame, lines are drawn onto the canvas. That all works fine. I am wanting to draw text on the screen also. I want to start the textSize at 0 and increment it every frame to give it the effect that it is coming at you. The text is being drawn to the screen every frame and the textSize is incrementing. However, there is a NEW text element drawn to the screen every frame. I would like the old text elements to be deleted after a new one has been drawn.
Is there another function other than clear() i could use to accomplish this?
Thanks, Dane
Answers
http://p5js.org/reference/#/p5/createGraphics
Thank you for the quick response! I've been looking into the createGraphics function, but I don't know if I am using it right. Im assuming I should be able to create these text elements in the second graphic/scene. And then I should be able to clear that graphic. However, it is still clearing the whole canvas..
Each p5.Renderer created outta createGraphics() can be cleared individually.
Actually, each 1 got their own canvas attributes. B-)