import wblut.math.*;
import wblut.processing.*;
import wblut.core.*;
import wblut.hemesh.*;
import wblut.geom.*;
HE_Mesh mesh;
WB_Render render;
PImage[] images = new PImage[6];
int whichImage = 0;
PShape s;
void setup() {
size(1920, 1440, P3D);
images[0] = loadImage("1_1.png");
images[1] = loadImage("1_2.png");
images[2] = loadImage("1_3.png");
images[3] = loadImage("1_4.png");
images[4] = loadImage("1_5.png");
images[5] = loadImage("1_6.png");
textureMode(NORMAL);
create();
render = new WB_Render(this);
s = render.toSmoothPShape(mesh, images[whichImage]);
}
void create() {
HEC_Grid meshGrid=new HEC_Grid();
meshGrid.setU(20);
meshGrid.setV(20);
meshGrid.setUSize(1440);
meshGrid.setVSize(1440);
mesh=new HE_Mesh(meshGrid);
}
void draw() {
background(#202020);
shape(s);
}
void keyPressed() {
if (key == 'c') { whichImage = ++whichImage%images.length; }
}
Comments