@uniarts/live2d
v1.0.2
Published
## Project setup ``` yarn add @uniarts/live2d ```
Downloads
64
Readme
Live2D SDK
Version
Live2D Core Version 4.0.0
Project setup
yarn add @uniarts/live2d
Use
import Live2D from "@uniarts/live2d"
async function init() {
let live2dInstance = new Live2D();
let manager = await live2dInstance.initialize({
canvasWrapper: /* canvasWrapper */,
width: /* canvasWrapper's width */,
height: /* canvasWrapper's height */,
canvas: /* canvas */,
bgPath: /* url */,
bgName: /* bg.png */,
});
manager.addModel({
path: /* modelPath url */,
modelName: /* modelName */,
});
};
init();