xxxxxxxxxx
47
let textScreen;
function setup() {
createARCanvas();
textScreen = createGraphics(20,20)
textScreen.text("Hello",5,5)
textScreen.fill(255,0,0);
textScreen.textSize(12);
textScreen.background(255);
}
let rot = 0;
let rotSpeed = 0.1;
function draw() {
orbitControl();
// rot += rotSpeed;
// rotateY(rot);
// fill(255);
// text('hello',0,0)
// image(textScreen, 0, 0)
push();
translate(0,20,-100);
rotateY(90)
texture(textScreen);
// fill(255);
noStroke();
plane(20,20);
pop();
translate(0,100,0)
fill('pink');
box(5);
push();
fill('green');
box(2000)
pop();
ambientLight(255); // white light
directionalLight(250, 250, 250, 200, 200, -1);
}