This commit is contained in:
Casey Reas
2011-09-18 06:31:29 +00:00
parent 76e9248e00
commit 5b0214704c
86 changed files with 95 additions and 178 deletions

View File

@@ -5,8 +5,7 @@
* the texture image. The vertex() function maps the image to the geometry.
*/
// @pjs preload must be used to preload media if the program is
// running with Processing.js
// The next line is needed if running in JavaScript Mode with Processing.js
/* @pjs preload="berlin-1.jpg"; */
PImage img;
@@ -25,8 +24,8 @@ void draw() {
beginShape();
texture(img);
vertex(-100, -100, 0, 0, 0);
vertex(100, -100, 0, 300, 0);
vertex(100, 100, 0, 300, 300);
vertex(-100, 100, 0, 0, 300);
vertex(100, -100, 0, img.width, 0);
vertex(100, 100, 0, img.width, img.height);
vertex(-100, 100, 0, 0, img.height);
endShape();
}