The P3D-Renderer (Processing)
By default, Processing assumes that you want to create a two-dimensional sketch. But since this is not the case, you have to define that you want to work in 3D instead.
You have already learned about the size-Function in Processing. You can use this function to define the size of the sketch, right? However, you can pass a third parameter to this function, which selects the so-called “renderer”.
In Processing there are different renderers available. The one you want to select here is called P3D. And you do this simply by specifying P3D as the third parameter in the size-function.
size(900,900,P3D);
Under the hood some basic settings are made. Simply put, your sketch is now ready to work in 3D and you can continue with the next lesson.
Related Links
Language Comparison
| Processing | p5.js |
| size() | createCanvas() |