xxxxxxxxxx
16
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++;
}