构建必须单独下载 Cubism 5 SDK

Author: tb148Created Jul 6, 2025Updated May 22, 2026

src/model.ts 中有这么一句:

typescript
this.cubism5model.initialize();

但是在 src/cubism5/index.jsAppDelegate 并没有 initialize 方法,这个方法实际上是在 LAppDelegate 中定义的,而 LAppDelegate 的定义位于 Cubism 5 SDK 中。因此构建时若没有 Cubism 5 SDK 会产生如下的报错:

src/model.ts:252:29 - error TS2339: Property 'initialize' does not exist on type 'AppDelegate'.

252           this.cubism5model.initialize();
                                ~~~~~~~~~~


Found 1 error in src/model.ts:252

导致构建失败。

Source: stevenjoezhang/live2d-widget