@gamelearn/arcade-components 2.4.2 → 2.4.4
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/dist/components/cards-selector-puzzle-component/components/CardsSelectorPuzzleComponent.js +3 -2
- package/dist/components/conversational-pro-component/components/ConversationalProComponent.js +2 -2
- package/dist/components/dialog-component/components/DialogComponent.js +6 -10
- package/package.json +1 -1
package/dist/components/cards-selector-puzzle-component/components/CardsSelectorPuzzleComponent.js
CHANGED
|
@@ -145,8 +145,9 @@ var CardsSelectorPuzzleComponent = function CardsSelectorPuzzleComponent(_ref) {
|
|
|
145
145
|
|
|
146
146
|
if (info.solution.right.desc && !(specificFeedbacks !== null && specificFeedbacks !== void 0 && specificFeedbacks.specificCorrectFeedbacks)) {
|
|
147
147
|
setFeedBackText(info.solution.right.desc);
|
|
148
|
-
setFeedbackIsShown(true);
|
|
149
148
|
}
|
|
149
|
+
|
|
150
|
+
setFeedbackIsShown(true);
|
|
150
151
|
};
|
|
151
152
|
|
|
152
153
|
var handleFeedbackFuncionOnClose = function handleFeedbackFuncionOnClose() {
|
|
@@ -175,10 +176,10 @@ var CardsSelectorPuzzleComponent = function CardsSelectorPuzzleComponent(_ref) {
|
|
|
175
176
|
|
|
176
177
|
if (pickedCard !== null && pickedCard !== void 0 && pickedCard.desc) {
|
|
177
178
|
setFeedBackText(pickedCard.desc);
|
|
179
|
+
setFeedbackIsShown(true);
|
|
178
180
|
}
|
|
179
181
|
}
|
|
180
182
|
|
|
181
|
-
setFeedbackIsShown(true);
|
|
182
183
|
playSound('score');
|
|
183
184
|
emitEvent({
|
|
184
185
|
type: 'hidePuzzleButtons',
|
package/dist/components/conversational-pro-component/components/ConversationalProComponent.js
CHANGED
|
@@ -185,7 +185,7 @@ var ConversationProViewer = function ConversationProViewer(_ref) {
|
|
|
185
185
|
slots: !isVoiceOver ? currentLineData.slots : voiceOverSlots,
|
|
186
186
|
flex: isFlex,
|
|
187
187
|
pause: pause
|
|
188
|
-
}; //
|
|
188
|
+
}; // Last line with slots
|
|
189
189
|
|
|
190
190
|
var leftWithSlots = lines.slice(0, currentLine + 1).reverse().find(function (line) {
|
|
191
191
|
return line.slots;
|
|
@@ -481,7 +481,7 @@ var ConversationProViewer = function ConversationProViewer(_ref) {
|
|
|
481
481
|
});
|
|
482
482
|
|
|
483
483
|
if (isDecision) {
|
|
484
|
-
return /*#__PURE__*/_react.default.createElement(_decisionComponent.default, decisionPayload);
|
|
484
|
+
return /*#__PURE__*/_react.default.createElement(_decisionComponent.default, decisionPayload);
|
|
485
485
|
}
|
|
486
486
|
|
|
487
487
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -65,14 +65,10 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
65
65
|
|
|
66
66
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
67
67
|
|
|
68
|
-
// import { DeviceDetection } from '../../../helpers/deviceDetection';
|
|
69
|
-
// Global
|
|
70
|
-
// const isMobile = DeviceDetection();
|
|
71
68
|
var crossFadeDuration = 0.2;
|
|
72
69
|
var characterMs = 75;
|
|
73
70
|
var minMs = 1400;
|
|
74
|
-
var headSize = 2;
|
|
75
|
-
|
|
71
|
+
var headSize = 2;
|
|
76
72
|
var raycast = new _three.Raycaster();
|
|
77
73
|
var maxCharacterToSwitch = 70;
|
|
78
74
|
raycast.firstHitOnly = true;
|
|
@@ -246,8 +242,7 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
246
242
|
return '';
|
|
247
243
|
});
|
|
248
244
|
return (slot === null || slot === void 0 ? void 0 : (_slot$character = slot.character) === null || _slot$character === void 0 ? void 0 : (_slot$character$resou = _slot$character.resource) === null || _slot$character$resou === void 0 ? void 0 : _slot$character$resou.url) || (object === null || object === void 0 ? void 0 : object.completeUrl) || '';
|
|
249
|
-
}, [actors]);
|
|
250
|
-
|
|
245
|
+
}, [actors]);
|
|
251
246
|
var loadEmotion = (0, _react.useCallback)(function (slot, element) {
|
|
252
247
|
var _slot$character2;
|
|
253
248
|
|
|
@@ -318,7 +313,8 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
318
313
|
}
|
|
319
314
|
|
|
320
315
|
startTalking(false);
|
|
321
|
-
};
|
|
316
|
+
}; // Execute talking animation
|
|
317
|
+
|
|
322
318
|
|
|
323
319
|
(0, _react.useEffect)(function () {
|
|
324
320
|
var element = getCurrentVisible(talkingCharacter === null || talkingCharacter === void 0 ? void 0 : talkingCharacter.uid);
|
|
@@ -496,7 +492,7 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
496
492
|
var yDistance = zoomInActor ? 2.5 : 2;
|
|
497
493
|
var xDistance = zoomInActor ? 1.2 : 1.5;
|
|
498
494
|
target.translateY(staticDisplay || showArrowTop ? 0 : yDistance);
|
|
499
|
-
target.translateX(xDistance); //
|
|
495
|
+
target.translateX(xDistance); // Check if character is left or right in the screen
|
|
500
496
|
|
|
501
497
|
var vector = new _three.Vector3();
|
|
502
498
|
vector.setFromMatrixPosition(head.matrixWorld);
|
|
@@ -708,7 +704,7 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
708
704
|
var objects = raycast.intersectObjects(scene.children, true);
|
|
709
705
|
changedMats.current = objects.filter(function (o) {
|
|
710
706
|
return o.distance < 10;
|
|
711
|
-
}); //
|
|
707
|
+
}); // Make objects invisible in front of the camera
|
|
712
708
|
|
|
713
709
|
if (changedMats.current.length) {
|
|
714
710
|
changedMats.current.forEach(function (o) {
|