@gamelearn/arcade-components 1.26.1-hotfix-3-hanged → 1.26.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.
|
@@ -392,13 +392,13 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
392
392
|
target.applyQuaternion(camera.quaternion);
|
|
393
393
|
var distance = camera.position.distanceTo(target.position);
|
|
394
394
|
var staticDisplay = distance > 70 && !zoomInActor && !showArrowTop;
|
|
395
|
-
target.translateY(staticDisplay || showArrowTop ?
|
|
395
|
+
target.translateY(staticDisplay || showArrowTop ? 0 : 2); // Detectar posicion de personaje a izq o derecha de pantalla
|
|
396
396
|
|
|
397
397
|
var vector = new _three.Vector3();
|
|
398
398
|
vector.setFromMatrixPosition(head.matrixWorld);
|
|
399
399
|
var p = vector.project(defaultCamera);
|
|
400
|
+
target.translateX(headSize);
|
|
400
401
|
var isLeft = p.x < 0;
|
|
401
|
-
target.translateX(-1);
|
|
402
402
|
messagePosition.current = {
|
|
403
403
|
pos: target.position.toArray(),
|
|
404
404
|
child: head,
|
|
@@ -570,7 +570,7 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
570
570
|
}, [currentMessage, nextLine, start, stop, currentLine === null || currentLine === void 0 ? void 0 : currentLine.audioType, autoPlayCond, audio, voice, audioFailed]); // Positioning Bubble Message logic
|
|
571
571
|
|
|
572
572
|
var checkBubbleBounds = (0, _react.useCallback)(function (group, bubble) {
|
|
573
|
-
if (currentLine !== null && currentLine !== void 0 && currentLine.slots && currentMessage.show
|
|
573
|
+
if (currentLine !== null && currentLine !== void 0 && currentLine.slots && currentMessage.show) {
|
|
574
574
|
var talkingCharacter = currentLine === null || currentLine === void 0 ? void 0 : currentLine.slots.find(function (slot) {
|
|
575
575
|
return slot.talking;
|
|
576
576
|
});
|
|
@@ -633,7 +633,7 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
633
633
|
|
|
634
634
|
messagePosition.current.pos[0] -= headSpace;
|
|
635
635
|
animationTarget.current.translateX(-10 + headSpace);
|
|
636
|
-
animationTarget.current.translateY(
|
|
636
|
+
animationTarget.current.translateY(-5);
|
|
637
637
|
animationTarget.current.translateZ(30);
|
|
638
638
|
}
|
|
639
639
|
|
|
@@ -52,8 +52,7 @@ var AnswerPanel = function AnswerPanel(_ref) {
|
|
|
52
52
|
var answer = _ref.answer,
|
|
53
53
|
flickerPosition = _ref.flickerPosition,
|
|
54
54
|
_ref$show = _ref.show,
|
|
55
|
-
show = _ref$show === void 0 ? false : _ref$show
|
|
56
|
-
showCorrectSolution = _ref.showCorrectSolution;
|
|
55
|
+
show = _ref$show === void 0 ? false : _ref$show;
|
|
57
56
|
var words = [];
|
|
58
57
|
var wordIndex = 0;
|
|
59
58
|
answer.forEach(function (a) {
|
|
@@ -67,9 +66,7 @@ var AnswerPanel = function AnswerPanel(_ref) {
|
|
|
67
66
|
wordIndex += 1;
|
|
68
67
|
}
|
|
69
68
|
|
|
70
|
-
|
|
71
|
-
a.positionInitial = a.index;
|
|
72
|
-
}
|
|
69
|
+
a.positionInitial = a.index;
|
|
73
70
|
});
|
|
74
71
|
return words.map(function (word, index) {
|
|
75
72
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -506,12 +503,10 @@ var HangedPuzzleComponent = function HangedPuzzleComponent(_ref4) {
|
|
|
506
503
|
dir: "auto",
|
|
507
504
|
className: "puzzle--hanged__solution ".concat(resolvedClass),
|
|
508
505
|
"data-testid": "".concat(resolvedClass)
|
|
509
|
-
}, showCorrectSolution ? /*#__PURE__*/_react.default.createElement(
|
|
510
|
-
showCorrectSolution: showCorrectSolution,
|
|
506
|
+
}, showCorrectSolution ? /*#__PURE__*/_react.default.createElement(AnswerPanel, {
|
|
511
507
|
answer: answer.split(''),
|
|
512
508
|
show: true
|
|
513
|
-
})
|
|
514
|
-
showCorrectSolution: showCorrectSolution,
|
|
509
|
+
}) : /*#__PURE__*/_react.default.createElement(AnswerPanel, {
|
|
515
510
|
flickerPosition: flickerPosition,
|
|
516
511
|
answer: resolvedAnswer
|
|
517
512
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -274,7 +274,9 @@ var VideoVisor = function VideoVisor(_ref) {
|
|
|
274
274
|
onEnded: onEnded,
|
|
275
275
|
onError: onError,
|
|
276
276
|
onPlaying: onPlaying
|
|
277
|
-
}, videoProps)
|
|
277
|
+
}, videoProps), /*#__PURE__*/_react.default.createElement("track", {
|
|
278
|
+
kind: "captions"
|
|
279
|
+
})), loading ? /*#__PURE__*/_react.default.createElement("div", {
|
|
278
280
|
className: "video-loading-container",
|
|
279
281
|
style: {
|
|
280
282
|
top: 0,
|
package/dist/helpers/index.js
CHANGED
|
@@ -158,7 +158,6 @@ var setWeight = function setWeight(action, weight) {
|
|
|
158
158
|
|
|
159
159
|
var executeCrossFade = function executeCrossFade(startAction, endAction, duration) {
|
|
160
160
|
if (startAction === endAction) return;
|
|
161
|
-
if (!startAction || !endAction) return;
|
|
162
161
|
startAction.play();
|
|
163
162
|
startAction.reset();
|
|
164
163
|
endAction.reset();
|