p5

Nested for Loop of Tiles p5.js

Syntax highlighting test.

let tileWidth = 50;

for (let j = 0; j < height / tileWidth; j++) {
  for (let i = 0; i < width / tileWidth; i++) {
    circle(
      i * tileWidth + tileWidth / 2,
      j * tileWidth + tileWidth / 2,
      tileWidth
    );
  }
}
Tags: p5
06:47