Created
February 4, 2022 01:44
-
-
Save zamfi/779fc76e7f6d61e766da05553544217f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// "spaced colored squares" -- array edition | |
colorMode(HSB); | |
noFill(); | |
var SIZE = 40; | |
var y = height/2 - SIZE/2; | |
var squares = [ | |
{ x: 50, y: y }, | |
{ x: 100, y: y }, | |
{ x: 150, y: y }, | |
{ x: 200, y: y }, | |
{ x: 250, y: y } | |
]; | |
for (var i = 0; i < squares.length; i = i + 1) { | |
stroke(40,100,100); | |
rect(squares[i].x, squares[i].y, SIZE, SIZE); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment