@gamelearn/arcade-components 2.17.3 → 2.17.5

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
- return executeDefaultAnimation(node);
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'];
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.17.3",
5
+ "version": "2.17.5",
6
6
  "main": "dist/index.js",
7
7
  "files": [
8
8
  "dist",