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!



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.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?