17 lines
330 B
JavaScript
17 lines
330 B
JavaScript
let img;
|
|
|
|
function preload() {
|
|
img = loadImage("python.jpg");
|
|
}
|
|
|
|
function setup() {
|
|
const canvas = createCanvas(windowWidth - 20, windowHeight - 200);
|
|
canvas.parent(document.querySelector("#canvas"));
|
|
|
|
for (let i = 0; i < 100; i += 50) {
|
|
for (let j = 0; j < 100; j += 50) {
|
|
image(img, i, j, 45, 45);
|
|
}
|
|
}
|
|
}
|