@doki-land/live2d 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/l2d.umd.js +47 -47
- package/dist/l2d.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +3 -7
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -50,8 +50,9 @@ export async function createLive2D(options: Live2dOptions): Promise<Live2DModel>
|
|
|
50
50
|
});
|
|
51
51
|
|
|
52
52
|
// 加载模型
|
|
53
|
-
const model = await Live2DModel.from(models[0].model_url
|
|
54
|
-
|
|
53
|
+
const model = await Live2DModel.from(models[0].model_url, {
|
|
54
|
+
ticker: Ticker.system,
|
|
55
|
+
});
|
|
55
56
|
// 添加模型到舞台
|
|
56
57
|
app.stage.addChild(model);
|
|
57
58
|
|
|
@@ -194,11 +195,6 @@ export async function initializeLive2D() {
|
|
|
194
195
|
// @ts-ignore
|
|
195
196
|
// window.Live2DCubismCore = cubism5 || Cubism5().Live2DCubismCore;
|
|
196
197
|
|
|
197
|
-
// 最后初始化 PIXI 相关功能
|
|
198
|
-
// 为 Live2DModel 注册 Ticker
|
|
199
|
-
Live2DModel.registerTicker(Ticker);
|
|
200
|
-
// 为 Application 注册 Ticker
|
|
201
|
-
PIXI.extensions.add(TickerPlugin);
|
|
202
198
|
// 注册 InteractionManager 以支持 Live2D 模型的自动交互
|
|
203
199
|
// PIXI.extensions.add(InteractionManager);
|
|
204
200
|
}
|