Skip to content

Documentation / @debuffjp/core / SpriteDrawOptions

Interface: SpriteDrawOptions ​

Defined in: spryte/dist/draw.d.ts:15

Properties ​

alpha? ​

optional alpha?: number

Defined in: spryte/dist/draw.d.ts:25

Multiplied with the global alpha.


flash? ​

optional flash?: number

Defined in: spryte/dist/draw.d.ts:29

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


flipX? ​

optional flipX?: boolean

Defined in: spryte/dist/draw.d.ts:22


flipY? ​

optional flipY?: boolean

Defined in: spryte/dist/draw.d.ts:23


origin? ​

optional origin?: readonly [number, number]

Defined in: spryte/dist/draw.d.ts:17

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


rotation? ​

optional rotation?: number

Defined in: spryte/dist/draw.d.ts:21

Radians.


scaleX? ​

optional scaleX?: number

Defined in: spryte/dist/draw.d.ts:18


scaleY? ​

optional scaleY?: number

Defined in: spryte/dist/draw.d.ts:19


smooth? ​

optional smooth?: boolean

Defined in: spryte/dist/draw.d.ts:31

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


tint? ​

optional tint?: Color

Defined in: spryte/dist/draw.d.ts:27

Colour multiplier. Default white.