Type alias Sprite

Sprite: {
    position: [Expression<number>, Expression<number>];
    size: [Expression<number>, Expression<number>];
    source: Expression<string>;
}

Configuration for a sprite image.

Type declaration

  • position: [Expression<number>, Expression<number>]

    The starting position of the sprite to cut out. Origing [0, 0] is top left in pixels.

  • size: [Expression<number>, Expression<number>]

    The size of the sprite [width, height] in pixels.

  • source: Expression<string>

    A path/URL to the sprite image file.