Hi all,
When I load my blender-made object into a p5.js sketch in instance mode it does not interact with the light source, but appears as a silhouette. Is this a known limitation? Is there a workaround, assuming I need to run my code in instance mode? Thanks!!
-Matan
let sketch = (p) => {
let box
p.preload = ()=> {
box = p.loadModel('img/box.obj'); // I think this can be any file.
}
//sketch setup
p.setup = () => {
p.createCanvas(window.innerWidth, window.innerHeight, p.WEBGL);
}
p.draw = () => {
p.background(200);
p.rotateX(p.frameCount * 0.01);
p.rotateY(p.frameCount * 0.01);
p.scale(30)
p.pointLight(250, 250, 250, 0, 0, 50);
p.ambientMaterial(200,50,50)
p.noStroke()
p.model(box);
}
};
new p5(sketch);