To view this content, you need to install Java from java.com

Rectangles
Version: 7 20051227

How is this different than version 6?
The two rectangles move in opposite directions.
The two rectangles move one pixel distance per frame.
I move the background color choice instance to the "setup" function so that the background color is chosen once.
In this version the background stays the same color and the rectangles move. In other words the rectanles are animated (changing over time).
I change the frame rate from 2 to 8.
I use a variable with the magic name of "width".
Created the variable named float fRectangleYPosition to hold the Y position of the rectangles.

I break up the animation up into update and render sections of the code.
The rectangles colors don't change every frame but the rectangles position on the screen does.
I stop using the CORNERS rectangle mode.

Source code: rectangles_v070_20051227

Built with Processing