• SpriteSheetFrame



Mostly for debugging to understand where the frame is from.

sourcePivot: Vector2

Original pivot on the source.

sourceRect: Rect

The rectangle on the source (as defined in the graphics program). For the developers mental model this is likely the width/height one expects. However, for shading/rendering use textureRect's values.

The texture used for rendering.

Owned by parent's SpriteSheet.

texturePivot: Vector2

The pivot for the frame, calculated in a way that works on the texture during rendering.

textureRect: Rect

Frame-rect on the texture. This is likely to be trimmed array. To get width/height of the frame as it was defined in the graphics program see sourceRect.width/height.



  • Utility function to quickly create a list of SpriteSheetFrames from a packed texture for demos.

    💡 Create proper SpritSheets check FIX: website LINK




    • texture: ManagedTexture
    • frameWidth: any

      in pixel

    • frameHeight: any

      in pixel

    • pivotX: number = 0

      rotation/scale anchir X in pixel

    • pivotY: number = 0

      rotation/scale anchir Y in pixel

    • spacing: number = 0

      spacing between frames. only between frames (compatible with Aseprite export).

    • border: number = 0

      top/left/right/bottom border space (compatible with Aseprite export).

    • numX: number = 0

      manually set number of frames in a row

    • numY: number = 0

      manually set number of frames in a column

    Returns SpriteSheetFrame[]

Generated using TypeDoc