LogoPixi’VN

画布(WebGL/WebGPU)

概述Pixi’VN如何使用PixiJS进行渲染,Pixi’VN与PixiJS之间的区别,以及如何与画布交互和使用调试工具。

Pixi'VN使用PixiJS进行渲染。 你可以通过Pixi'VN API将图像、文本和动画添加到PixiJS画布(Canvas)中(更准确地说,是添加到2D WebGL/WebGPU渲染引擎中)。

使用

ink

此方法可以与_ink_语法一起使用。 查看更多请点击这里

To interact with the PixiJS application, you can use the canvas element, which acts as a wrapper. With it, you can add the set of components provided by Pixi’VN and start animations.

import { canvas, Sprite } from "@drincs/pixi-vn"

export const startLabel = newLabel("start_label",
    [
        () => {
            let sprite = new Sprite({}); 
            canvas.add("sprite", sprite); 
        },
    ]
)

其他叙事功能

On this page