LogoPixi’VN
inkFunctions

Function: createLive2DHandler()

> createLive2DHandler(): void

Defined in: src/ink/live2dHandler.ts:196

Registers the # show live2d Ink hashtag command, letting Ink scripts show a Live2D canvas element the same way @drincs/pixi-vn-ink's built-in # show image shows an ImageSprite: <alias> is just the canvas key (like every other # show ... command). <source> (the model settings URL, or an asset alias) is an optional second positional token — when omitted, <alias> itself is used as the source. Key/value construction props (forwarded to Live2DOptions) and an optional entrance transition follow.

Registered as two handlers (one per position of the free-form props, since keySchemas keys refer to a fixed token index) that together behave as a single command with an optional <source>.

Call this once, near the start of your app (alongside e.g. addBaseHashtagCommands), before any Ink content is parsed.

Returns

void

Example

# show live2d hero xAlign 0.5 yAlign 1 with dissolve duration 1
# show live2d hero hero-alt xAlign 0.5 yAlign 1 with dissolve duration 1

On this page