xxxxxxxxxx
29
let foxTex;
let foxMesh;
let graphics;
function preload(){
foxTex = loadImage("T_Fox_D.png");
foxMesh = loadModel("Fox.obj", true);
}
function setup() {
createCanvas(400, 400, WEBGL);
noStroke();
noStroke();
graphics = createGraphics(400, 400);
graphics.imageMode(CORNERS);
graphics.scale(1, -1)
graphics.image(foxTex, 0, 0,400,-400);
}
function draw() {
background(220);
orbitControl()
rotateZ(PI);
// rotateY(0.01 * frameCount);
texture(graphics);
model(foxMesh);
}