Initial Commit

This commit is contained in:
plane000
2018-04-20 10:15:15 +01:00
parent 49150ccfe4
commit 62101e8e61
2870 changed files with 520122 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
/**
* Texture Quad.
*
* Load an image and draw it onto a quad. The texture() function sets
* the texture image. The vertex() function maps the image to the geometry.
*/
PImage img;
void setup() {
size(640, 360, P3D);
img = loadImage("berlin-1.jpg");
noStroke();
}
void draw() {
background(0);
translate(width / 2, height / 2);
rotateY(map(mouseX, 0, width, -PI, PI));
rotateZ(PI/6);
beginShape();
texture(img);
vertex(-100, -100, 0, 0, 0);
vertex(100, -100, 0, img.width, 0);
vertex(100, 100, 0, img.width, img.height);
vertex(-100, 100, 0, 0, img.height);
endShape();
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB