Hi, does anyone know why the light source in this example is not changing position?
Thanks!
let gl;
let offsetX = 0;
function setup() {
createCanvas(400, 400);
gl = createGraphics(100, 100, WEBGL);
}
function draw() {
background(0);
gl.background(0);
gl.pointLight(255, 255, 255, -100+offsetX, -100, 20);
gl.plane(100, 100);
gl.normalMaterial()
image(gl, 200, 200)
offsetX++;
}
Here is live example https://editor.p5js.org/r4nd0m_jump/sketches/BJBPHpYCQ