@crystaldesign/real-time-viewer 26.8.0-beta.17 → 26.8.0-beta.19
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.
- package/build/esm/index.js +44 -17
- package/build/types/real-time-viewer/src/parser/findAssets/index.d.ts.map +1 -1
- package/build/types/real-time-viewer/src/parser/index.d.ts.map +1 -1
- package/build/types/real-time-viewer/src/store/UtilStore.d.ts +1 -0
- package/build/types/real-time-viewer/src/store/UtilStore.d.ts.map +1 -1
- package/build/umd/real-time-viewer.umd.min.js +1 -1
- package/build/umd/report.html +1 -1
- package/package.json +2 -2
package/build/esm/index.js
CHANGED
|
@@ -2854,6 +2854,22 @@ var UtilStore = /*#__PURE__*/function () {
|
|
|
2854
2854
|
if (dt.active && elementsToDisable.includes(dt.name)) _this.setAnalyzeDataRowStatus(dt.name, false);
|
|
2855
2855
|
});
|
|
2856
2856
|
}
|
|
2857
|
+
|
|
2858
|
+
// remove an element from every cached asset's onElements so a rebuilt/deleted element
|
|
2859
|
+
// does not leave stale (or, after buildScene re-pushes, duplicated) references
|
|
2860
|
+
}, {
|
|
2861
|
+
key: "removeElementFromCache",
|
|
2862
|
+
value: function removeElementFromCache(element, cache) {
|
|
2863
|
+
cache.forEach(function (val) {
|
|
2864
|
+
var _val$material2;
|
|
2865
|
+
if (val.geo) val.geo.onElements = val.geo.onElements.filter(function (el) {
|
|
2866
|
+
return el.name != element;
|
|
2867
|
+
});
|
|
2868
|
+
if ((_val$material2 = val.material) !== null && _val$material2 !== void 0 && _val$material2.onElements) val.material.onElements = val.material.onElements.filter(function (el) {
|
|
2869
|
+
return el.name != element;
|
|
2870
|
+
});
|
|
2871
|
+
});
|
|
2872
|
+
}
|
|
2857
2873
|
}, {
|
|
2858
2874
|
key: "setAnalyzeDataRowStatus",
|
|
2859
2875
|
value: function setAnalyzeDataRowStatus(name, status) {
|
|
@@ -3493,18 +3509,26 @@ function _findAssets() {
|
|
|
3493
3509
|
cachedGeo = newCache.find(function (g) {
|
|
3494
3510
|
return g.id == geo.id;
|
|
3495
3511
|
});
|
|
3496
|
-
if (cachedGeo
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
name
|
|
3500
|
-
}
|
|
3501
|
-
|
|
3502
|
-
geo: {
|
|
3512
|
+
if (cachedGeo !== null && cachedGeo !== void 0 && cachedGeo.geo) {
|
|
3513
|
+
// keep existing onElements (like materials do); only refresh the mesh reference
|
|
3514
|
+
cachedGeo.geo.geometry = mesh;
|
|
3515
|
+
cachedGeo.geo.name = geo.name;
|
|
3516
|
+
} else if (cachedGeo) {
|
|
3517
|
+
cachedGeo.geo = {
|
|
3503
3518
|
geometry: mesh,
|
|
3504
3519
|
onElements: [],
|
|
3505
3520
|
name: geo.name
|
|
3506
|
-
}
|
|
3507
|
-
}
|
|
3521
|
+
};
|
|
3522
|
+
} else {
|
|
3523
|
+
newCache.push({
|
|
3524
|
+
id: geo.id,
|
|
3525
|
+
geo: {
|
|
3526
|
+
geometry: mesh,
|
|
3527
|
+
onElements: [],
|
|
3528
|
+
name: geo.name
|
|
3529
|
+
}
|
|
3530
|
+
});
|
|
3531
|
+
}
|
|
3508
3532
|
_context3.next = 12;
|
|
3509
3533
|
return unifyAndSetStdMats(mesh, geo.blob);
|
|
3510
3534
|
case 12:
|
|
@@ -4092,7 +4116,9 @@ var parser = /*#__PURE__*/function () {
|
|
|
4092
4116
|
utilStore = useUtilStoreContext();
|
|
4093
4117
|
useGridStoreContext(); //disable elementrows from old cache
|
|
4094
4118
|
changedElements === null || changedElements === void 0 || (_changedElements$upda = changedElements.updatedElements) === null || _changedElements$upda === void 0 || _changedElements$upda.forEach(function (el) {
|
|
4095
|
-
|
|
4119
|
+
utilStore.disableElementRows(el.name, cache);
|
|
4120
|
+
// clear this element's stale onElements before buildScene re-adds them
|
|
4121
|
+
utilStore.removeElementFromCache(el.name, cache);
|
|
4096
4122
|
});
|
|
4097
4123
|
_context.next = 7;
|
|
4098
4124
|
return findAssets(hqRenderScript.assets, cache);
|
|
@@ -4106,6 +4132,7 @@ var parser = /*#__PURE__*/function () {
|
|
|
4106
4132
|
var _scene$getTransformNo;
|
|
4107
4133
|
(_scene$getTransformNo = scene.getTransformNodeByName(deletedElement.name)) === null || _scene$getTransformNo === void 0 || _scene$getTransformNo.dispose();
|
|
4108
4134
|
sceneStore.removeElement(deletedElement);
|
|
4135
|
+
utilStore.removeElementFromCache(deletedElement.name, cache);
|
|
4109
4136
|
});
|
|
4110
4137
|
}
|
|
4111
4138
|
if (changedElements && changedElements.updatedElements && changedElements.updatedElements.length > 0) {
|
|
@@ -4393,8 +4420,8 @@ function useRealTimeRenderData (_ref) {
|
|
|
4393
4420
|
return _onSceneReady.apply(this, arguments);
|
|
4394
4421
|
}
|
|
4395
4422
|
function onFirstFrame() {
|
|
4396
|
-
var _callbacks$onInitiali2;
|
|
4397
|
-
|
|
4423
|
+
var _sceneStore$scene, _callbacks$onInitiali2;
|
|
4424
|
+
(_sceneStore$scene = sceneStore.scene) === null || _sceneStore$scene === void 0 || (_sceneStore$scene = _sceneStore$scene.debugLayer) === null || _sceneStore$scene === void 0 || _sceneStore$scene.show();
|
|
4398
4425
|
sceneStore.isInitializing = false;
|
|
4399
4426
|
sceneStore.scene.onAfterRenderObservable.removeCallback(onFirstFrame);
|
|
4400
4427
|
if (!overlayImage && !disableToggleLoading) actions.toggleLoading('buildScene', false, false);
|
|
@@ -4408,8 +4435,8 @@ function useRealTimeRenderData (_ref) {
|
|
|
4408
4435
|
// trigger if gamecanvas did not update but renderjob
|
|
4409
4436
|
if (gameCanvas.current && sceneStore && sceneStore.scene.getEngine()) {
|
|
4410
4437
|
var _queueRerender = function queueRerender() {
|
|
4411
|
-
var _sceneStore$
|
|
4412
|
-
if (sceneStore.isInitializing) setTimeout(_queueRerender, 150);else (_sceneStore$
|
|
4438
|
+
var _sceneStore$scene2;
|
|
4439
|
+
if (sceneStore.isInitializing) setTimeout(_queueRerender, 150);else (_sceneStore$scene2 = sceneStore.scene) === null || _sceneStore$scene2 === void 0 || _sceneStore$scene2.executeWhenReady(function () {
|
|
4413
4440
|
if (updateList.length >= 1) return; // skip update
|
|
4414
4441
|
onSceneReady();
|
|
4415
4442
|
});
|
|
@@ -4583,7 +4610,7 @@ function useRealTimeRenderData (_ref) {
|
|
|
4583
4610
|
try {
|
|
4584
4611
|
engine._device.lost.then(/*#__PURE__*/function () {
|
|
4585
4612
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(info) {
|
|
4586
|
-
var _sceneStore$
|
|
4613
|
+
var _sceneStore$scene3, _sceneStore$scene4;
|
|
4587
4614
|
var overlayImage, vp;
|
|
4588
4615
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
4589
4616
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -4591,8 +4618,8 @@ function useRealTimeRenderData (_ref) {
|
|
|
4591
4618
|
overlayImage = uiStore.overlayImage;
|
|
4592
4619
|
vp = sceneStore.viewpoint;
|
|
4593
4620
|
sceneStore.stopRenderLoop();
|
|
4594
|
-
(_sceneStore$
|
|
4595
|
-
(_sceneStore$
|
|
4621
|
+
(_sceneStore$scene3 = sceneStore.scene) === null || _sceneStore$scene3 === void 0 || _sceneStore$scene3.dispose();
|
|
4622
|
+
(_sceneStore$scene4 = sceneStore.scene) === null || _sceneStore$scene4 === void 0 || _sceneStore$scene4.getEngine().dispose();
|
|
4596
4623
|
sceneStore.hasRendered = false;
|
|
4597
4624
|
if (window) window.removeEventListener('resize', resize);
|
|
4598
4625
|
init().then(function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/findAssets/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAGrE,OAAO,EAAE,UAAU,EAAW,MAAM,UAAU,CAAC;AAE/C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAapC,wBAA8B,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/findAssets/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAGrE,OAAO,EAAE,UAAU,EAAW,MAAM,UAAU,CAAC;AAE/C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAapC,wBAA8B,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE;;;GA4K1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/parser/index.ts"],"names":[],"mappings":"AAQA,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/parser/index.ts"],"names":[],"mappings":"AAQA,QAAA,MAAM,MAAM,qBAqDX,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -22,6 +22,7 @@ export declare class UtilStore {
|
|
|
22
22
|
addOutstandingImageCount(): void;
|
|
23
23
|
subtractOutstandingImageCount(): void;
|
|
24
24
|
disableElementRows(element: string, cache: Cache[]): void;
|
|
25
|
+
removeElementFromCache(element: string, cache: Cache[]): void;
|
|
25
26
|
setAnalyzeDataRowStatus(name: string, status: boolean): void;
|
|
26
27
|
setAnalyzeDataRow(row: RTVAnalyzeData): void;
|
|
27
28
|
setRTVAnalyzeData(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UtilStore.d.ts","sourceRoot":"","sources":["../../../../../src/store/UtilStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACnD,OAAO,EAAU,OAAO,EAAE,MAAM,4BAA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