cocos-plugin-live2d 0.0.17 → 0.0.19
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/package.json +2 -2
- package/src/creator3/Live2D.ts +2 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cocos-plugin-live2d",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
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.19"
|
|
43
43
|
},
|
|
44
44
|
"sideEffects": false
|
|
45
45
|
}
|
package/src/creator3/Live2D.ts
CHANGED
|
@@ -245,9 +245,7 @@ export class Live2D extends Component {
|
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
#parameterFromNormalized(id: string, normalized: number): number {
|
|
248
|
-
const binding = this.#runtime
|
|
249
|
-
?.listParameters()
|
|
250
|
-
.find((p) => p.id === id);
|
|
248
|
+
const binding = this.#runtime?.parameterMap().get(id);
|
|
251
249
|
if (!binding) return normalized;
|
|
252
250
|
return normalized >= 0
|
|
253
251
|
? binding.defaultValue +
|
|
@@ -277,7 +275,7 @@ export class Live2D extends Component {
|
|
|
277
275
|
if (!runtime) return;
|
|
278
276
|
this.#autoSwayPausedByPointer = true;
|
|
279
277
|
for (const { id, value } of focusParameterUpdates(
|
|
280
|
-
runtime.
|
|
278
|
+
runtime.parameterMap(),
|
|
281
279
|
x,
|
|
282
280
|
y,
|
|
283
281
|
)) {
|