Appearance
Interface: AvatarPngOptions
Options for avatarToPng: how the still image of the avatar is rendered. Mirrors the options of the avatar module (@kappapps/avatar), which does the actual rendering.
Properties
animation?
ts
optional animation?: string;Spine animation played before the capture.
Default Value
'Idle'
equip?
ts
optional equip?: ("weapon" | "bow" | "shield")[];Equipment to display. Hidden by default, and only the pieces present in the avatar data can be shown.
Default Value
[]
flipX?
ts
optional flipX?: boolean;Mirror the avatar horizontally.
Default Value
false
height?
ts
optional height?: number;Height of the off-screen render surface, in pixels.
Default Value
512
padding?
ts
optional padding?: number;Transparent margin kept around the avatar when trim is on, in pixels.
Default Value
0
scale?
ts
optional scale?: number;Scale applied to the avatar. When omitted, it is computed to fit height.
settleDelay?
ts
optional settleDelay?: number;Delay before the capture, in milliseconds: lets the animation settle instead of capturing the rest pose.
Default Value
300
timeout?
ts
optional timeout?: number;Abort the render after this many milliseconds.
Default Value
15000
trim?
ts
optional trim?: boolean;Crop the fully transparent borders of the capture.
Default Value
true
width?
ts
optional width?: number;Width of the off-screen render surface, in pixels.
Default Value
512