@gamelearn/arcade-components 1.2.0 → 1.2.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.
|
@@ -88,7 +88,8 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
88
88
|
inScene: false,
|
|
89
89
|
thinkful: false,
|
|
90
90
|
voiceOver: false,
|
|
91
|
-
avatar: ''
|
|
91
|
+
avatar: '',
|
|
92
|
+
show: false
|
|
92
93
|
}),
|
|
93
94
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
94
95
|
currentMessage = _useState6[0],
|
|
@@ -308,7 +309,8 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
308
309
|
inScene: false,
|
|
309
310
|
voiceOver: true,
|
|
310
311
|
thinkful: false,
|
|
311
|
-
avatar: ''
|
|
312
|
+
avatar: '',
|
|
313
|
+
show: true
|
|
312
314
|
});
|
|
313
315
|
} else if (!lastSet.current) {
|
|
314
316
|
var talkingCharacter = currentLine.slots.find(function (slot) {
|
|
@@ -378,7 +380,8 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
378
380
|
left: true,
|
|
379
381
|
inScene: true,
|
|
380
382
|
thinkful: talkingCharacter.emotion === 'thinkful',
|
|
381
|
-
avatar: ''
|
|
383
|
+
avatar: '',
|
|
384
|
+
show: true
|
|
382
385
|
});
|
|
383
386
|
}, zoomInActor ? 1200 : 0);
|
|
384
387
|
}
|
|
@@ -394,9 +397,15 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
394
397
|
left: false,
|
|
395
398
|
inScene: false,
|
|
396
399
|
thinkful: talkingCharacter.emotion === 'thinkful',
|
|
397
|
-
avatar: getAvatarURL(talkingCharacter)
|
|
400
|
+
avatar: getAvatarURL(talkingCharacter),
|
|
401
|
+
show: true
|
|
398
402
|
});
|
|
399
403
|
}
|
|
404
|
+
} else {
|
|
405
|
+
resetCameraView();
|
|
406
|
+
setCurrentMessage({
|
|
407
|
+
show: true
|
|
408
|
+
});
|
|
400
409
|
}
|
|
401
410
|
}
|
|
402
411
|
}, [actors, camera, currentLine, zoomInActor, getCurrentVisible, translate, getAvatarURL, loadEmotion, resetAnims, resetCameraView]); // Sound logic
|
|
@@ -470,7 +479,8 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
470
479
|
return _objectSpread(_objectSpread({}, old), {}, {
|
|
471
480
|
left: false,
|
|
472
481
|
inScene: !completeOutside,
|
|
473
|
-
avatar: getAvatarURL(talkingCharacter)
|
|
482
|
+
avatar: getAvatarURL(talkingCharacter),
|
|
483
|
+
show: true
|
|
474
484
|
});
|
|
475
485
|
});
|
|
476
486
|
}
|
|
@@ -561,7 +571,7 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
561
571
|
}, decisionPayload)));
|
|
562
572
|
}
|
|
563
573
|
|
|
564
|
-
return
|
|
574
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, currentMessage.text ? /*#__PURE__*/_react.default.createElement("group", {
|
|
565
575
|
ref: groupRef,
|
|
566
576
|
position: messagePosition.current.pos
|
|
567
577
|
}, /*#__PURE__*/_react.default.createElement(_arcadeThreeCore.HtmlPro, {
|
|
@@ -575,7 +585,7 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
575
585
|
}, /*#__PURE__*/_react.default.createElement(_SpeechBubbleComponent.default, {
|
|
576
586
|
ref: bubbleRef,
|
|
577
587
|
message: currentMessage
|
|
578
|
-
}))), /*#__PURE__*/_react.default.createElement(_arcadeThreeCore.HtmlPro, {
|
|
588
|
+
}))) : null, currentMessage.show ? /*#__PURE__*/_react.default.createElement(_arcadeThreeCore.HtmlPro, {
|
|
579
589
|
style: {
|
|
580
590
|
width: '100vw',
|
|
581
591
|
height: '100vh'
|
|
@@ -600,7 +610,7 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
600
610
|
onClick: nextLine
|
|
601
611
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
602
612
|
className: "icon-next"
|
|
603
|
-
}))))
|
|
613
|
+
})))) : null);
|
|
604
614
|
};
|
|
605
615
|
|
|
606
616
|
var _default = DialogComponent;
|