Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p.image = function image(img, x, y, w, h) {
- if (img.width > 0) {
- var wid = w || img.width;
- var hgt = h || img.height;
- if(p.use3DContext){
- p.beginShape(p.QUADS);
- p.textureMode(p.NORMAL)
- p.texture(img);
- p.vertex(x, y, 0, 0, 0);
- p.vertex(x+wid, y, 0, 0, 1);
- p.vertex(x+wid, y+hgt, 0, 1, 1);
- p.vertex(x, y+hgt, 0, 1, 0);
- p.endShape();
- } else ...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement