Documentation / spryte / SpriteDrawOptions
Interface: SpriteDrawOptions
Defined in: draw.ts:20
Properties
alpha?
optionalalpha?:number
Defined in: draw.ts:30
Multiplied with the global alpha.
flash?
optionalflash?:number
Defined in: draw.ts:34
0..1 mix toward white, e.g. hit flashes.
flipX?
optionalflipX?:boolean
Defined in: draw.ts:27
flipY?
optionalflipY?:boolean
Defined in: draw.ts:28
origin?
optionalorigin?: readonly [number,number]
Defined in: draw.ts:22
Anchor as a fraction of the frame size. Default [0.5, 0.5] (centre).
rotation?
optionalrotation?:number
Defined in: draw.ts:26
Radians.
scaleX?
optionalscaleX?:number
Defined in: draw.ts:23
scaleY?
optionalscaleY?:number
Defined in: draw.ts:24
smooth?
optionalsmooth?:boolean
Defined in: draw.ts:36
Linear filtering for this sprite. Default: the game's setting (off when pixelArt).
tint?
optionaltint?:Color
Defined in: draw.ts:32
Colour multiplier. Default white.
user?
optionaluser?:number
Defined in: draw.ts:42
A float a custom shader reads as user() for this sprite (since 0.16): a share, a variant, a flag. Default 0. It stays in the batch, as draw.sprites' each.user does. WebGL2 only, and only inside withShader; without a custom shader, and on the Canvas 2D fallback, it does nothing.
user2?
optionaluser2?:number
Defined in: draw.ts:44
A second float, read as user2() (since 0.16). Default 0.