How to Rotate Multiple Objects in Javascript Coding on P5.js - 10 Subscriber Special
This is NOT a professional tutorial. BUT I know how to translate and rotate squares so you can watch this video and learn a very basic animation technique on P5.js. Perhaps you will learn its ways. Or perhaps you will learn other videos have better teaching content. Either way, watch it and decide for yourself. Also, we hit 10 subscribers! Yay!
1:28 Translate squares
2:48 Rotate squares
3:50 Push and Pop
6:30 More squares
8:40 CHAOS
9:44 25 Subscriber Special
Basically, if you want to animate the shapes correctly without losing your mind, just translate, then rotate. And use PUSH and POP to isolate the transformations being performed upon an object. Makes life so much easier.
PROFESSIONAL TUTORIAL
Coding Train - https://youtu.be/o9sgjuh-CBM
USEFUL LINKS
Spinny Squares - https://editor.p5js.org/rushcode/sketches/UB-yi-4xU
translate() - https://p5js.org/reference/#/p5/translate
rotate() - https://p5js.org/reference/#/p5/rotate