@archvisioninc/canvas 3.3.9 → 3.3.10
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.
|
@@ -278,6 +278,9 @@ const pushAnimationStateToReact = () => {
|
|
|
278
278
|
props.setSerializedData(serializeScene());
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
|
+
export const resetAnimationSync = () => {
|
|
282
|
+
animationSyncObserver = null;
|
|
283
|
+
};
|
|
281
284
|
const ensureAnimationStateSync = () => {
|
|
282
285
|
if (animationSyncObserver || !scene?.onBeforeRenderObservable) {
|
|
283
286
|
return;
|
|
@@ -3,7 +3,7 @@ import * as MATERIALS from 'babylonjs-materials';
|
|
|
3
3
|
import * as BABYLONGUI from 'babylonjs-gui';
|
|
4
4
|
import { LISTENERS, LIGHTS, CAMERAS, VIEWPORT } from '../constants';
|
|
5
5
|
import { shortcuts, ratios, downscaling, exclusionMeshes, exclusionMaterials } from '../enums';
|
|
6
|
-
import { newScene, newEngine, newCamera, newLight, newVector, newHighlightManager, handleMouseListeners, handleShortcutListeners, prepareCamera, newGround, newGridMaterial, newColor, setDefaultGridProperties, prepareAxes, getBoundingDistance, newGizmoManager, getUserMeshes, getUserMaterials, newPBRMaterial, createSafeFrame, createDragSelectBox, addInitialGizmoBehaviors, loadFromBlob, loadFromGuidURL, prepareMaterialCamera, loadFromDragDrop, addHighlightExclusion, warningChecks, toRadians, toDegrees, getStatisticsMetadata, newMetaDataEntry, serializeScene, buildMeshPositionsArray, buildMaterialsArray, buildAnimationsArray, updatePublish, buildSelectedMaterialArray, buildMaterialVariantsArray, removeAutoRotation, getUserNodes, buildLightsArray } from '../helpers';
|
|
6
|
+
import { newScene, newEngine, newCamera, newLight, newVector, newHighlightManager, handleMouseListeners, handleShortcutListeners, prepareCamera, newGround, newGridMaterial, newColor, setDefaultGridProperties, prepareAxes, getBoundingDistance, newGizmoManager, getUserMeshes, getUserMaterials, newPBRMaterial, createSafeFrame, createDragSelectBox, addInitialGizmoBehaviors, loadFromBlob, loadFromGuidURL, prepareMaterialCamera, loadFromDragDrop, addHighlightExclusion, warningChecks, toRadians, toDegrees, getStatisticsMetadata, newMetaDataEntry, serializeScene, buildMeshPositionsArray, buildMaterialsArray, buildAnimationsArray, updatePublish, buildSelectedMaterialArray, buildMaterialVariantsArray, removeAutoRotation, getUserNodes, buildLightsArray, resetAnimationSync } from '../helpers';
|
|
7
7
|
import { modelToOrigin, focusCamera } from '../actions';
|
|
8
8
|
import { reactProps as props } from '../Canvas';
|
|
9
9
|
import _ from 'lodash';
|
|
@@ -508,6 +508,7 @@ export const cleanup = preserveEngine => {
|
|
|
508
508
|
engine?.dispose();
|
|
509
509
|
engine = null;
|
|
510
510
|
}
|
|
511
|
+
resetAnimationSync();
|
|
511
512
|
scene?.dispose();
|
|
512
513
|
scene = null;
|
|
513
514
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@archvisioninc/canvas",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "dist/Canvas.js",
|
|
6
6
|
"module": "dist/Canvas.js",
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
]
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@archvisioninc/canvas": "^3.3.8",
|
|
32
31
|
"d3-array": "^3.2.2",
|
|
33
32
|
"lodash": "^4.17.21",
|
|
34
33
|
"styled-components": "^5.3.6"
|
|
@@ -348,6 +348,10 @@ const pushAnimationStateToReact = () => {
|
|
|
348
348
|
}
|
|
349
349
|
};
|
|
350
350
|
|
|
351
|
+
export const resetAnimationSync = () => {
|
|
352
|
+
animationSyncObserver = null;
|
|
353
|
+
};
|
|
354
|
+
|
|
351
355
|
const ensureAnimationStateSync = () => {
|
|
352
356
|
if (animationSyncObserver || !scene?.onBeforeRenderObservable) {
|
|
353
357
|
return;
|
|
@@ -46,6 +46,7 @@ import {
|
|
|
46
46
|
removeAutoRotation,
|
|
47
47
|
getUserNodes,
|
|
48
48
|
buildLightsArray,
|
|
49
|
+
resetAnimationSync,
|
|
49
50
|
} from '../helpers';
|
|
50
51
|
import { modelToOrigin, focusCamera } from '../actions';
|
|
51
52
|
import { reactProps as props } from '../Canvas';
|
|
@@ -562,6 +563,7 @@ export const cleanup = preserveEngine => {
|
|
|
562
563
|
engine = null;
|
|
563
564
|
}
|
|
564
565
|
|
|
566
|
+
resetAnimationSync();
|
|
565
567
|
scene?.dispose();
|
|
566
568
|
scene = null;
|
|
567
569
|
};
|