lights exercise

This commit is contained in:
Andrea Bianchi
2026-04-22 13:54:03 +09:00
parent 13e99a84d5
commit e8fb1810e3
14 changed files with 109 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
const images = {};
// We used this in P5.js (in Vite we would simply import the assets)
function preload() {
images.lightOn = loadImage('data/lightOn.jpg');
images.lightOff = loadImage('data/lightOff.jpg');
}
class Light {}
function setup() {
createCanvas(800, 600);
// createCanvas(400, 300);
console.log(images);
}
function draw() {
background(255);
}