Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. Animation batFlight;
  2.  
  3. void setup() {
  4. size(256, 256, P3D);
  5. noStroke();
  6. hint(DISABLE_TEXTURE_MIPMAPS);
  7. PGraphicsOpenGL pogl = (PGraphicsOpenGL)g;
  8. pogl.textureSampling(3);
  9. textureMode(NORMAL);
  10. textureWrap(REPEAT);
  11.  
  12. batFlight = new Animation(
  13. width * 0.5, height * 0.5, 0,
  14. width, height, 0,
  15. 0.3, 0.666, 0,
  16. 5, "data/batFlight/");
  17. }
  18.  
  19. void draw() {
  20. background(0xff007fff);
  21. batFlight.draw();
  22. batFlight.position.sub(0, 0.1, 0.1);
  23. batFlight.angle.y = map(mouseX, 0, width, 0, TWO_PI);
  24. batFlight.angle.z = map(mouseY, 0, height, 0, TWO_PI);
  25. }
  26.  
  27. /* ... */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement