@vmz/plugin-live2d 0.0.24 → 0.0.26
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/README.md +2 -2
- package/components/Live2dHost.vmz +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -9,10 +9,10 @@ pnpm add @vmz/plugin-live2d @vmz/ui @vmz/ui-icons
|
|
|
9
9
|
**App** (`vmz.config.ts`):
|
|
10
10
|
|
|
11
11
|
```ts
|
|
12
|
-
import {
|
|
12
|
+
import {defineConfig} from '@vmz/vmz';
|
|
13
13
|
import live2d from '@vmz/plugin-live2d';
|
|
14
14
|
|
|
15
|
-
export default defineConfig({
|
|
15
|
+
export default defineConfig({plugins: [live2d]});
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
**Plugin** (`vmz.plugin.ts` in this package) uses `definePlugin` from `@vmz/plugin`.
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
</style>
|
|
40
40
|
|
|
41
41
|
<script client>
|
|
42
|
-
import {
|
|
42
|
+
import { createLive2d } from '@doki-land/live2d';
|
|
43
43
|
|
|
44
44
|
let hostSeq = 0;
|
|
45
45
|
|
|
@@ -53,7 +53,7 @@ export default class Live2dHost {
|
|
|
53
53
|
public showProgress = true;
|
|
54
54
|
public exposeCaptureApi = false;
|
|
55
55
|
public capturePresetId = '';
|
|
56
|
-
/** Called with
|
|
56
|
+
/** Called with Live2dRuntime after loadModel succeeds. */
|
|
57
57
|
public onReady = null;
|
|
58
58
|
/** Optional frame profile listener (caller should throttle UI). */
|
|
59
59
|
public onProfile = null;
|
|
@@ -179,7 +179,7 @@ export default class Live2dHost {
|
|
|
179
179
|
const prefer = Array.isArray(this.prefer)
|
|
180
180
|
? this.prefer
|
|
181
181
|
: ['canvas2d', 'webgl2', 'webgpu'];
|
|
182
|
-
const runtime =
|
|
182
|
+
const runtime = createLive2d({ prefer, updateMode: 'auto' });
|
|
183
183
|
runtime.events.on('ready', () => {
|
|
184
184
|
if (generation !== this._bootGeneration) return;
|
|
185
185
|
this.loading = false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vmz/plugin-live2d",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"description": "VMZ Live2D adapter — <Live2dHost> for @doki-land/live2d in VMZ applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"test": "vitest run --passWithNoTests"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@doki-land/live2d": "0.0.
|
|
39
|
+
"@doki-land/live2d": "0.0.26",
|
|
40
40
|
"@vmz/plugin": "^0.1.8"
|
|
41
41
|
}
|
|
42
42
|
}
|