P3D text
in
Programming Questions
•
2 months ago
size(400, 400, P3D);//P3D
textSize(55);
fill(255,0,0);//the red one
text("word", 12, 75,10); //behind!!! // if i want to change that, i have to display
//this word AFTER the other, but changing the z value has no effect, except to change the size, as normal.
fill(0, 102, 153, 204);
text("word", 12, 45, -30);//blue : forwards
pushMatrix();
translate(width/2, height/2, 100);
fill(0,255,0);// the green sphere: forwards
sphere(40);
popMatrix();
pushMatrix();
translate(width/2, height/2, -100);
fill(0,0,255); //the blue one:: behind
sphere(100);
popMatrix();
//AND NOW with OPENGL, the same stupid code
import processing.opengl.*;
size(400, 400, OPENGL);//P3D
textSize(55);
fill(255,0,0);//the red one
text("word", 12, 75,10); //before!!!
fill(0, 102, 153, 204);
text("word", 12, 45, -30);//blue : behind
pushMatrix();
translate(width/2, height/2, 100);
fill(0,255,0);// the green sphere: forwards
sphere(40);
popMatrix();
pushMatrix();
translate(width/2, height/2, -100);
fill(0,0,255); //the blue one:: behind
sphere(100);
popMatrix();
//question:i dont understand ZAxis for text with P3D
1