@gamelearn/arcade-components 0.25.35 → 0.25.36

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.
@@ -194,6 +194,11 @@ var DialogComponent = function DialogComponent(_ref) {
194
194
  });
195
195
  }
196
196
  }, [getCurrentVisible, lastLine === null || lastLine === void 0 ? void 0 : lastLine.slots, scene]);
197
+ var resetCameraView = (0, _react.useCallback)(function () {
198
+ messagePosition.current.child = null;
199
+ messagePosition.current.parent = null;
200
+ if (zoomInActor) animationStart.current = true;
201
+ }, [zoomInActor]);
197
202
  var backLine = (0, _react.useCallback)(function () {
198
203
  if (lastLine && !lastLine.decision) {
199
204
  changeLine(line - 1);
@@ -206,26 +211,15 @@ var DialogComponent = function DialogComponent(_ref) {
206
211
  resetAnims(true);
207
212
  lastSet.current = true;
208
213
  setCurrentMessage({});
209
- messagePosition.current.pos = defaultCamera.current.position.clone().add(new _three.Vector3(0, 5, -35)).toArray();
210
-
211
- if (zoomInActor) {
212
- animationStart.current = true;
213
- } else {
214
- camera.copy(defaultCamera.current);
215
- }
216
-
214
+ resetCameraView();
217
215
  setTimeout(function () {
218
216
  emitEvent({
219
217
  type: 'success'
220
218
  });
221
- }, currentLine.decision ? 0 : 700);
219
+ camera.copy(defaultCamera.current);
220
+ }, currentLine.decision ? 0 : 1200);
222
221
  }
223
- }, [camera, currentLine.decision, emitEvent, line, lines.length, resetAnims, zoomInActor]);
224
- var resetCameraView = (0, _react.useCallback)(function () {
225
- messagePosition.current.child = null;
226
- messagePosition.current.parent = null;
227
- if (zoomInActor) animationStart.current = true;
228
- }, [zoomInActor]); // Position bubble over talking character/and switch emotions
222
+ }, [camera, currentLine.decision, emitEvent, line, lines.length, resetAnims, resetCameraView]); // Position bubble over talking character/and switch emotions
229
223
 
230
224
  (0, _react.useEffect)(function () {
231
225
  setCurrentMessage({});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gamelearn/arcade-components",
3
3
  "license": "Gamelearn",
4
- "version": "0.25.35",
4
+ "version": "0.25.36",
5
5
  "main": "dist/index.js",
6
6
  "files": [
7
7
  "dist",