Processing – simple fade technique
A basic sketch that shows how to use millis() for basic animation, in this case a fade-in of a rect(). millis() returns the current runtime of the sketch in milliseconds. Left-click for Fade-In, Right-click for Fade-Out. The transparency (alpha channel of fill/stoke) is calculated evenly across the duration, meaning you only have to change 1… Read More »