@gamelearn/arcade-components 2.17.3 → 2.17.6
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.
|
@@ -295,9 +295,11 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
295
295
|
|
|
296
296
|
var resetAnims = (0, _react.useCallback)(function () {
|
|
297
297
|
scene.traverseVisible(function (node) {
|
|
298
|
-
|
|
298
|
+
if (charactersInvolved.includes(node.elementUid)) {
|
|
299
|
+
executeDefaultAnimation(node);
|
|
300
|
+
}
|
|
299
301
|
});
|
|
300
|
-
}, [scene]);
|
|
302
|
+
}, [scene, charactersInvolved]);
|
|
301
303
|
var resetCameraView = (0, _react.useCallback)(function () {
|
|
302
304
|
messagePosition.current.child = null;
|
|
303
305
|
messagePosition.current.parent = null;
|
|
@@ -361,7 +363,13 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
361
363
|
emitEvent({
|
|
362
364
|
type: 'success'
|
|
363
365
|
});
|
|
364
|
-
}, [camera, emitEvent, resetAnims, resetCameraView]);
|
|
366
|
+
}, [camera, emitEvent, resetAnims, resetCameraView]); // Reset anim after unmount
|
|
367
|
+
|
|
368
|
+
(0, _react.useEffect)(function () {
|
|
369
|
+
return function () {
|
|
370
|
+
resetAnims();
|
|
371
|
+
};
|
|
372
|
+
}, []);
|
|
365
373
|
var handleBranchDirection = (0, _react.useCallback)(function () {
|
|
366
374
|
var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
367
375
|
var keys = forward ? ['fromId', 'toId'] : ['toId', 'fromId'];
|
|
@@ -82,10 +82,11 @@ var LecturesComponent = function LecturesComponent(_ref) {
|
|
|
82
82
|
var textWithDotsBeforeClosingTags = text.replace(regexForClosingTags, '. </p>');
|
|
83
83
|
var textWithoutStringsToDelete = textWithDotsBeforeClosingTags.replace(stringsToDelete, '');
|
|
84
84
|
var textParsedForTTSwithoutHtmlTags = textWithoutStringsToDelete.replace(/(<([^>]+)>)/gi, '');
|
|
85
|
+
var TitleAndTextParsedForTTSwithoutHtmlTags = "".concat(name, ". ").concat(textParsedForTTSwithoutHtmlTags);
|
|
85
86
|
(0, _useEkho.default)({
|
|
86
87
|
audioType: audioType,
|
|
87
88
|
voice: voice,
|
|
88
|
-
text:
|
|
89
|
+
text: TitleAndTextParsedForTTSwithoutHtmlTags,
|
|
89
90
|
audio: audio,
|
|
90
91
|
soundActions: soundActions,
|
|
91
92
|
emitEvent: emitEvent,
|