Skip to main content

Class: Sprite

Defined in: rendering/sprite.ts:36

The Sprite class represents a sprite in the rendering system.

Constructors

Constructor

new Sprite(options): Sprite

Defined in: rendering/sprite.ts:56

Constructs a new instance of the Sprite class.

Parameters

options

SpriteOptions

The options for creating the sprite.

Returns

Sprite

Properties

height

height: number

Defined in: rendering/sprite.ts:41

The height of the sprite, including the bleed value.


pivot

pivot: Vector2

Defined in: rendering/sprite.ts:44

The pivot point of the sprite.


renderable

readonly renderable: Renderable

Defined in: rendering/sprite.ts:50

The renderable associated with the sprite.


tintColor

tintColor: Color

Defined in: rendering/sprite.ts:47

The tint color of the sprite.


width

width: number

Defined in: rendering/sprite.ts:38

The width of the sprite, including the bleed value.