Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Animation batFlight;
- void setup() {
- size(256, 256, P3D);
- noStroke();
- hint(DISABLE_TEXTURE_MIPMAPS);
- PGraphicsOpenGL pogl = (PGraphicsOpenGL)g;
- pogl.textureSampling(3);
- textureMode(NORMAL);
- textureWrap(REPEAT);
- batFlight = new Animation(
- width * 0.5, height * 0.5, 0,
- width, height, 0,
- 0.3, 0.666, 0,
- 5, "data/batFlight/");
- }
- void draw() {
- background(0xff007fff);
- batFlight.draw();
- batFlight.position.sub(0, 0.1, 0.1);
- batFlight.angle.y = map(mouseX, 0, width, 0, TWO_PI);
- batFlight.angle.z = map(mouseY, 0, height, 0, TWO_PI);
- }
- /* ... */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement