View difference between Paste ID: Ami9eCct and
SHOW: | | - or go back to the newest paste.
1-
1+
p.image = function image(img, x, y, w, h) {
2
  if (img.width > 0) {
3
    var wid = w || img.width;
4
    var hgt = h || img.height;
5
    if(p.use3DContext){
6
      p.beginShape(p.QUADS);
7
      p.textureMode(p.NORMAL)
8
      p.texture(img);
9
      p.vertex(x, y, 0, 0, 0);
10
      p.vertex(x+wid, y, 0, 0, 1);
11
      p.vertex(x+wid, y+hgt, 0, 1, 1);
12
      p.vertex(x, y+hgt, 0, 1, 0);
13
      p.endShape();
14
    } else ...
15
}