Skip to content

Documentation / @debuffjp/core / SpriteDrawOptions

Interface: SpriteDrawOptions ​

Defined in: render/draw.ts:14

Properties ​

alpha? ​

optional alpha?: number

Defined in: render/draw.ts:24

Multiplied with the global alpha.


flash? ​

optional flash?: number

Defined in: render/draw.ts:28

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


flipX? ​

optional flipX?: boolean

Defined in: render/draw.ts:21


flipY? ​

optional flipY?: boolean

Defined in: render/draw.ts:22


origin? ​

optional origin?: readonly [number, number]

Defined in: render/draw.ts:16

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


rotation? ​

optional rotation?: number

Defined in: render/draw.ts:20

Radians.


scaleX? ​

optional scaleX?: number

Defined in: render/draw.ts:17


scaleY? ​

optional scaleY?: number

Defined in: render/draw.ts:18


smooth? ​

optional smooth?: boolean

Defined in: render/draw.ts:30

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


tint? ​

optional tint?: Color

Defined in: render/draw.ts:26

Colour multiplier. Default white.