Closed Trimad closed 5 years ago
Another development:
So I've discovered that if I texture my shape with an image, the program works as intended. Problem is, I don't want to texture my shape. Working code:
var img;
function preload() {
img = loadImage('water.jpg');
}
function setup() {
createCanvas(1024, 1024, WEBGL);
}
function draw() {
rotateX(frameCount*0.01);
rotateY(frameCount*0.01);
background(51);
texture(img);
textureMode(IMAGE);
beginShape(LINES);
vertex(0, 512, 0, 0, 512);
vertex(512, 512, 0, 512, 512);
vertex(512, 0, 0, 512, 0);
vertex(0, 0, 0, 0, 0);
endShape();
}
I cannot replicate the error in my system:
EDIT: only the first one
@Trimad Have you tried the sketches outside of the Processing p5.js mode? The mode is not maintained officially and will likely be out of date. If you wish to run you code locally you will need to follow steps lay out here
If you want to report issues with processing p5.js mode, you can do that here: https://github.com/fathominfo/processing-p5js-mode
Nature of issue?
Most appropriate sub-area of p5.js?
Which platform were you using when you encountered this?
Details about the bug:
When I run this snippet of code in the p5.js web editor, it works as intended. When I run it locally in Chrome or in Firefox, my console is flooded with errors. In fact I can't get vertex to work at all in either Chrome or Firefox now. See screenshots.
Firefox p5.js web editor Google Chrome