We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi all, I have the following piece of code:
beginShape();
texture(lig);
for (Inters inte: intersects) {
vertex((float)inte.x1, (float)inte.y1, (float)inte.x1+(radius/2)-posX, (float)inte.y1+(radius/2)-posY);
}
endShape();
This works perfectly fine in Processing, but not in Processing.js. And yes, I have preloaded the texture image.
Error:
Uncaught TypeError: Cannot read property '__texture' of null processing.js:6097
p.texture processing.js:6097
cast$0 VM54:220
castLight$0 VM54:56
draw VM54:454
Drawing3D.redraw processing.js:4053
(anonymous function)
Thanks in advance.
Answers
Never used texture() before. But I do know that we can't use remotely loaded images! Check whether it's your case there! 8-X
GoToLoop, I am not remotely loading images. I can confirm that the image loads since it draws fine.
Does anyone have any suggestions?
It's irrelevant whether the images have loaded fine. Just make sure they're loaded from the same host Processing app runs! :-@
They are loaded from the same host.