Noah's Lerp Adventure

Stage 0

Notice as you move the mouse, that the white circle is 'tracking' it. This is due to the 'lerping' we've employed.

The objective in this simulation is to touch the red target with the mouse before the white circle hits it.

When the red target is touched by the mouse it will reposition itself in the canvas randomly.

At this time, nothing actually happens if the white circle touches the red target.

The 'lerpFactor' in sketch.js controls the speed at which the white circle tracks the target.

Back to Processing Showcase