For this week’s assignment I experimented with using classes, objects and arrays.
The idea was to have an array of squares fill up the entire canvas and make each one of them rotate with a slight delay.
I knew I had to use the Push/Pop feature to make the rectangles rotate independently but placing that feature in different parts of the code gave me different results.
Results of trial 1 –
placed push/Pop in the draw loop in sketch
Result of trial 2 –
placed Push/Pop in the display function within the Class (Rectangle.js)
Couldn’t figure out how to create a grid using array (both x and y)
So far I could only manage arraying in x