20 lines
370 B
JavaScript
20 lines
370 B
JavaScript
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);
|
|
}
|