public class TextureAtlasAnimator extends Object implements com.badlogic.gdx.utils.Disposable
TextureAtlas. This class should only
be used as a last resort when your rendering needs to animate TextureAtlas tiles as it performs animation by
modifying the atlas's OpenGL texture every time an animation frame has to be changed. For most types of 2D rendering,
there are better and faster ways of doing performing animation.
The real intended use case is when a large 3D mesh is being rendered and textured with more then one different tile
from a TextureAtlas where scanning through each vertex and animating UV coords is impractical or where doing the
same type of UV coordinate animation in a shader is also impractical.| Constructor and Description |
|---|
TextureAtlasAnimator() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(TextureAtlas atlas) |
void |
addAllAtlases(com.badlogic.gdx.assets.AssetManager assetManager) |
void |
addSequence(String name,
TextureAtlas atlas,
int tileToBeAnimated,
int start,
int stop,
float delay,
boolean loop) |
void |
dispose() |
void |
enableSequence(String name,
boolean enable) |
void |
onResume() |
void |
onUpdate(float delta) |
void |
reset() |
void |
resetSequence(String name) |
void |
stopSequence(String name,
boolean restoreOriginalTile) |
public void add(TextureAtlas atlas)
public void addAllAtlases(com.badlogic.gdx.assets.AssetManager assetManager)
public void addSequence(String name, TextureAtlas atlas, int tileToBeAnimated, int start, int stop, float delay, boolean loop)
public void resetSequence(String name)
public void stopSequence(String name, boolean restoreOriginalTile)
public void enableSequence(String name, boolean enable)
public void onUpdate(float delta)
public void onResume()
public void reset()
public void dispose()
dispose in interface com.badlogic.gdx.utils.DisposableCopyright © 2022. All rights reserved.