top of page

Disappearing Canvas

See the sketch here

Experiment with a sketch that includes all of these:

  1. One element controlled by the mouse.

  2. One element that changes over time, independently of the mouse.

  3. One element that is different every time you run the sketch.

Here is a pretty simple sketch showing a background that changes every time the code is run, with a 'pen' made from a circle that follows the user's mouse and changes size in every frame. The user can make a drawing on the canvas, but it will also be masked by an expanding color field with a very low alpha value of 1. This will allow any pre-existing 'pen strokes' to fade into the background.

It's pretty fun!

I had to reference the framework for the random() function, but I otherwise kept it pretty simple. This color masking idea could be really cool for intentional colors that combine to reveal a hidden message over time.

Side Question: How do you make an object 'bounce' back off the edge of the canvas?

9 views1 comment

Recent Posts

See All
bottom of page