@leafer-draw/node
Compared to @leafer-ui/node, this package reduces features such as App and event interactions, making it suitable for pure drawing scenarios.
web version worker version node version mini program version
Runs in a server-side Node environment. It can be used for backend rendering, image generation, and automated testing, and can simulate user interactions.
Installation
sh
npm install @leafer-draw/nodesh
pnpm add @leafer-draw/nodesh
yarn add @leafer-draw/nodesh
bun add @leafer-draw/nodeskia | napi
@napi-rs/canvas is used in server environments to replace Canvas functionality. It is also based on Skia, but unlike skia-canvas, it is wrapped in Rust, offering high performance and zero system dependencies. It must be installed separately.
sh
npm install @napi-rs/canvassh
pnpm add @napi-rs/canvassh
yarn add @napi-rs/canvassh
bun add @napi-rs/canvasUpdate
Learn how to quickly update versions.
Usage
The usage, global variables, and @leafer-ui/node are consistent. You only need to change the package name to run the official example code.