Add box with texture

This commit is contained in:
Lev
2021-07-24 18:28:30 -05:00
parent 42fd5884bd
commit 164db871c2
4 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,18 @@
let img;
function preload() {
img = loadImage('assets/rocks.jpg');
}
function setup() {
createCanvas(900, 600, WEBGL);
angleMode(DEGREES);
}
function draw() {
background(125);
texture(img);
rotateY(frameCount);
box(300);
camera(250, -500, 500);
}