@gamelearn/arcade-components 2.4.3 → 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.
@@ -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
- }; // Recupera la antigua linea de la conversacion para conservar los personajes en voice-over
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); // todo cambiar el decision para indicar la decisión escogida
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; // Mobile always zoom in?
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]); // Move to three core?
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); // Detectar posicion de personaje a izq o derecha de pantalla
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
- }); // TODO: CHECK IF OBJECT BETWEEN CAMERA AND TARGET
707
+ }); // Make objects invisible in front of the camera
712
708
 
713
709
  if (changedMats.current.length) {
714
710
  changedMats.current.forEach(function (o) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@gamelearn/arcade-components",
3
3
  "author": "Gamelearn",
4
4
  "license": "unlicense",
5
- "version": "2.4.3",
5
+ "version": "2.4.4",
6
6
  "main": "dist/index.js",
7
7
  "files": [
8
8
  "dist",