Closed
Description
Hi,
when I want to draw a line with the WEBGL Renderer, it works no problem, but when I draw a 3D object with texture before that, the line won't be displayed.
- WebGL
- p5.js version: 1.4.0
- Web browser and version: Google Chrome 94.0.4606.61
- Operating System: Windows
- Steps to reproduce this:
let g;
let gtex;
function preload(){
g = loadModel('js/gimbal.obj',false);
gtex = loadImage('js/gimbaltex.png');
}
function setup(){
createCanvas(720, 240,WEBGL);
ortho();
}
function draw(){
smooth();
clear();
translate(0,0,-100);
noStroke();
directionalLight(255, 255, 255,0,0, 1);
directionalLight(255, 255, 255,0,0, -1);
rotateX(PI);
push();
translate(-240,0,0);
scale(4+(2/3));
texture(gtex); // when I disable this texture (comment it out), the line gets drawn no problem, but otherwise not.
model(g);
stroke(255,0,0);
noFill();
line(0,0,0,100,100,100);
}
files.zip
Here are the 3D Models!
Thanks
Bastian
Metadata
Metadata
Assignees
Type
Projects
Status
DONE! 🎉