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", [
    () => {
        let sprite = new Sprite({}); 
        canvas.add("sprite", sprite); 
    },
]);

其他功能

On this page