Canvas (WebGL/WebGPU)
Overview of how Pixi’VN uses PixiJS for rendering, differences between Pixi’VN and PixiJS, and how to interact with the canvas and debugging tools.
Pixi’VN uses PixiJS for rendering. You can use the Pixi’VN API to add images, text, and animations to the PixiJS canvas (or, more precisely, to the 2D WebGL/WebGPU rendering engine).
使用
ink
このメソッドは ink の構文でも使用できます。 See more here.
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);
},
]
)