Hello !
I’m having issues to add in image as background : I created a light on a sphere, following my mouse, but I would like it to be all over an image background, not on the sphere as in P5js references…
How can I add a light spectrum over an image ?
Thanks in advance,
have a good day
var img;
function setup () {
createCanvas(500,500,WEBGL);
}
function draw () {
background (0,0,0);
let locX = mouseX - width / 2;
let locY = mouseY - height / 2;
ambientLight(40);
spotLight(255, 0, 0, locX, locY, 500, 0, 0, -1, Math.PI / 10);
st
![Capture d’écran 2022-01-24 à 16.25.47|690x431](upload://4foJKpts9eWDa4OI3wtQHMVIICZ.jpeg)
roke(0);
sphere(100);
}