Class SpriteSheetAnimation

Handles a series of [[SpriteFrame]]s to be mapped onto a [[MeshSprite]] Contains the [[MeshSprite]], the [[Material]] and the spritesheet-texture

Constructors

Properties

frames: SpriteFrame[] = []
name: string
spritesheet: CoatTextured

Methods

  • Add sprite frames using a grid on the spritesheet defined by a rectangle to start with, the number of frames, the resolution which determines the size of the sprites mesh based on the number of pixels of the texture frame, the offset from one cell of the grid to the next in the sequence and, in case the sequence spans over more than one row or column, the offset to move the start rectangle when the margin of the texture is reached and wrapping occurs.

    Parameters

    Returns void