Texture Animation

Started by ap, January 19, 2015, 10:47:47 AM

Previous topic - Next topic

ap

Hello

I am trying to do some texture animation - using a large texture including a grid of frames, and changing cycling through the frames by changing the texture mapping to a 3D quad.

Something like these -
https://github.com/libgdx/libgdx/wiki/2D-Animation
https://www.udacity.com/course/viewer#!/c-cs291/l-124106599/m-175393409
http://stemkoski.github.io/Three.js/Texture-Animation.html

Is it possible doing it using JPCT-AE?

Thanks
A.P.


EgonOlsen

Yes. You can either change the texture coordinates by using the PolygonManager (just make sure to call build(false); on them instead of build()) or, which should be simpler and faster, by using a texture matrix (http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Object3D.html#setTextureMatrix(com.threed.jpct.Matrix)).

ap