Step 10. The map() Function

Click the World to run it. You will see that background color changes as you move the mouse left-right. This uses the handy P5 function map() which maps a number from one range to another.

World

Tutorial 2.4
The map() Function
Tweet this step: