cocos-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 +1 -1
- package/package.json +2 -2
- package/src/creator3/Live2D.ts +5 -5
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cocos-plugin-live2d",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"description": "Cocos Creator Live2D component — Creator 3.x Web runtime; Creator 2.4 scaffold entry.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"test": "vitest run"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@doki-land/live2d": "0.0.
|
|
42
|
+
"@doki-land/live2d": "0.0.26"
|
|
43
43
|
},
|
|
44
44
|
"sideEffects": false
|
|
45
45
|
}
|
package/src/creator3/Live2D.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
createLive2d as createLive2dRuntime,
|
|
3
3
|
createRenderer,
|
|
4
4
|
focusParameterUpdates,
|
|
5
|
-
type
|
|
5
|
+
type Live2dRuntime,
|
|
6
6
|
type RendererKind,
|
|
7
7
|
} from "@doki-land/live2d";
|
|
8
8
|
import {
|
|
@@ -61,7 +61,7 @@ export class Live2D extends Component {
|
|
|
61
61
|
|
|
62
62
|
#canvas: HTMLCanvasElement | null = null;
|
|
63
63
|
#scratch: HTMLCanvasElement | null = null;
|
|
64
|
-
#runtime:
|
|
64
|
+
#runtime: Live2dRuntime | null = null;
|
|
65
65
|
#texture: Texture2D | null = null;
|
|
66
66
|
#spriteFrame: SpriteFrame | null = null;
|
|
67
67
|
#sprite: Sprite | null = null;
|
|
@@ -121,7 +121,7 @@ export class Live2D extends Component {
|
|
|
121
121
|
this.#spriteFrame = null;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
getRuntime():
|
|
124
|
+
getRuntime(): Live2dRuntime | null {
|
|
125
125
|
return this.#runtime;
|
|
126
126
|
}
|
|
127
127
|
|
|
@@ -173,7 +173,7 @@ export class Live2D extends Component {
|
|
|
173
173
|
this.#scratch = document.createElement("canvas");
|
|
174
174
|
|
|
175
175
|
const prefer = normalizePrefer(this.prefer);
|
|
176
|
-
const runtime =
|
|
176
|
+
const runtime = createLive2dRuntime({
|
|
177
177
|
renderer: createRenderer({ prefer }),
|
|
178
178
|
});
|
|
179
179
|
this.#runtime = runtime;
|