Skip to content

创建选项

60 words
0 min

创建选项, 用于在创建模型定义模型的行为和样式

ts
const l2d = init(document.getElementById('l2d') as HTMLCanvasElement);
l2d.create({
  // ... 在这里定义创建选项
});

你可以定义以下这些选项:

anchor?

optional anchor: [number, number]

锚点位置, x: 横坐标距离 y:纵坐标距离


motionSync?

optional motionSync: string

动作同步资源路径


path

path: string

模型地址


position?

optional position: [number, number] | "center"

模型在画布中的横纵坐标


rotaion?

optional rotaion: number

模型在画布中旋转的角度


scale?

optional scale: number | "auto"

模型的缩放比例


volume?

optional volume: number

音量, 值为 0 - 1

MIT Licensed