Skip to content

Documentation / spryte / SpriteDrawOptions

Interface: SpriteDrawOptions ​

Defined in: draw.ts:17

Properties ​

alpha? ​

optional alpha?: number

Defined in: draw.ts:27

Multiplied with the global alpha.


flash? ​

optional flash?: number

Defined in: draw.ts:31

0..1 mix toward white, e.g. hit flashes.


flipX? ​

optional flipX?: boolean

Defined in: draw.ts:24


flipY? ​

optional flipY?: boolean

Defined in: draw.ts:25


origin? ​

optional origin?: readonly [number, number]

Defined in: draw.ts:19

Anchor as a fraction of the frame size. Default [0.5, 0.5] (centre).


rotation? ​

optional rotation?: number

Defined in: draw.ts:23

Radians.


scaleX? ​

optional scaleX?: number

Defined in: draw.ts:20


scaleY? ​

optional scaleY?: number

Defined in: draw.ts:21


smooth? ​

optional smooth?: boolean

Defined in: draw.ts:33

Linear filtering for this sprite. Default: the game's setting (off when pixelArt).


tint? ​

optional tint?: Color

Defined in: draw.ts:29

Colour multiplier. Default white.