Package-level declarations

Types

Link copied to clipboard
class AnimatedSprite(var slice: TextureSlice = Textures.white, var anchorX: Float = 0.0f, var anchorY: Float = 0.0f) : AnimationPlayer<TextureSlice>
Link copied to clipboard
class Animation<KeyFrameType>(val frames: List<KeyFrameType>, val frameIndices: List<Int>, val frameTimes: List<Duration>)

Animation based class that holds info on what frames to be animating. Recommended to be used with AnimationPlayer to assist in playing back the frames.

Link copied to clipboard
class AnimationBuilder<T>(frames: List<T>)

An Animation builder to help create custom animations easily.

Link copied to clipboard

Enables playback of Animation classes.

Link copied to clipboard

The playback types of animation.

Link copied to clipboard
interface Batch : Disposable
Link copied to clipboard
class NinePatch(slice: TextureSlice, val left: Int, val right: Int, val top: Int, val bottom: Int)

Creates a ninepatch by slicing up the TextureSlice into nine patches which produces clean panels of any size, based on a small texture by splitting it into a 3x3 grid. The drawn, the texture tiles the textures sides horizontally or vertically and the center on both axes but doesn't scale or tile the corners.

Link copied to clipboard
class Particle(var slice: TextureSlice)
Link copied to clipboard
class ParticleSimulator(maxParticles: Int)
Link copied to clipboard
class SpriteBatch(val context: Context, val size: Int = 8191) : Batch

Draws batched quads using indices.

Link copied to clipboard
class TextureArraySpriteBatch(val context: Context, val size: Int = 1000, maxTextureSlots: Int, maxTextureWidth: Int, maxTextureHeight: Int, textureArrayMagFilter: TexMagFilter = TexMagFilter.NEAREST, textureArrayMinFilter: TexMinFilter = TexMinFilter.NEAREST) : Batch

Requires GLES 3.0!

Link copied to clipboard

Holds all the TextureSlice entries of the atlas that was read and loaded in.

Link copied to clipboard
open class TextureSlice(var texture: Texture, x: Int = 0, y: Int = 0, width: Int = texture.width, height: Int = texture.height)

Functions

Link copied to clipboard

Create an animation from a prefix of the names of the sprites in a TextureAtlas using an AnimationBuilder to specify the frame index orders and times.

Link copied to clipboard
Link copied to clipboard
fun TextureAtlas.getAnimation(prefix: String = "", defaultTimePerFrame: Duration = 100.milliseconds): Animation<TextureSlice>

Creates an animation from a prefix based on the names of the sprites in a TextureAtlas.

Link copied to clipboard
inline fun <T : Batch> T.use(projectionMatrix: Mat4? = null, action: (T) -> Unit)