You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When pasted into Paysage, this fails with an error on modelView.rotateX. This is Processing.js's way of telling us that the 3D mode initialization failed.
Actually, what happens is that the Paysage renderer calls size() by itself to fill the rendering area, without specifying a rendering mode, which is the same as specifying P2D. This used to be done after setup() ran, which meant a size() call from setup() could set the mode to P3D, but this caused issue #68, so we moved the size() call earlier. And given that it is not possible to change the rendering mode once it is set, this precludes running P3D sketches.
Note that in a similar fashion, our preemptive background() call (the fix for #76) probably also forces the sketch in P2D mode.
The text was updated successfully, but these errors were encountered:
The only issue I can see is that a growing number of people expect Processing sketches to work in 3D, and we directly point them from the programmer to a reference that includes 3D commands!
Maybe we add this to version 2 roadmap? (p5js, bug report in the editor, 3D, etc.)
Here's a basic sketch using Processing.js's 3D capabilities:
When pasted into Paysage, this fails with an error on
modelView.rotateX
. This is Processing.js's way of telling us that the 3D mode initialization failed.Actually, what happens is that the Paysage renderer calls
size()
by itself to fill the rendering area, without specifying a rendering mode, which is the same as specifyingP2D
. This used to be done aftersetup()
ran, which meant asize()
call fromsetup()
could set the mode toP3D
, but this caused issue #68, so we moved thesize()
call earlier. And given that it is not possible to change the rendering mode once it is set, this precludes runningP3D
sketches.Note that in a similar fashion, our preemptive
background()
call (the fix for #76) probably also forces the sketch inP2D
mode.The text was updated successfully, but these errors were encountered: