@crystaldesign/real-time-viewer 24.14.0-beta.9 → 24.15.0-beta.1

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.
Files changed (23) hide show
  1. package/build/esm/index.js +179 -173
  2. package/build/types/real-time-viewer/src/CustomMaterial/index.d.ts.map +1 -1
  3. package/build/types/real-time-viewer/src/SelectionHandler/index.d.ts.map +1 -1
  4. package/build/types/real-time-viewer/src/context.d.ts +3 -2
  5. package/build/types/real-time-viewer/src/context.d.ts.map +1 -1
  6. package/build/types/real-time-viewer/src/controls/index.d.ts.map +1 -1
  7. package/build/types/real-time-viewer/src/grids/index.d.ts.map +1 -1
  8. package/build/types/real-time-viewer/src/index.d.ts +12 -1
  9. package/build/types/real-time-viewer/src/index.d.ts.map +1 -1
  10. package/build/types/real-time-viewer/src/parser/createCams/index.d.ts.map +1 -1
  11. package/build/types/real-time-viewer/src/parser/index.d.ts.map +1 -1
  12. package/build/types/real-time-viewer/src/parser/types.d.ts +1 -0
  13. package/build/types/real-time-viewer/src/parser/types.d.ts.map +1 -1
  14. package/build/types/real-time-viewer/src/store/SceneStore.d.ts +2 -1
  15. package/build/types/real-time-viewer/src/store/SceneStore.d.ts.map +1 -1
  16. package/build/types/real-time-viewer/src/store/UIStore.d.ts +5 -1
  17. package/build/types/real-time-viewer/src/store/UIStore.d.ts.map +1 -1
  18. package/build/types/real-time-viewer/src/store/UtilStore.d.ts +6 -0
  19. package/build/types/real-time-viewer/src/store/UtilStore.d.ts.map +1 -1
  20. package/build/types/real-time-viewer/src/useRealTimeRenderData.d.ts.map +1 -1
  21. package/build/umd/real-time-viewer.umd.min.js +1 -1
  22. package/build/umd/report.html +1 -1
  23. package/package.json +2 -2
@@ -27,14 +27,13 @@ import { SceneOptimizerOptions, ShadowsOptimization, RenderTargetsOptimization,
27
27
  import { getLogger, DivaError } from '@crystaldesign/diva-core';
28
28
  import { TransformNode } from '@babylonjs/core/Meshes/transformNode';
29
29
  import { Ellipse, Rectangle, Button, TextBlock, AdvancedDynamicTexture, Image } from '@babylonjs/gui';
30
- import { Matrix as Matrix$1, Vector3 as Vector3$1, Frustum } from '@babylonjs/core/Maths/math';
30
+ import { Matrix as Matrix$1, Vector3 as Vector3$1 } from '@babylonjs/core/Maths/math';
31
31
  import { Engine } from '@babylonjs/core/Engines/engine';
32
32
  import { Scene } from '@babylonjs/core/scene';
33
33
  import { DracoCompression } from '@babylonjs/core/Meshes/Compression/dracoCompression';
34
34
  import { SceneLoader } from '@babylonjs/core/Loading/sceneLoader';
35
35
  import { PBRMetallicRoughnessMaterial } from '@babylonjs/core/Materials/PBR/pbrMetallicRoughnessMaterial';
36
36
  import { DirectionalLight } from '@babylonjs/core/Lights/directionalLight';
37
- import { BoundingInfo } from '@babylonjs/core/Culling/boundingInfo';
38
37
  import '@babylonjs/loaders/glTF/2.0/';
39
38
  import { jsxs, jsx } from 'react/jsx-runtime';
40
39
 
@@ -59,6 +58,7 @@ function GetCameraControls(camera) {
59
58
  var isZooming = false;
60
59
  var initDistance = 0;
61
60
  function renderLoop() {
61
+ var _sceneStore$updateCam;
62
62
  if (!sceneStore.doRenderControlLoop || sceneStore.isInitializing || uistore.isStaticBg) return;
63
63
  if (sceneStore.cameraTargetPosition.x == 0 && sceneStore.cameraTargetPosition.y == 0 && sceneStore.cameraTargetPosition.z == 0) sceneStore.setCameraTarget();
64
64
  uistore.onMove();
@@ -75,7 +75,7 @@ function GetCameraControls(camera) {
75
75
  camera.setTarget(camera.target.addInPlaceFromFloats(deltaTarget.x, deltaTarget.y, deltaTarget.z));
76
76
  stopRender = false;
77
77
  }
78
- uistore.requestNewOverlayImage({
78
+ var cam = {
79
79
  horiFov: camera.fov * 180 / Math.PI,
80
80
  lensShiftX: 0,
81
81
  lensShiftY: 0,
@@ -90,8 +90,15 @@ function GetCameraControls(camera) {
90
90
  y: camera.rotation.y * 180 / Math.PI,
91
91
  z: camera.rotation.z * 180 / Math.PI
92
92
  },
93
+ targetPos: {
94
+ x: camera.target.x,
95
+ y: camera.target.y,
96
+ z: camera.target.z
97
+ },
93
98
  vertFov: camera.fov * 180 / Math.PI
94
- });
99
+ };
100
+ (_sceneStore$updateCam = sceneStore.updateCameraInformation) === null || _sceneStore$updateCam === void 0 || _sceneStore$updateCam.call(sceneStore, cam);
101
+ uistore.requestNewOverlayImage(cam, sceneStore.focusedElement, sceneStore.targetCameraPosition);
95
102
  if (stopRender) sceneStore.doRenderControlLoop = false;
96
103
  }
97
104
  function moveTarget(deltaX, deltaY) {
@@ -342,9 +349,9 @@ function getGridControls(scene, element, selected, elements, selectMesh) {
342
349
  };
343
350
  }
344
351
 
345
- function _createForOfIteratorHelper$9(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$9(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
346
- function _unsupportedIterableToArray$9(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$9(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$9(r, a) : void 0; } }
347
- function _arrayLikeToArray$9(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
352
+ function _createForOfIteratorHelper$8(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$8(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
353
+ function _unsupportedIterableToArray$8(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$8(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$8(r, a) : void 0; } }
354
+ function _arrayLikeToArray$8(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
348
355
  function Grids () {
349
356
  var utilStore = useUtilStoreContext();
350
357
  var sceneStore = useSceneStoreContext();
@@ -389,7 +396,9 @@ function Grids () {
389
396
  var grid = gridsForElement.grids.find(function (grid) {
390
397
  return grid.gridName == gridName;
391
398
  });
392
- if (!grid) throw new Error('Could not find grid with name: ' + gridName);
399
+ if (!grid) {
400
+ throw new Error('Could not find grid with name: ' + gridName);
401
+ }
393
402
  for (var shelfIdx = 0; shelfIdx < grid.count; shelfIdx++) {
394
403
  if (!freeGrid.freeCells.includes(shelfIdx)) continue;
395
404
  createGrid({
@@ -411,7 +420,7 @@ function Grids () {
411
420
  var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i2], 2),
412
421
  gridName = _Object$entries2$_i[0];
413
422
  _Object$entries2$_i[1];
414
- var _iterator = _createForOfIteratorHelper$9(plannedPlaceOnGrid.grids[gridName].accessories),
423
+ var _iterator = _createForOfIteratorHelper$8(plannedPlaceOnGrid.grids[gridName].accessories),
415
424
  _step;
416
425
  try {
417
426
  var _loop4 = function _loop4() {
@@ -916,6 +925,7 @@ function createCams(scene, activeViewpoint, viewPoints) {
916
925
  })];
917
926
  }
918
927
  function updateCam(camera, scene) {
928
+ var _sceneStore$updateCam;
919
929
  if (camera.pos.x == 0 && camera.pos.y == 0 && camera.pos.z == 0) return;
920
930
  var utilStore = useUtilStoreContext();
921
931
  var sceneStore = useSceneStoreContext();
@@ -926,18 +936,42 @@ function updateCam(camera, scene) {
926
936
  cam.rotation = utilStore.degreesToRadians(utilStore.vector3ToBVector3(_objectSpread$1(_objectSpread$1({}, camera.rot), {}, {
927
937
  x: -camera.rot.x
928
938
  })));
939
+ cam.target = utilStore.vector3ToBVector3(camera.targetPos).multiply(new Vector3(-0.01, 0.01, 0.01));
929
940
  sceneStore.targetCameraPosition = newPos;
941
+ sceneStore.cameraTargetPosition = cam.target;
942
+ (_sceneStore$updateCam = sceneStore.updateCameraInformation) === null || _sceneStore$updateCam === void 0 || _sceneStore$updateCam.call(sceneStore, {
943
+ horiFov: cam.fov * 180 / Math.PI,
944
+ lensShiftX: 0,
945
+ lensShiftY: 0,
946
+ name: cam.name,
947
+ pos: {
948
+ x: cam.position.x,
949
+ y: cam.position.y,
950
+ z: cam.position.z
951
+ },
952
+ rot: {
953
+ x: cam.rotation.x * 180 / Math.PI,
954
+ y: cam.rotation.y * 180 / Math.PI,
955
+ z: cam.rotation.z * 180 / Math.PI
956
+ },
957
+ targetPos: {
958
+ x: cam.target.x,
959
+ y: cam.target.y,
960
+ z: cam.target.z
961
+ },
962
+ vertFov: cam.fov * 180 / Math.PI
963
+ });
930
964
  }
931
965
 
932
- function _createForOfIteratorHelper$8(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$8(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
933
- function _unsupportedIterableToArray$8(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$8(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$8(r, a) : void 0; } }
934
- function _arrayLikeToArray$8(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
966
+ function _createForOfIteratorHelper$7(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$7(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
967
+ function _unsupportedIterableToArray$7(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$7(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$7(r, a) : void 0; } }
968
+ function _arrayLikeToArray$7(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
935
969
  /*
936
970
  SceneStore
937
971
  Wraps the scene with additional data and methods
938
972
  */
939
973
  var SceneStore = /*#__PURE__*/function () {
940
- function SceneStore(scene, hqRenderScript, utilStore, apiConfig, jwt, onMissingGeo) {
974
+ function SceneStore(scene, hqRenderScript, utilStore, apiConfig, jwt, onMissingGeo, updateCameraInformation) {
941
975
  var _this = this;
942
976
  _classCallCheck(this, SceneStore);
943
977
  _defineProperty(this, "_hqRenderScript", void 0);
@@ -969,10 +1003,12 @@ var SceneStore = /*#__PURE__*/function () {
969
1003
  // if the current viewpoint should automatically change with the planning
970
1004
  _defineProperty(this, "light", undefined);
971
1005
  _defineProperty(this, "changedElements", void 0);
1006
+ _defineProperty(this, "updateCameraInformation", void 0);
972
1007
  scene.clearColor = new Color4(1, 1, 1, 1);
973
1008
  this._scene = scene;
974
1009
  this._apiConfig = apiConfig;
975
1010
  this._onMissingGeo = onMissingGeo;
1011
+ this.updateCameraInformation = updateCameraInformation;
976
1012
  this._cancelSceneExport = false;
977
1013
  this._jwt = jwt;
978
1014
  var options = new SceneOptimizerOptions(15, 1000);
@@ -1115,12 +1151,12 @@ var SceneStore = /*#__PURE__*/function () {
1115
1151
  var _this$_sceneConstruct2;
1116
1152
  var elms = [];
1117
1153
  if (!((_this$_sceneConstruct2 = this._sceneConstruct.root) !== null && _this$_sceneConstruct2 !== void 0 && _this$_sceneConstruct2.sets)) return [];
1118
- var _iterator = _createForOfIteratorHelper$8(this._sceneConstruct.root.sets),
1154
+ var _iterator = _createForOfIteratorHelper$7(this._sceneConstruct.root.sets),
1119
1155
  _step;
1120
1156
  try {
1121
1157
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
1122
1158
  var set = _step.value;
1123
- var _iterator2 = _createForOfIteratorHelper$8(set.elements),
1159
+ var _iterator2 = _createForOfIteratorHelper$7(set.elements),
1124
1160
  _step2;
1125
1161
  try {
1126
1162
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
@@ -1148,12 +1184,12 @@ var SceneStore = /*#__PURE__*/function () {
1148
1184
  var _this$_sceneConstruct3;
1149
1185
  var elms = [];
1150
1186
  if (!((_this$_sceneConstruct3 = this._sceneConstruct.root) !== null && _this$_sceneConstruct3 !== void 0 && _this$_sceneConstruct3.sets)) return [];
1151
- var _iterator3 = _createForOfIteratorHelper$8(this._sceneConstruct.root.sets),
1187
+ var _iterator3 = _createForOfIteratorHelper$7(this._sceneConstruct.root.sets),
1152
1188
  _step3;
1153
1189
  try {
1154
1190
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
1155
1191
  var set = _step3.value;
1156
- var _iterator4 = _createForOfIteratorHelper$8(set.elements),
1192
+ var _iterator4 = _createForOfIteratorHelper$7(set.elements),
1157
1193
  _step4;
1158
1194
  try {
1159
1195
  for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
@@ -1208,12 +1244,12 @@ var SceneStore = /*#__PURE__*/function () {
1208
1244
  value: function getElementByName(name) {
1209
1245
  var _this$_sceneConstruct4, _this$_sceneConstruct5;
1210
1246
  if (!((_this$_sceneConstruct4 = this._sceneConstruct.root) !== null && _this$_sceneConstruct4 !== void 0 && _this$_sceneConstruct4.sets)) return undefined;
1211
- var _iterator5 = _createForOfIteratorHelper$8((_this$_sceneConstruct5 = this._sceneConstruct.root) === null || _this$_sceneConstruct5 === void 0 ? void 0 : _this$_sceneConstruct5.sets),
1247
+ var _iterator5 = _createForOfIteratorHelper$7((_this$_sceneConstruct5 = this._sceneConstruct.root) === null || _this$_sceneConstruct5 === void 0 ? void 0 : _this$_sceneConstruct5.sets),
1212
1248
  _step5;
1213
1249
  try {
1214
1250
  for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
1215
1251
  var set = _step5.value;
1216
- var _iterator6 = _createForOfIteratorHelper$8(set.elements),
1252
+ var _iterator6 = _createForOfIteratorHelper$7(set.elements),
1217
1253
  _step6;
1218
1254
  try {
1219
1255
  for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
@@ -1238,12 +1274,12 @@ var SceneStore = /*#__PURE__*/function () {
1238
1274
  value: function getElementNameById(id) {
1239
1275
  var _this$_sceneConstruct6, _this$_sceneConstruct7;
1240
1276
  if (!((_this$_sceneConstruct6 = this._sceneConstruct.root) !== null && _this$_sceneConstruct6 !== void 0 && _this$_sceneConstruct6.sets)) return undefined;
1241
- var _iterator7 = _createForOfIteratorHelper$8((_this$_sceneConstruct7 = this._sceneConstruct.root) === null || _this$_sceneConstruct7 === void 0 ? void 0 : _this$_sceneConstruct7.sets),
1277
+ var _iterator7 = _createForOfIteratorHelper$7((_this$_sceneConstruct7 = this._sceneConstruct.root) === null || _this$_sceneConstruct7 === void 0 ? void 0 : _this$_sceneConstruct7.sets),
1242
1278
  _step7;
1243
1279
  try {
1244
1280
  for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
1245
1281
  var set = _step7.value;
1246
- var _iterator8 = _createForOfIteratorHelper$8(set.elements),
1282
+ var _iterator8 = _createForOfIteratorHelper$7(set.elements),
1247
1283
  _step8;
1248
1284
  try {
1249
1285
  for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
@@ -1533,12 +1569,12 @@ var delButton = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%
1533
1569
 
1534
1570
  var gdelButton = "data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2221%22%20viewBox%3D%220%200%2016%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M15.2784%203.0226H10.9717V2.08029C10.9717%201.35784%2010.4151%200.72963%209.71198%200.72963H6.78229C6.10846%200.72963%205.52252%201.32643%205.52252%202.08029V3.0226H1.21588C0.981506%203.0226%200.776428%203.24248%200.776428%203.49376C0.776428%203.74505%200.981506%203.96492%201.21588%203.96492H2.18268V17.7542C2.18268%2019.0734%203.17877%2020.11%204.37994%2020.11H12.1436C13.3741%2020.11%2014.3409%2019.042%2014.3409%2017.7542V3.93351H15.3077C15.5714%203.93351%2015.7764%203.71364%2015.7764%203.46235C15.7764%203.17966%2015.5421%203.0226%2015.2784%203.0226ZM6.43073%202.08029C6.43073%201.829%206.6358%201.67195%206.78229%201.67195H9.71198C9.94635%201.67195%2010.0928%201.86041%2010.0928%202.08029V3.0226H6.43073V2.08029ZM13.462%2017.7228C13.462%2018.508%2012.876%2019.1363%2012.1436%2019.1363H4.37994C3.64752%2019.1363%203.06158%2018.508%203.06158%2017.7228V3.96492H13.462V17.7228Z%22%20fill%3D%22%234A4A4A%22%2F%3E%3Cpath%20d%3D%22M8.68658%206.82326V16.2464C8.68658%2016.5291%208.5108%2016.749%208.24713%2016.749C7.98346%2016.749%207.80768%2016.5291%207.80768%2016.2464V6.82326C7.80768%206.54056%208.04205%206.3521%208.24713%206.3521C8.48151%206.3521%208.68658%206.57197%208.68658%206.82326Z%22%20fill%3D%22%234A4A4A%22%2F%3E%3Cpath%20d%3D%22M11.6456%206.82326V16.2464C11.6456%2016.5291%2011.4405%2016.749%2011.2061%2016.749C10.9717%2016.749%2010.7667%2016.5291%2010.7667%2016.2464V6.82326C10.7667%206.54056%2010.9717%206.3521%2011.2061%206.3521C11.4405%206.3521%2011.6456%206.57197%2011.6456%206.82326Z%22%20fill%3D%22%234A4A4A%22%2F%3E%3Cpath%20d%3D%22M5.78619%206.82326V16.2464C5.78619%2016.5291%205.58112%2016.749%205.34674%2016.749C5.11237%2016.749%204.87799%2016.5291%204.87799%2016.2464V6.82326C4.87799%206.54056%205.08307%206.3521%205.31744%206.3521C5.55182%206.3521%205.78619%206.57197%205.78619%206.82326Z%22%20fill%3D%22%234A4A4A%22%2F%3E%3C%2Fsvg%3E";
1535
1571
 
1536
- function _createForOfIteratorHelper$7(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$7(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
1537
- function _unsupportedIterableToArray$7(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$7(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$7(r, a) : void 0; } }
1538
- function _arrayLikeToArray$7(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1572
+ function _createForOfIteratorHelper$6(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$6(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
1573
+ function _unsupportedIterableToArray$6(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$6(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$6(r, a) : void 0; } }
1574
+ function _arrayLikeToArray$6(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1539
1575
  function SelHandler (_ref) {
1540
1576
  var onElSelected = _ref.onElSelected;
1541
- useUtilStoreContext();
1577
+ var utilStore = useUtilStoreContext();
1542
1578
  var gridStore = useGridStoreContext();
1543
1579
  var sceneStore = useSceneStoreContext();
1544
1580
  var uiStore = useUIStoreContext();
@@ -1551,35 +1587,33 @@ function SelHandler (_ref) {
1551
1587
  var element = hit === null || hit === void 0 ? void 0 : hit.pickedMesh;
1552
1588
  clearTimeout(timeoutId);
1553
1589
  timeoutId = setTimeout(function () {
1554
- while (element) {
1555
- var _element, _element2;
1556
- element = (_element = element) === null || _element === void 0 ? void 0 : _element.parent;
1557
- if ((_element2 = element) !== null && _element2 !== void 0 && _element2.name.toLowerCase().startsWith('element')) {
1558
- pickedElement = true;
1559
- if (evt.type == 64 && hit !== null && hit !== void 0 && hit.pickedPoint) {
1560
- onElementSelected(element, hit, true);
1561
- return;
1562
- } else if (evt.type == 16 && hit !== null && hit !== void 0 && hit.pickedPoint) {
1563
- onElementSelected(element, hit);
1564
- return;
1565
- }
1590
+ var res = utilStore.findParentElementAndSet(element);
1591
+ if (res.element) {
1592
+ element = res.element;
1593
+ pickedElement = true;
1594
+ if (evt.type == 64 && hit !== null && hit !== void 0 && hit.pickedPoint) {
1595
+ onElementSelected(element, hit, true);
1596
+ return;
1597
+ } else if (evt.type == 16 && hit !== null && hit !== void 0 && hit.pickedPoint) {
1598
+ onElementSelected(element, hit);
1599
+ return;
1566
1600
  }
1567
1601
  }
1568
1602
  if (!pickedElement && hit !== null && hit !== void 0 && hit.pickedPoint) {
1569
1603
  var _hit$pickedMesh;
1570
1604
  if (sceneStore.elements) {
1571
- var _iterator = _createForOfIteratorHelper$7(sceneStore.elements),
1605
+ var _iterator = _createForOfIteratorHelper$6(sceneStore.elements),
1572
1606
  _step;
1573
1607
  try {
1574
1608
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
1575
- var _element3 = _step.value;
1576
- var _element3$bbn$getHier = _element3.bbn.getHierarchyBoundingVectors(),
1577
- min = _element3$bbn$getHier.min,
1578
- max = _element3$bbn$getHier.max;
1609
+ var _element = _step.value;
1610
+ var _element$bbn$getHiera = _element.bbn.getHierarchyBoundingVectors(),
1611
+ min = _element$bbn$getHiera.min,
1612
+ max = _element$bbn$getHiera.max;
1579
1613
  var point = hit.pickedPoint;
1580
1614
  if (min.x < point.x && min.z < point.y && max.x > point.x && max.z > point.z && evt.type == 16) {
1581
1615
  pickedElement = true;
1582
- onElementSelected(_element3.bbn, hit);
1616
+ onElementSelected(_element.bbn, hit);
1583
1617
  }
1584
1618
  }
1585
1619
  } catch (err) {
@@ -1619,9 +1653,9 @@ function SelHandler (_ref) {
1619
1653
  };
1620
1654
  }
1621
1655
 
1622
- function _createForOfIteratorHelper$6(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$6(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
1623
- function _unsupportedIterableToArray$6(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$6(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$6(r, a) : void 0; } }
1624
- function _arrayLikeToArray$6(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1656
+ function _createForOfIteratorHelper$5(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$5(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
1657
+ function _unsupportedIterableToArray$5(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$5(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$5(r, a) : void 0; } }
1658
+ function _arrayLikeToArray$5(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1625
1659
  /*
1626
1660
  UIStore
1627
1661
  */
@@ -1803,7 +1837,7 @@ var UIStore = /*#__PURE__*/function () {
1803
1837
  key: "selectElem",
1804
1838
  value: function selectElem(name) {
1805
1839
  var _this5 = this;
1806
- var _iterator = _createForOfIteratorHelper$6(this._gui.getControlsByType('ellipse')),
1840
+ var _iterator = _createForOfIteratorHelper$5(this._gui.getControlsByType('ellipse')),
1807
1841
  _step;
1808
1842
  try {
1809
1843
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -1902,18 +1936,34 @@ var UIStore = /*#__PURE__*/function () {
1902
1936
  }
1903
1937
  }, {
1904
1938
  key: "requestNewOverlayImage",
1905
- value: function requestNewOverlayImage(viewpoint) {
1939
+ value: function requestNewOverlayImage(viewpoint, focusedElement, targetCameraPosition) {
1906
1940
  var _this7 = this;
1907
1941
  //this._overlayImage exists only when unity combi is enabled
1908
1942
  if (!this._overlayImage) return;
1943
+ var elementId = undefined;
1944
+ var setId = undefined;
1945
+ var ob = this._scene.getTransformNodeByName(focusedElement.name);
1946
+ var _this$_utilStore$find = this._utilStore.findParentElementAndSet(ob),
1947
+ element = _this$_utilStore$find.element,
1948
+ set = _this$_utilStore$find.set;
1949
+ if (element) {
1950
+ elementId = Number(element.name.slice(element.name.lastIndexOf('E') + 1, element.name.length));
1951
+ setId = set === null || set === void 0 ? void 0 : set.replace('planning_', '');
1952
+ }
1909
1953
  clearTimeout(this._timeoutId);
1910
1954
  this._timeoutId = setTimeout(function () {
1911
1955
  var _this7$_requestNewOve;
1912
1956
  _this7._utilStore.addOutstandingImage();
1913
1957
  _this7._latestViewpoint = viewpoint;
1914
- (_this7$_requestNewOve = _this7._requestNewOverlayImage) === null || _this7$_requestNewOve === void 0 || _this7$_requestNewOve.call(_this7, viewpoint);
1958
+ (_this7$_requestNewOve = _this7._requestNewOverlayImage) === null || _this7$_requestNewOve === void 0 || _this7$_requestNewOve.call(_this7, viewpoint, {
1959
+ adjustZoomInUnity: false,
1960
+ onlyAdjustZoomBBChanged: false,
1961
+ rotationCenter: viewpoint.targetPos,
1962
+ elementId: elementId,
1963
+ setId: setId
1964
+ });
1915
1965
  _this7._utilStore.updateCam = true;
1916
- }, 500);
1966
+ }, 200);
1917
1967
  }
1918
1968
  }]);
1919
1969
  }();
@@ -1982,9 +2032,7 @@ var UtilStore = /*#__PURE__*/function () {
1982
2032
  }, {
1983
2033
  key: "updateWithUnityData",
1984
2034
  get: function get() {
1985
- var isNotOutStandingImage = this._outstandingImageCount > 0;
1986
- if (isNotOutStandingImage) this._outstandingImageCount--;
1987
- return !isNotOutStandingImage && this._updateCam;
2035
+ return true;
1988
2036
  }
1989
2037
  }, {
1990
2038
  key: "onElementDeleted",
@@ -2113,6 +2161,25 @@ var UtilStore = /*#__PURE__*/function () {
2113
2161
  direction.normalize();
2114
2162
  mesh.position.addInPlace(direction.scale(distance));
2115
2163
  }
2164
+ }, {
2165
+ key: "findParentElementAndSet",
2166
+ value: function findParentElementAndSet(ob) {
2167
+ var element = undefined;
2168
+ var set = undefined;
2169
+ while (ob) {
2170
+ var name = ob.name.toLowerCase();
2171
+ if (name.startsWith('element')) {
2172
+ element = ob;
2173
+ } else if (name.startsWith('planning')) {
2174
+ set = name;
2175
+ }
2176
+ ob = ob.parent;
2177
+ }
2178
+ return {
2179
+ element: element,
2180
+ set: set
2181
+ };
2182
+ }
2116
2183
  }]);
2117
2184
  }();
2118
2185
 
@@ -2120,9 +2187,9 @@ var _context;
2120
2187
  var unregisterContext = function unregisterContext() {
2121
2188
  _context = undefined;
2122
2189
  };
2123
- var registerContext = function registerContext(scene, hqRenderScript, apiConfig, jwt, viewHandler, onMissingGeo, requestNewOverlayImage, overlayImage, uiConfig) {
2190
+ var registerContext = function registerContext(scene, hqRenderScript, apiConfig, jwt, viewHandler, onMissingGeo, requestNewOverlayImage, overlayImage, uiConfig, updateCameraInformation) {
2124
2191
  var utilStore = new UtilStore(false, viewHandler);
2125
- var sceneStore = new SceneStore(scene, hqRenderScript, utilStore, apiConfig, jwt, onMissingGeo);
2192
+ var sceneStore = new SceneStore(scene, hqRenderScript, utilStore, apiConfig, jwt, onMissingGeo, updateCameraInformation);
2126
2193
  var uiStore = new UIStore(scene, sceneStore.enableSSAO.bind(sceneStore), utilStore, uiConfig, requestNewOverlayImage, overlayImage);
2127
2194
  return _context = {
2128
2195
  utilStore: utilStore,
@@ -2148,9 +2215,9 @@ var useUtilStoreContext = function useUtilStoreContext() {
2148
2215
  return (_context5 = _context) === null || _context5 === void 0 ? void 0 : _context5.utilStore;
2149
2216
  };
2150
2217
 
2151
- function _createForOfIteratorHelper$5(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$5(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
2152
- function _unsupportedIterableToArray$5(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$5(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$5(r, a) : void 0; } }
2153
- function _arrayLikeToArray$5(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2218
+ function _createForOfIteratorHelper$4(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$4(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
2219
+ function _unsupportedIterableToArray$4(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$4(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$4(r, a) : void 0; } }
2220
+ function _arrayLikeToArray$4(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2154
2221
  function caching () {
2155
2222
  var _useSceneStoreContext = useSceneStoreContext(),
2156
2223
  cache = _useSceneStoreContext.cache,
@@ -2165,7 +2232,7 @@ function caching () {
2165
2232
  var updatedElements = (_curElementRoot$nodes = curElementRoot === null || curElementRoot === void 0 || (_curElementRoot$nodes2 = curElementRoot.nodes) === null || _curElementRoot$nodes2 === void 0 ? void 0 : _curElementRoot$nodes2.filter(function (curElement) {
2166
2233
  if ((prevElementRoot === null || prevElementRoot === void 0 ? void 0 : prevElementRoot.nodes) === undefined) return true;
2167
2234
  var didChange = true;
2168
- var _iterator = _createForOfIteratorHelper$5(prevElementRoot.nodes),
2235
+ var _iterator = _createForOfIteratorHelper$4(prevElementRoot.nodes),
2169
2236
  _step;
2170
2237
  try {
2171
2238
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -2190,7 +2257,7 @@ function caching () {
2190
2257
  var prevGeo = (_assets$geos = previousHQRenderScript.assets.geos) === null || _assets$geos === void 0 ? void 0 : _assets$geos[idx];
2191
2258
  if (prevGeo && !(geo.id + geo.name === prevGeo.id + prevGeo.name) && cache !== null && cache !== void 0 && (_cache$idx = cache[idx]) !== null && _cache$idx !== void 0 && (_cache$idx = _cache$idx.geo) !== null && _cache$idx !== void 0 && _cache$idx.onElements) {
2192
2259
  var _cache$idx$geo;
2193
- var _iterator2 = _createForOfIteratorHelper$5((_cache$idx$geo = cache[idx].geo) === null || _cache$idx$geo === void 0 ? void 0 : _cache$idx$geo.onElements),
2260
+ var _iterator2 = _createForOfIteratorHelper$4((_cache$idx$geo = cache[idx].geo) === null || _cache$idx$geo === void 0 ? void 0 : _cache$idx$geo.onElements),
2194
2261
  _step2;
2195
2262
  try {
2196
2263
  var _loop = function _loop() {
@@ -2220,7 +2287,7 @@ function caching () {
2220
2287
  var prevMat = (_assets$mats = previousHQRenderScript.assets.mats) === null || _assets$mats === void 0 ? void 0 : _assets$mats[idx];
2221
2288
  if (prevMat && !(mat.id + mat.name === prevMat.id + prevMat.name) && cache !== null && cache !== void 0 && (_cache$idx2 = cache[idx]) !== null && _cache$idx2 !== void 0 && (_cache$idx2 = _cache$idx2.material) !== null && _cache$idx2 !== void 0 && _cache$idx2.onElements) {
2222
2289
  var _cache$idx$material;
2223
- var _iterator3 = _createForOfIteratorHelper$5((_cache$idx$material = cache[idx].material) === null || _cache$idx$material === void 0 ? void 0 : _cache$idx$material.onElements),
2290
+ var _iterator3 = _createForOfIteratorHelper$4((_cache$idx$material = cache[idx].material) === null || _cache$idx$material === void 0 ? void 0 : _cache$idx$material.onElements),
2224
2291
  _step3;
2225
2292
  try {
2226
2293
  var _loop2 = function _loop2() {
@@ -2251,7 +2318,7 @@ function caching () {
2251
2318
  deletedElements: prevElementRoot === null || prevElementRoot === void 0 || (_prevElementRoot$node = prevElementRoot.nodes) === null || _prevElementRoot$node === void 0 ? void 0 : _prevElementRoot$node.filter(function (prevElement) {
2252
2319
  if ((curElementRoot === null || curElementRoot === void 0 ? void 0 : curElementRoot.nodes) === undefined) return true;
2253
2320
  var wasDeleted = true;
2254
- var _iterator4 = _createForOfIteratorHelper$5(curElementRoot.nodes),
2321
+ var _iterator4 = _createForOfIteratorHelper$4(curElementRoot.nodes),
2255
2322
  _step4;
2256
2323
  try {
2257
2324
  for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
@@ -2326,9 +2393,7 @@ var customMat = /*#__PURE__*/function () {
2326
2393
  if (mRTexture) mRTexture._mimeType = mRTexture.url.endsWith('.jpg') ? 'image/jpeg' : 'image/png';
2327
2394
  if (nTexture) nTexture._mimeType = nTexture.url.endsWith('.jpg') ? 'image/jpeg' : 'image/png';
2328
2395
  found = !!parsedMat.baseTexture;
2329
- if (!found) LOG$1.error(new DivaError('MISSING_MATERIAL: could not get material ' + _customMat.name + ' for iln ' + _customMat.blob, {
2330
- code: 'RTS_0002'
2331
- }));
2396
+ if (!found) LOG$1.warn('MISSING_MATERIAL: could not get material ' + _customMat.name + ' for iln ' + _customMat.blob);
2332
2397
  if (setDataRow) useUtilStoreContext().setAnalyzeDataRow({
2333
2398
  type: 'MAT',
2334
2399
  found: found,
@@ -2368,9 +2433,9 @@ var customMat = /*#__PURE__*/function () {
2368
2433
  };
2369
2434
  }();
2370
2435
 
2371
- function _createForOfIteratorHelper$4(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$4(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
2372
- function _unsupportedIterableToArray$4(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$4(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$4(r, a) : void 0; } }
2373
- function _arrayLikeToArray$4(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2436
+ function _createForOfIteratorHelper$3(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$3(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
2437
+ function _unsupportedIterableToArray$3(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$3(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$3(r, a) : void 0; } }
2438
+ function _arrayLikeToArray$3(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2374
2439
  getLogger('RealTimeViewer', 'FindAsset');
2375
2440
  function findAssets(_x, _x2) {
2376
2441
  return _findAssets.apply(this, arguments);
@@ -2484,7 +2549,7 @@ function _findAssets() {
2484
2549
  });
2485
2550
  geo.material = mat.mat;
2486
2551
  oldMat = sceneStore.scene.getMaterialByUniqueID(oldMatId);
2487
- _iterator3 = _createForOfIteratorHelper$4(oldMat.getBindedMeshes());
2552
+ _iterator3 = _createForOfIteratorHelper$3(oldMat.getBindedMeshes());
2488
2553
  try {
2489
2554
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
2490
2555
  mesh = _step3.value;
@@ -2499,7 +2564,7 @@ function _findAssets() {
2499
2564
  _context.next = 37;
2500
2565
  break;
2501
2566
  case 20:
2502
- _iterator4 = _createForOfIteratorHelper$4(geo.getChildMeshes());
2567
+ _iterator4 = _createForOfIteratorHelper$3(geo.getChildMeshes());
2503
2568
  _context.prev = 21;
2504
2569
  _iterator4.s();
2505
2570
  case 23:
@@ -2544,7 +2609,7 @@ function _findAssets() {
2544
2609
  //TODO: tiling with Node Materials, multiple Textures
2545
2610
 
2546
2611
  //! clean std. materials from importing (.00x)
2547
- _iterator = _createForOfIteratorHelper$4(assets.geos);
2612
+ _iterator = _createForOfIteratorHelper$3(assets.geos);
2548
2613
  _context5.prev = 11;
2549
2614
  _loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
2550
2615
  var geo, path, mesh, cachedGeo;
@@ -2626,7 +2691,7 @@ function _findAssets() {
2626
2691
  return _context5.finish(26);
2627
2692
  case 29:
2628
2693
  // Und alle materialien erstellt
2629
- _iterator2 = _createForOfIteratorHelper$4(assets.mats);
2694
+ _iterator2 = _createForOfIteratorHelper$3(assets.mats);
2630
2695
  _context5.prev = 30;
2631
2696
  _loop2 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop2() {
2632
2697
  var mat, _nwCache$material;
@@ -2744,7 +2809,7 @@ function _createOrGetMaterial() {
2744
2809
  _context6.next = 18;
2745
2810
  break;
2746
2811
  }
2747
- _iterator5 = _createForOfIteratorHelper$4(scene.materials);
2812
+ _iterator5 = _createForOfIteratorHelper$3(scene.materials);
2748
2813
  _context6.prev = 2;
2749
2814
  _iterator5.s();
2750
2815
  case 4:
@@ -2801,9 +2866,9 @@ function _createOrGetMaterial() {
2801
2866
  return _createOrGetMaterial.apply(this, arguments);
2802
2867
  }
2803
2868
 
2804
- function _createForOfIteratorHelper$3(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$3(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
2805
- function _unsupportedIterableToArray$3(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$3(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$3(r, a) : void 0; } }
2806
- function _arrayLikeToArray$3(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2869
+ function _createForOfIteratorHelper$2(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$2(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
2870
+ function _unsupportedIterableToArray$2(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$2(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$2(r, a) : void 0; } }
2871
+ function _arrayLikeToArray$2(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2807
2872
  var buildScene = function buildScene(_ref) {
2808
2873
  var _sceneStore$elements;
2809
2874
  var startNode = _ref.startNode,
@@ -2842,7 +2907,7 @@ var buildScene = function buildScene(_ref) {
2842
2907
 
2843
2908
  //! getNodes / getGeos
2844
2909
  if (curGeo.nodes !== undefined) {
2845
- var _iterator = _createForOfIteratorHelper$3(curGeo.nodes),
2910
+ var _iterator = _createForOfIteratorHelper$2(curGeo.nodes),
2846
2911
  _step;
2847
2912
  try {
2848
2913
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -2857,7 +2922,7 @@ var buildScene = function buildScene(_ref) {
2857
2922
  }
2858
2923
  //! each geo
2859
2924
  if (curGeo.geos !== undefined) {
2860
- var _iterator2 = _createForOfIteratorHelper$3(curGeo.geos),
2925
+ var _iterator2 = _createForOfIteratorHelper$2(curGeo.geos),
2861
2926
  _step2;
2862
2927
  try {
2863
2928
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
@@ -2912,7 +2977,7 @@ var buildScene = function buildScene(_ref) {
2912
2977
 
2913
2978
  //! each node
2914
2979
  if (hqsNode.nodes !== undefined) {
2915
- var _iterator3 = _createForOfIteratorHelper$3(hqsNode.nodes),
2980
+ var _iterator3 = _createForOfIteratorHelper$2(hqsNode.nodes),
2916
2981
  _step3;
2917
2982
  try {
2918
2983
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
@@ -2927,7 +2992,7 @@ var buildScene = function buildScene(_ref) {
2927
2992
  }
2928
2993
  //! each material
2929
2994
  if (hqsNode.mats !== undefined) {
2930
- var _iterator4 = _createForOfIteratorHelper$3(hqsNode.mats),
2995
+ var _iterator4 = _createForOfIteratorHelper$2(hqsNode.mats),
2931
2996
  _step4;
2932
2997
  try {
2933
2998
  for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
@@ -2942,7 +3007,7 @@ var buildScene = function buildScene(_ref) {
2942
3007
  }
2943
3008
  //! each geo
2944
3009
  if (hqsNode.geos !== undefined) {
2945
- var _iterator5 = _createForOfIteratorHelper$3(hqsNode.geos),
3010
+ var _iterator5 = _createForOfIteratorHelper$2(hqsNode.geos),
2946
3011
  _step5;
2947
3012
  try {
2948
3013
  for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
@@ -2960,14 +3025,14 @@ var buildScene = function buildScene(_ref) {
2960
3025
  sceneStore.cache = cachedAssets;
2961
3026
  };
2962
3027
 
2963
- function _createForOfIteratorHelper$2(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$2(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
2964
- function _unsupportedIterableToArray$2(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$2(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$2(r, a) : void 0; } }
2965
- function _arrayLikeToArray$2(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3028
+ function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
3029
+ function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
3030
+ function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2966
3031
  function findMaterials(cache) {
2967
3032
  //! parent = the parent from which on every child should receive the Material
2968
3033
  //! id = the id which points to the material that should be assigned
2969
3034
  var setMaterials = function setMaterials(onNode, mat) {
2970
- var _iterator = _createForOfIteratorHelper$2(onNode.getChildMeshes()),
3035
+ var _iterator = _createForOfIteratorHelper$1(onNode.getChildMeshes()),
2971
3036
  _step;
2972
3037
  try {
2973
3038
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -2985,12 +3050,12 @@ function findMaterials(cache) {
2985
3050
  var findOnNode = function findOnNode(mat, parent) {
2986
3051
  if (!mat.onNodes) return;
2987
3052
  var children = parent.getChildTransformNodes(false);
2988
- var _iterator2 = _createForOfIteratorHelper$2(children),
3053
+ var _iterator2 = _createForOfIteratorHelper$1(children),
2989
3054
  _step2;
2990
3055
  try {
2991
3056
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
2992
3057
  var child = _step2.value;
2993
- var _iterator3 = _createForOfIteratorHelper$2(mat.onNodes),
3058
+ var _iterator3 = _createForOfIteratorHelper$1(mat.onNodes),
2994
3059
  _step3;
2995
3060
  try {
2996
3061
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
@@ -3011,13 +3076,13 @@ function findMaterials(cache) {
3011
3076
  _iterator2.f();
3012
3077
  }
3013
3078
  };
3014
- var _iterator4 = _createForOfIteratorHelper$2(cache),
3079
+ var _iterator4 = _createForOfIteratorHelper$1(cache),
3015
3080
  _step4;
3016
3081
  try {
3017
3082
  for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
3018
3083
  var element = _step4.value;
3019
3084
  if (!element.material || !element.material.parents) continue;
3020
- var _iterator5 = _createForOfIteratorHelper$2(element.material.parents),
3085
+ var _iterator5 = _createForOfIteratorHelper$1(element.material.parents),
3021
3086
  _step5;
3022
3087
  try {
3023
3088
  for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
@@ -3038,11 +3103,11 @@ function findMaterials(cache) {
3038
3103
  return findMaterials;
3039
3104
  }
3040
3105
 
3041
- function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
3042
- function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
3043
- function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3106
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
3107
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
3108
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3044
3109
  function deacCache(cache) {
3045
- var _iterator = _createForOfIteratorHelper$1(cache.getChildTransformNodes(true)),
3110
+ var _iterator = _createForOfIteratorHelper(cache.getChildTransformNodes(true)),
3046
3111
  _step;
3047
3112
  try {
3048
3113
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -3101,30 +3166,24 @@ function shadow() {
3101
3166
  }
3102
3167
  }
3103
3168
 
3104
- function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
3105
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
3106
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3107
-
3108
3169
  //! sets element set
3109
3170
  var parser = /*#__PURE__*/function () {
3110
3171
  var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
3111
3172
  var _changedElements$upda;
3112
- var sceneStore, hasRendered, hqRenderScript, scene, cache, changedElements, utilStore, uiStore, wasPlanned, elementCount, _yield$findAssets, cacheGroup, newCache, _changedElements$upda2, focusedElement, focusedNode, _iterator, _step, node, bbox, boundingInfo, frustumPlanes, isInFrustum, sizeDiff;
3173
+ var sceneStore, hasRendered, hqRenderScript, scene, cache, changedElements, utilStore, uiStore, _yield$findAssets, cacheGroup, newCache, _changedElements$upda2;
3113
3174
  return _regeneratorRuntime.wrap(function _callee$(_context) {
3114
3175
  while (1) switch (_context.prev = _context.next) {
3115
3176
  case 0:
3116
3177
  sceneStore = useSceneStoreContext();
3117
3178
  hasRendered = sceneStore.hasRendered, hqRenderScript = sceneStore.hqRenderScript, scene = sceneStore.scene, cache = sceneStore.cache, changedElements = sceneStore.changedElements;
3118
3179
  utilStore = useUtilStoreContext();
3119
- uiStore = useUIStoreContext();
3120
- wasPlanned = sceneStore.hasPlanned;
3121
- elementCount = sceneStore.mainElements.length; //disable elementrows from old cache
3180
+ uiStore = useUIStoreContext(); //disable elementrows from old cache
3122
3181
  changedElements === null || changedElements === void 0 || (_changedElements$upda = changedElements.updatedElements) === null || _changedElements$upda === void 0 || _changedElements$upda.forEach(function (el) {
3123
3182
  return utilStore.disableElementRows(el.name, cache);
3124
3183
  });
3125
- _context.next = 9;
3184
+ _context.next = 7;
3126
3185
  return findAssets(hqRenderScript.assets, cache);
3127
- case 9:
3186
+ case 7:
3128
3187
  _yield$findAssets = _context.sent;
3129
3188
  cacheGroup = _yield$findAssets.cacheGroup;
3130
3189
  newCache = _yield$findAssets.newCache;
@@ -3161,49 +3220,8 @@ var parser = /*#__PURE__*/function () {
3161
3220
  }
3162
3221
  utilStore.setRTVAnalyzeData();
3163
3222
  deacCache(cacheGroup);
3164
-
3165
- // Check if the bounding box is in the frustum
3166
- focusedElement = sceneStore.focusedElement;
3167
- if (!focusedElement) {
3168
- _context.next = 29;
3169
- break;
3170
- }
3171
- // let focusedNode = scene.getTransformNodeByName(focusedElement.name)!;
3172
- focusedNode = undefined;
3173
- _iterator = _createForOfIteratorHelper(scene.transformNodes);
3174
- try {
3175
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
3176
- node = _step.value;
3177
- if (node.name == focusedElement.name) {
3178
- if (sceneStore.getId(node) == focusedElement.id) {
3179
- focusedNode = node;
3180
- }
3181
- }
3182
- }
3183
- } catch (err) {
3184
- _iterator.e(err);
3185
- } finally {
3186
- _iterator.f();
3187
- }
3188
- if (focusedNode) {
3189
- _context.next = 23;
3190
- break;
3191
- }
3192
- return _context.abrupt("return");
3193
- case 23:
3194
- bbox = focusedNode.getHierarchyBoundingVectors();
3195
- boundingInfo = new BoundingInfo(bbox.min, bbox.max);
3196
- frustumPlanes = Frustum.GetPlanes(scene.activeCamera.getTransformationMatrix());
3197
- isInFrustum = boundingInfo.isCompletelyInFrustum(frustumPlanes);
3198
- sizeDiff = Vector3$1.Distance(bbox.min, bbox.max) - focusedElement.size;
3199
- if ((Math.abs(focusedNode.absolutePosition.x - focusedElement.position.x) > 0.05 || Math.abs(focusedNode.absolutePosition.y - focusedElement.position.y) > 0.05 || Math.abs(focusedNode.absolutePosition.z - focusedElement.position.z) > 0.05) && sceneStore.isControlledViewpoint || wasPlanned && sceneStore.isControlledViewpoint && (focusedElement.size != 0 && Math.abs(sizeDiff) > 0.09 || !isInFrustum && Math.abs(sizeDiff) > 0)) {
3200
- sceneStore.focusElement(focusedNode);
3201
- } else if ((wasPlanned || !uiStore.unityCombActive) && elementCount != sceneStore.mainElements.length) {
3202
- sceneStore.focusElement();
3203
- } else if (uiStore.unityCombActive) {
3204
- updateCam(sceneStore.hqRenderScript.cams[0], sceneStore.scene);
3205
- }
3206
- case 29:
3223
+ if (uiStore.unityCombActive) updateCam(hqRenderScript.cams[0], scene);
3224
+ case 15:
3207
3225
  case "end":
3208
3226
  return _context.stop();
3209
3227
  }
@@ -3277,7 +3295,7 @@ function useRealTimeRenderData (_ref) {
3277
3295
  }
3278
3296
  function _onSceneReady() {
3279
3297
  _onSceneReady = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
3280
- var _sceneStore$hqRenderS, getEnableUnityRtvKombi, cams, filteredCustomViewpoints, activeViewpoint, activeViewpointIdx, _sceneStore$previousH, activeElement, newCam, prevCam, _activeElement;
3298
+ var _sceneStore$hqRenderS, getEnableUnityRtvKombi, cams, filteredCustomViewpoints, activeViewpoint, activeViewpointIdx, activeElement, _activeElement;
3281
3299
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
3282
3300
  while (1) switch (_context2.prev = _context2.next) {
3283
3301
  case 0:
@@ -3315,12 +3333,12 @@ function useRealTimeRenderData (_ref) {
3315
3333
  allViewpoints: filteredCustomViewpoints
3316
3334
  }));
3317
3335
  }
3318
- _context2.next = 22;
3336
+ _context2.next = 17;
3319
3337
  break;
3320
3338
  case 11:
3321
3339
  sceneStore.hqRenderScript = JSON.parse(renderjob);
3322
3340
  if (checkCachedData()) {
3323
- _context2.next = 22;
3341
+ _context2.next = 17;
3324
3342
  break;
3325
3343
  }
3326
3344
  if (elementsInfo) {
@@ -3332,28 +3350,17 @@ function useRealTimeRenderData (_ref) {
3332
3350
  }
3333
3351
  if (!overlayImage) actions.toggleLoading('buildScene', false, false);
3334
3352
  sceneStore.isInitializing = false;
3335
- newCam = sceneStore.hqRenderScript.cams[0];
3336
- prevCam = (_sceneStore$previousH = sceneStore.previousHQRenderScript) === null || _sceneStore$previousH === void 0 ? void 0 : _sceneStore$previousH.cams[0];
3337
- if (prevCam) {
3338
- _context2.next = 20;
3339
- break;
3340
- }
3341
- return _context2.abrupt("return");
3342
- case 20:
3343
- if (utilStore.updateCam && (newCam.pos.x != prevCam.pos.x || newCam.pos.y != prevCam.pos.y || newCam.pos.z != prevCam.pos.z || newCam.rot.x != prevCam.rot.x || newCam.rot.y != prevCam.rot.y || newCam.rot.z != prevCam.rot.z)) {
3344
- updateCam(newCam, sceneStore.scene);
3345
- }
3346
3353
  return _context2.abrupt("return");
3347
- case 22:
3354
+ case 17:
3348
3355
  LOG.startTransaction({
3349
3356
  event: 'buildScene',
3350
3357
  message: 'Start Building Realtime Scene',
3351
3358
  eventId: 'BUILD_SCENE'
3352
3359
  });
3353
- _context2.prev = 23;
3354
- _context2.next = 26;
3360
+ _context2.prev = 18;
3361
+ _context2.next = 21;
3355
3362
  return parser();
3356
- case 26:
3363
+ case 21:
3357
3364
  if (elementsInfo) {
3358
3365
  _activeElement = elementsInfo.find(function (e) {
3359
3366
  return e.active;
@@ -3362,18 +3369,18 @@ function useRealTimeRenderData (_ref) {
3362
3369
  uiStore.initGui(callbacks.onElementSelected, sceneStore.elements, elementsInfo);
3363
3370
  }
3364
3371
  if (freePlacesOnGrids || plannedPlacesOnGrids) gridStore.getGrids(freePlacesOnGrids, plannedPlacesOnGrids);
3365
- _context2.next = 35;
3372
+ _context2.next = 30;
3366
3373
  break;
3367
- case 30:
3368
- _context2.prev = 30;
3369
- _context2.t0 = _context2["catch"](23);
3374
+ case 25:
3375
+ _context2.prev = 25;
3376
+ _context2.t0 = _context2["catch"](18);
3370
3377
  LOG.errorTransaction('BUILD_SCENE', 'RTS_0001', _context2.t0.message);
3371
3378
  LOG.error(new DivaError('Error building scene', {
3372
3379
  cause: _context2.t0,
3373
3380
  code: 'RTS_0001'
3374
3381
  }));
3375
3382
  sceneStore.isInitializing = false;
3376
- case 35:
3383
+ case 30:
3377
3384
  if (callbacks.setGlb) {
3378
3385
  sceneStore.exportScene().then(function (res) {
3379
3386
  var _callbacks$setGlb;
@@ -3388,17 +3395,16 @@ function useRealTimeRenderData (_ref) {
3388
3395
  }
3389
3396
  sceneStore.scene.onAfterRenderObservable.add(onFirstFrame);
3390
3397
  LOG.successTransaction('BUILD_SCENE');
3391
- case 39:
3398
+ case 34:
3392
3399
  case "end":
3393
3400
  return _context2.stop();
3394
3401
  }
3395
- }, _callee2, null, [[23, 30]]);
3402
+ }, _callee2, null, [[18, 25]]);
3396
3403
  }));
3397
3404
  return _onSceneReady.apply(this, arguments);
3398
3405
  }
3399
3406
  function onFirstFrame() {
3400
3407
  var _callbacks$onInitiali2, _sceneStore;
3401
- // sceneStore.scene.debugLayer!.show();
3402
3408
  sceneStore.isInitializing = false;
3403
3409
  sceneStore.scene.onAfterRenderObservable.removeCallback(onFirstFrame);
3404
3410
  if (!overlayImage) actions.toggleLoading('buildScene', false, false);
@@ -3445,7 +3451,7 @@ function useRealTimeRenderData (_ref) {
3445
3451
  engine.renderEvenInBackground = renderInBackground;
3446
3452
  engine.disablePerformanceMonitorInBackground = true;
3447
3453
  bScene = new Scene(engine, undefined);
3448
- context = registerContext(bScene, renderjob, apiConfig, jwt, viewHandler, callbacks.onMissingGeo, callbacks.requestNewOverlayImage, overlayImage, uiConfig);
3454
+ context = registerContext(bScene, renderjob, apiConfig, jwt, viewHandler, callbacks.onMissingGeo, callbacks.requestNewOverlayImage, overlayImage, uiConfig, callbacks.updateCameraInformation);
3449
3455
  sceneStore = context.sceneStore;
3450
3456
  utilStore = context.utilStore;
3451
3457
  gridStore = context.gridStore;