Part of the power of coding is that small changes can create big impacts. Now that you’ve experimented with changing the color and text, it’s time to experiment with the animation itself!
Instructions
Three variables let you experiment with the animation physics: mouseResponseThreshold
, friction
, and rotationForce
.
mouseResponseThreshold
affects how close the mouse pointer needs to be to affect the dots that make up the letters. The larger the number, the more powerful the effect of the mouse interaction. Experiment with changing the mouseResponseThreshold
to different numbers and running your code!
Try experimenting with the friction
value! You’ll probably want to keep friction
between 0
and 1
.
Finally, try experimenting with the rotationForce
value. This variable represents how much each animated dot will try to rotate when interacting with the mouse. Try keeping this value small, maybe around 0.01
.