@gamelearn/arcade-components 2.13.0 → 2.13.1
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.
|
@@ -125,9 +125,9 @@ function Panel(_ref) {
|
|
|
125
125
|
cameraRef.current.rotation.set(0, 0, 0);
|
|
126
126
|
cameraRef.current.updateProjectionMatrix();
|
|
127
127
|
cameraRef.current.layers.enableAll();
|
|
128
|
+
var defaultAnim = object.userData.defaultAnim;
|
|
128
129
|
|
|
129
|
-
if (character.type === 'character') {
|
|
130
|
-
var defaultAnim = object.userData.defaultAnim;
|
|
130
|
+
if (character.type === 'character' && defaultAnim) {
|
|
131
131
|
model.current = object;
|
|
132
132
|
defaultClip.current = defaultAnim.clone();
|
|
133
133
|
cameraRef.current.position.setY(size.y - 1.5 * 1.3); // Retro compatible with resources without eye bone
|
|
@@ -139,7 +139,7 @@ function Panel(_ref) {
|
|
|
139
139
|
}
|
|
140
140
|
});
|
|
141
141
|
cameraRef.current.zoom = 1.85;
|
|
142
|
-
} else if (character.type === 'object') {
|
|
142
|
+
} else if (character.type === 'object' || !defaultAnim) {
|
|
143
143
|
(0, _helpers.cameraFitAnyObject)(object, cameraRef.current);
|
|
144
144
|
cameraRef.current.zoom = 1;
|
|
145
145
|
}
|
|
@@ -313,6 +313,10 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
313
313
|
return;
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
+
if (!element.isTalking) {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
|
|
316
320
|
var _element$userData = element.userData,
|
|
317
321
|
mixer = _element$userData.mixer,
|
|
318
322
|
defaultAnim = _element$userData.defaultAnim,
|
|
@@ -323,6 +327,7 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
323
327
|
var defaultAction = mixer.clipAction(defaultAnim, element);
|
|
324
328
|
mixer.stopAllAction();
|
|
325
329
|
(0, _helpers.executeCrossFade)(emotionAction, defaultAction, crossFadeDuration);
|
|
330
|
+
element.isTalking = false;
|
|
326
331
|
}
|
|
327
332
|
|
|
328
333
|
startTalking(false);
|
package/dist/helpers/index.js
CHANGED
|
@@ -232,6 +232,7 @@ var executeTalkingAnimation = function executeTalkingAnimation(target, talkingUR
|
|
|
232
232
|
var emotionAction = mixer.clipAction(talkingSubClip, target);
|
|
233
233
|
emotionAction.loop = _three.LoopPingPong;
|
|
234
234
|
mixer.stopAllAction();
|
|
235
|
+
target.isTalking = true;
|
|
235
236
|
executeCrossFade(defaultAction, emotionAction, crossFadeDuration);
|
|
236
237
|
}
|
|
237
238
|
};
|