@crystaldesign/real-time-viewer 24.15.0-beta.4 → 24.15.0-beta.41
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 +53 -284
- package/build/types/real-time-viewer/src/caching/index.d.ts.map +1 -1
- package/build/types/real-time-viewer/src/context.d.ts +1 -0
- package/build/types/real-time-viewer/src/context.d.ts.map +1 -1
- package/build/types/real-time-viewer/src/index.d.ts +3 -3
- package/build/types/real-time-viewer/src/index.d.ts.map +1 -1
- package/build/types/real-time-viewer/src/parser/createCams/index.d.ts +2 -2
- package/build/types/real-time-viewer/src/parser/createCams/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/parser/types.d.ts +0 -1
- package/build/types/real-time-viewer/src/parser/types.d.ts.map +1 -1
- package/build/types/real-time-viewer/src/store/SceneStore.d.ts +2 -2
- package/build/types/real-time-viewer/src/store/SceneStore.d.ts.map +1 -1
- package/build/types/real-time-viewer/src/store/UtilStore.d.ts +1 -1
- package/build/types/real-time-viewer/src/useRealTimeRenderData.d.ts +1 -16
- package/build/types/real-time-viewer/src/useRealTimeRenderData.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
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { useRef,
|
|
2
|
-
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
1
|
+
import { useRef, useEffect, memo } from 'react';
|
|
3
2
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
4
|
-
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
5
3
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
6
4
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
7
5
|
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
8
6
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
7
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
9
8
|
import { Tags } from '@babylonjs/core/Misc/tags';
|
|
10
9
|
import { Vector3, Matrix } from '@babylonjs/core/Maths/math.vector';
|
|
10
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
11
11
|
import { MeshBuilder } from '@babylonjs/core/Meshes/meshBuilder';
|
|
12
12
|
import { ActionManager } from '@babylonjs/core/Actions/actionManager';
|
|
13
13
|
import { ExecuteCodeAction } from '@babylonjs/core/Actions/directActions';
|
|
@@ -35,7 +35,7 @@ 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
37
|
import '@babylonjs/loaders/glTF/2.0/';
|
|
38
|
-
import {
|
|
38
|
+
import { jsx } from 'react/jsx-runtime';
|
|
39
39
|
|
|
40
40
|
(function() {
|
|
41
41
|
const env = {"STAGE":"production"};
|
|
@@ -871,9 +871,9 @@ var lightning = function lightning(diva3durl, scene, cams, isMobile, sceneStore)
|
|
|
871
871
|
sceneStore.ssao = ssao;
|
|
872
872
|
};
|
|
873
873
|
|
|
874
|
-
function ownKeys
|
|
875
|
-
function _objectSpread
|
|
876
|
-
function createCams(scene,
|
|
874
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
875
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
876
|
+
function createCams(scene, viewpoint) {
|
|
877
877
|
var _useUtilStoreContext = useUtilStoreContext(),
|
|
878
878
|
vector3ToBVector3 = _useUtilStoreContext.vector3ToBVector3,
|
|
879
879
|
degreesToRadians = _useUtilStoreContext.degreesToRadians;
|
|
@@ -912,14 +912,13 @@ function createCams(scene, activeViewpoint, viewPoints) {
|
|
|
912
912
|
parent: undefined
|
|
913
913
|
})];
|
|
914
914
|
}
|
|
915
|
-
|
|
916
|
-
if (!a) return createDefaultCam();
|
|
915
|
+
if (!viewpoint) return createDefaultCam();
|
|
917
916
|
return [createCam({
|
|
918
917
|
name: 'defaultCam',
|
|
919
918
|
isEnabled: true,
|
|
920
|
-
pos: vector3ToBVector3(
|
|
921
|
-
rot: vector3ToBVector3(_objectSpread
|
|
922
|
-
x: -
|
|
919
|
+
pos: vector3ToBVector3(viewpoint.pos).multiply(new Vector3(-0.01, 0.01, 0.01)),
|
|
920
|
+
rot: vector3ToBVector3(_objectSpread(_objectSpread({}, viewpoint.rot), {}, {
|
|
921
|
+
x: -viewpoint.rot.x
|
|
923
922
|
})),
|
|
924
923
|
parent: undefined
|
|
925
924
|
})];
|
|
@@ -930,10 +929,11 @@ function updateCam(camera, scene) {
|
|
|
930
929
|
var utilStore = useUtilStoreContext();
|
|
931
930
|
var sceneStore = useSceneStoreContext();
|
|
932
931
|
var cam = scene.getCameraByName('defaultCam');
|
|
932
|
+
if (!cam) return;
|
|
933
933
|
if (camera.pos.x == cam.position.x && camera.pos.y == cam.position.y && camera.pos.z == camera.pos.z) return;
|
|
934
934
|
var newPos = utilStore.vector3ToBVector3(camera.pos).multiply(new Vector3(-0.01, 0.01, 0.01));
|
|
935
935
|
cam.position = newPos;
|
|
936
|
-
cam.rotation = utilStore.degreesToRadians(utilStore.vector3ToBVector3(_objectSpread
|
|
936
|
+
cam.rotation = utilStore.degreesToRadians(utilStore.vector3ToBVector3(_objectSpread(_objectSpread({}, camera.rot), {}, {
|
|
937
937
|
x: -camera.rot.x
|
|
938
938
|
})));
|
|
939
939
|
cam.target = utilStore.vector3ToBVector3(camera.targetPos).multiply(new Vector3(-0.01, 0.01, 0.01));
|
|
@@ -1359,9 +1359,9 @@ var SceneStore = /*#__PURE__*/function () {
|
|
|
1359
1359
|
}
|
|
1360
1360
|
}, {
|
|
1361
1361
|
key: "setResolution",
|
|
1362
|
-
value: function setResolution(
|
|
1363
|
-
if (!resolution || !
|
|
1364
|
-
var boundingClientRect =
|
|
1362
|
+
value: function setResolution(gameCanvas, resolution) {
|
|
1363
|
+
if (!resolution || !gameCanvas) return;
|
|
1364
|
+
var boundingClientRect = gameCanvas.getBoundingClientRect();
|
|
1365
1365
|
var maxX = boundingClientRect.right - boundingClientRect.left;
|
|
1366
1366
|
var maxY = boundingClientRect.bottom - boundingClientRect.top;
|
|
1367
1367
|
var ratio = Math.min(maxX / resolution.x, maxY / resolution.y);
|
|
@@ -1376,10 +1376,10 @@ var SceneStore = /*#__PURE__*/function () {
|
|
|
1376
1376
|
}
|
|
1377
1377
|
}, {
|
|
1378
1378
|
key: "init",
|
|
1379
|
-
value: function init(diva3durl,
|
|
1379
|
+
value: function init(diva3durl, gameCanvas, viewpoint, resolution) {
|
|
1380
1380
|
Tools.fallbackTexture = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='; // blank white image
|
|
1381
|
-
this.setResolution(
|
|
1382
|
-
var cams = createCams(this._scene,
|
|
1381
|
+
this.setResolution(gameCanvas, resolution);
|
|
1382
|
+
var cams = createCams(this._scene, viewpoint);
|
|
1383
1383
|
this._targetCameraPosition = cams[0].position;
|
|
1384
1384
|
lightning(diva3durl, this._scene, cams, this._utilStore.isMobile, this);
|
|
1385
1385
|
}
|
|
@@ -1536,10 +1536,10 @@ var SceneStore = /*#__PURE__*/function () {
|
|
|
1536
1536
|
var radius = Vector3.Distance(bbox.min, bbox.max) / 2;
|
|
1537
1537
|
if (radius == Infinity) return;
|
|
1538
1538
|
var aspectRatio = engine.getRenderHeight() / engine.getRenderWidth();
|
|
1539
|
-
var distance = radius / Math.tan(cam.fov
|
|
1539
|
+
var distance = radius / Math.tan(cam.fov);
|
|
1540
1540
|
var direction = cam.getDirection(Vector3.Backward());
|
|
1541
1541
|
if (aspectRatio > 1) distance *= aspectRatio;
|
|
1542
|
-
var newPosition = center.add(direction.scale(distance));
|
|
1542
|
+
var newPosition = center.add(direction.scale(distance * 1.7));
|
|
1543
1543
|
if (newPosition.x == 0 && newPosition.y == 0 && newPosition.z == 0) return;
|
|
1544
1544
|
this.cameraTargetPosition = center;
|
|
1545
1545
|
this.targetCameraPosition = newPosition;
|
|
@@ -1817,7 +1817,7 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
1817
1817
|
if (!element) return 0; // continue
|
|
1818
1818
|
var guiElemLeftBack = new TransformNode('guiElem_' + elementInfo.elementId, _this4._scene);
|
|
1819
1819
|
var bbox = element.getHierarchyBoundingVectors();
|
|
1820
|
-
guiElemLeftBack.position = new Vector3(
|
|
1820
|
+
guiElemLeftBack.position = element.absolutePosition.add(new Vector3(0, bbox.max.y, 0));
|
|
1821
1821
|
guiElemRightBack = undefined;
|
|
1822
1822
|
if (_this4._uiConfig.posTrashIcon == 'TOP_RIGHT_BACK') {
|
|
1823
1823
|
guiElemRightBack = new TransformNode('guiElem_' + elementInfo.elementId, _this4._scene);
|
|
@@ -2223,6 +2223,7 @@ function caching () {
|
|
|
2223
2223
|
cache = _useSceneStoreContext.cache,
|
|
2224
2224
|
hqRenderScript = _useSceneStoreContext.hqRenderScript,
|
|
2225
2225
|
previousHQRenderScript = _useSceneStoreContext.previousHQRenderScript;
|
|
2226
|
+
_useSceneStoreContext.scene;
|
|
2226
2227
|
var elements = undefined;
|
|
2227
2228
|
var chaching = function chaching() {
|
|
2228
2229
|
var _hqRenderScript$scene, _scene$nodes, _curElementRoot$nodes, _curElementRoot$nodes2, _prevElementRoot$node;
|
|
@@ -3170,14 +3171,14 @@ function shadow() {
|
|
|
3170
3171
|
var parser = /*#__PURE__*/function () {
|
|
3171
3172
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
3172
3173
|
var _changedElements$upda;
|
|
3173
|
-
var sceneStore, hasRendered, hqRenderScript, scene, cache, changedElements, utilStore,
|
|
3174
|
+
var sceneStore, hasRendered, hqRenderScript, scene, cache, changedElements, utilStore, _yield$findAssets, cacheGroup, newCache, _changedElements$upda2;
|
|
3174
3175
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
3175
3176
|
while (1) switch (_context.prev = _context.next) {
|
|
3176
3177
|
case 0:
|
|
3177
3178
|
sceneStore = useSceneStoreContext();
|
|
3178
3179
|
hasRendered = sceneStore.hasRendered, hqRenderScript = sceneStore.hqRenderScript, scene = sceneStore.scene, cache = sceneStore.cache, changedElements = sceneStore.changedElements;
|
|
3179
3180
|
utilStore = useUtilStoreContext();
|
|
3180
|
-
|
|
3181
|
+
useUIStoreContext(); //disable elementrows from old cache
|
|
3181
3182
|
changedElements === null || changedElements === void 0 || (_changedElements$upda = changedElements.updatedElements) === null || _changedElements$upda === void 0 || _changedElements$upda.forEach(function (el) {
|
|
3182
3183
|
return utilStore.disableElementRows(el.name, cache);
|
|
3183
3184
|
});
|
|
@@ -3220,8 +3221,7 @@ var parser = /*#__PURE__*/function () {
|
|
|
3220
3221
|
}
|
|
3221
3222
|
utilStore.setRTVAnalyzeData();
|
|
3222
3223
|
deacCache(cacheGroup);
|
|
3223
|
-
|
|
3224
|
-
case 15:
|
|
3224
|
+
case 14:
|
|
3225
3225
|
case "end":
|
|
3226
3226
|
return _context.stop();
|
|
3227
3227
|
}
|
|
@@ -3232,21 +3232,17 @@ var parser = /*#__PURE__*/function () {
|
|
|
3232
3232
|
};
|
|
3233
3233
|
}();
|
|
3234
3234
|
|
|
3235
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3236
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3237
3235
|
var LOG = getLogger('ARViewer', 'RealTimeRenderData');
|
|
3238
3236
|
function useRealTimeRenderData (_ref) {
|
|
3239
|
-
var _initViewpoint$name;
|
|
3240
3237
|
var jwt = _ref.jwt,
|
|
3241
3238
|
actions = _ref.actions,
|
|
3242
3239
|
apiConfig = _ref.apiConfig,
|
|
3243
3240
|
renderjob = _ref.renderjob,
|
|
3244
|
-
|
|
3241
|
+
viewpoint = _ref.viewpoint,
|
|
3245
3242
|
resolution = _ref.resolution,
|
|
3246
3243
|
viewHandler = _ref.viewHandler,
|
|
3247
3244
|
inBackground = _ref.inBackground,
|
|
3248
3245
|
elementsInfo = _ref.elementsInfo,
|
|
3249
|
-
initViewpoint = _ref.initViewpoint,
|
|
3250
3246
|
overlayImage = _ref.overlayImage,
|
|
3251
3247
|
freePlacesOnGrids = _ref.freePlacesOnGrids,
|
|
3252
3248
|
plannedPlacesOnGrids = _ref.plannedPlacesOnGrids,
|
|
@@ -3254,17 +3250,6 @@ function useRealTimeRenderData (_ref) {
|
|
|
3254
3250
|
uiConfig = _ref.uiConfig,
|
|
3255
3251
|
renderInBackground = _ref.renderInBackground;
|
|
3256
3252
|
var gameCanvas = useRef(null);
|
|
3257
|
-
var resolutionDiv = useRef(null);
|
|
3258
|
-
var _useState = useState({
|
|
3259
|
-
activeViewpoint: {
|
|
3260
|
-
current: initViewpoint ? viewpoints === null || viewpoints === void 0 ? void 0 : viewpoints.indexOf(initViewpoint) : 0,
|
|
3261
|
-
name: (_initViewpoint$name = initViewpoint === null || initViewpoint === void 0 ? void 0 : initViewpoint.name) !== null && _initViewpoint$name !== void 0 ? _initViewpoint$name : 'defaultCam'
|
|
3262
|
-
},
|
|
3263
|
-
allViewpoints: viewpoints
|
|
3264
|
-
}),
|
|
3265
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
3266
|
-
viewpointState = _useState2[0],
|
|
3267
|
-
setViewpointState = _useState2[1];
|
|
3268
3253
|
var sceneStore = useSceneStoreContext();
|
|
3269
3254
|
var utilStore = useUtilStoreContext();
|
|
3270
3255
|
var gridStore = useGridStoreContext();
|
|
@@ -3295,7 +3280,7 @@ function useRealTimeRenderData (_ref) {
|
|
|
3295
3280
|
}
|
|
3296
3281
|
function _onSceneReady() {
|
|
3297
3282
|
_onSceneReady = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
3298
|
-
var
|
|
3283
|
+
var activeElement, _activeElement;
|
|
3299
3284
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
3300
3285
|
while (1) switch (_context2.prev = _context2.next) {
|
|
3301
3286
|
case 0:
|
|
@@ -3308,37 +3293,18 @@ function useRealTimeRenderData (_ref) {
|
|
|
3308
3293
|
sceneStore.isInitializing = true;
|
|
3309
3294
|
if (!overlayImage) actions.toggleLoading('buildScene', false, true);
|
|
3310
3295
|
if (sceneStore.hasRendered) {
|
|
3311
|
-
_context2.next =
|
|
3296
|
+
_context2.next = 10;
|
|
3312
3297
|
break;
|
|
3313
3298
|
}
|
|
3314
|
-
|
|
3299
|
+
viewHandler === null || viewHandler === void 0 ? void 0 : viewHandler.divaWebPlanner.getEnableUnityRtvKombi();
|
|
3315
3300
|
if (inBackground) sceneStore.scene.getEngine().setHardwareScalingLevel(5);
|
|
3316
|
-
sceneStore.init(apiConfig.diva3darchive + '/',
|
|
3317
|
-
|
|
3318
|
-
cams = createCams(sceneStore.scene, initViewpoint);
|
|
3319
|
-
filteredCustomViewpoints = viewpoints.filter(function (vp) {
|
|
3320
|
-
return cams.find(function (cam) {
|
|
3321
|
-
return cam.name == vp.name;
|
|
3322
|
-
}) != undefined;
|
|
3323
|
-
});
|
|
3324
|
-
activeViewpoint = filteredCustomViewpoints.find(function (vp) {
|
|
3325
|
-
return vp.name == sceneStore.activeCamera.name;
|
|
3326
|
-
});
|
|
3327
|
-
activeViewpointIdx = filteredCustomViewpoints.indexOf(activeViewpoint);
|
|
3328
|
-
setViewpointState(_objectSpread(_objectSpread({}, viewpointState), {}, {
|
|
3329
|
-
activeViewpoint: {
|
|
3330
|
-
current: activeViewpointIdx,
|
|
3331
|
-
name: sceneStore.activeCamera.name
|
|
3332
|
-
},
|
|
3333
|
-
allViewpoints: filteredCustomViewpoints
|
|
3334
|
-
}));
|
|
3335
|
-
}
|
|
3336
|
-
_context2.next = 17;
|
|
3301
|
+
sceneStore.init(apiConfig.diva3darchive + '/', gameCanvas.current, viewpoint, resolution);
|
|
3302
|
+
_context2.next = 16;
|
|
3337
3303
|
break;
|
|
3338
|
-
case
|
|
3304
|
+
case 10:
|
|
3339
3305
|
sceneStore.hqRenderScript = JSON.parse(renderjob);
|
|
3340
3306
|
if (checkCachedData()) {
|
|
3341
|
-
_context2.next =
|
|
3307
|
+
_context2.next = 16;
|
|
3342
3308
|
break;
|
|
3343
3309
|
}
|
|
3344
3310
|
if (elementsInfo) {
|
|
@@ -3351,16 +3317,16 @@ function useRealTimeRenderData (_ref) {
|
|
|
3351
3317
|
if (!overlayImage) actions.toggleLoading('buildScene', false, false);
|
|
3352
3318
|
sceneStore.isInitializing = false;
|
|
3353
3319
|
return _context2.abrupt("return");
|
|
3354
|
-
case
|
|
3320
|
+
case 16:
|
|
3355
3321
|
LOG.startTransaction({
|
|
3356
3322
|
event: 'buildScene',
|
|
3357
3323
|
message: 'Start Building Realtime Scene',
|
|
3358
3324
|
eventId: 'BUILD_SCENE'
|
|
3359
3325
|
});
|
|
3360
|
-
_context2.prev =
|
|
3361
|
-
_context2.next =
|
|
3326
|
+
_context2.prev = 17;
|
|
3327
|
+
_context2.next = 20;
|
|
3362
3328
|
return parser();
|
|
3363
|
-
case
|
|
3329
|
+
case 20:
|
|
3364
3330
|
if (elementsInfo) {
|
|
3365
3331
|
_activeElement = elementsInfo.find(function (e) {
|
|
3366
3332
|
return e.active;
|
|
@@ -3369,18 +3335,18 @@ function useRealTimeRenderData (_ref) {
|
|
|
3369
3335
|
uiStore.initGui(callbacks.onElementSelected, sceneStore.elements, elementsInfo);
|
|
3370
3336
|
}
|
|
3371
3337
|
if (freePlacesOnGrids || plannedPlacesOnGrids) gridStore.getGrids(freePlacesOnGrids, plannedPlacesOnGrids);
|
|
3372
|
-
_context2.next =
|
|
3338
|
+
_context2.next = 29;
|
|
3373
3339
|
break;
|
|
3374
|
-
case
|
|
3375
|
-
_context2.prev =
|
|
3376
|
-
_context2.t0 = _context2["catch"](
|
|
3340
|
+
case 24:
|
|
3341
|
+
_context2.prev = 24;
|
|
3342
|
+
_context2.t0 = _context2["catch"](17);
|
|
3377
3343
|
LOG.errorTransaction('BUILD_SCENE', 'RTS_0001', _context2.t0.message);
|
|
3378
3344
|
LOG.error(new DivaError('Error building scene', {
|
|
3379
3345
|
cause: _context2.t0,
|
|
3380
3346
|
code: 'RTS_0001'
|
|
3381
3347
|
}));
|
|
3382
3348
|
sceneStore.isInitializing = false;
|
|
3383
|
-
case
|
|
3349
|
+
case 29:
|
|
3384
3350
|
if (callbacks.setGlb) {
|
|
3385
3351
|
sceneStore.exportScene().then(function (res) {
|
|
3386
3352
|
var _callbacks$setGlb;
|
|
@@ -3395,11 +3361,11 @@ function useRealTimeRenderData (_ref) {
|
|
|
3395
3361
|
}
|
|
3396
3362
|
sceneStore.scene.onAfterRenderObservable.add(onFirstFrame);
|
|
3397
3363
|
LOG.successTransaction('BUILD_SCENE');
|
|
3398
|
-
case
|
|
3364
|
+
case 33:
|
|
3399
3365
|
case "end":
|
|
3400
3366
|
return _context2.stop();
|
|
3401
3367
|
}
|
|
3402
|
-
}, _callee2, null, [[
|
|
3368
|
+
}, _callee2, null, [[17, 24]]);
|
|
3403
3369
|
}));
|
|
3404
3370
|
return _onSceneReady.apply(this, arguments);
|
|
3405
3371
|
}
|
|
@@ -3502,6 +3468,8 @@ function useRealTimeRenderData (_ref) {
|
|
|
3502
3468
|
useEffect(function () {
|
|
3503
3469
|
if (!utilStore.updateWithUnityData) return;
|
|
3504
3470
|
if (overlayImage && uiStore) uiStore.updateOverlayImage(overlayImage);
|
|
3471
|
+
// update cam pos for start viewpoints (hqr) could be the same, since it doesn't change when rotating
|
|
3472
|
+
if (utilStore && viewpoint) updateCam(viewpoint, sceneStore.scene);
|
|
3505
3473
|
}, [overlayImage]);
|
|
3506
3474
|
useEffect(function () {
|
|
3507
3475
|
if (inBackground) {
|
|
@@ -3510,66 +3478,8 @@ function useRealTimeRenderData (_ref) {
|
|
|
3510
3478
|
sceneStore.scene.getEngine().runRenderLoop(renderLoop);
|
|
3511
3479
|
}
|
|
3512
3480
|
}, [inBackground]);
|
|
3513
|
-
var createViewpoint = function createViewpoint(name, global) {
|
|
3514
|
-
if (!callbacks.viewpointCreated) return;
|
|
3515
|
-
var cam = sceneStore.scene.activeCamera;
|
|
3516
|
-
var parent = cam.parent;
|
|
3517
|
-
var camRotation = utilStore.radiansToDegrees(cam.rotation);
|
|
3518
|
-
var parentRotation = utilStore.radiansToDegrees(parent.rotation);
|
|
3519
|
-
callbacks.viewpointCreated(name, global, {
|
|
3520
|
-
position: utilStore.bvector3ToVector3(new Vector3(cam.position.x * -100, cam.position.y * 100, cam.position.z * 100)),
|
|
3521
|
-
rotation: utilStore.bvector3ToVector3(new Vector3(camRotation.x - 180, camRotation.y, parentRotation.z))
|
|
3522
|
-
}, {
|
|
3523
|
-
position: utilStore.bvector3ToVector3(new Vector3(parent.position.x * -100, parent.position.y * 100, parent.position.z * 100)),
|
|
3524
|
-
rotation: utilStore.bvector3ToVector3(new Vector3(parentRotation.x - 90, parentRotation.y + 180, parentRotation.z))
|
|
3525
|
-
});
|
|
3526
|
-
};
|
|
3527
|
-
function nextViewpoint(forward) {
|
|
3528
|
-
var _sceneStore$scene;
|
|
3529
|
-
if (!sceneStore) return;
|
|
3530
|
-
if (!viewpointState || !viewpointState.allViewpoints) return;
|
|
3531
|
-
var scene = sceneStore.scene;
|
|
3532
|
-
|
|
3533
|
-
//deactivate old viewpoint
|
|
3534
|
-
var oldViewpoint = scene.cameras.find(function (cam) {
|
|
3535
|
-
return cam.name == viewpointState.allViewpoints[viewpointState.activeViewpoint.current].name;
|
|
3536
|
-
});
|
|
3537
|
-
oldViewpoint.detachControl();
|
|
3538
|
-
var nextViewpointIdx = 0;
|
|
3539
|
-
if (forward) {
|
|
3540
|
-
nextViewpointIdx = 1;
|
|
3541
|
-
if (viewpointState.allViewpoints.length == nextViewpointIdx + viewpointState.activeViewpoint.current) {
|
|
3542
|
-
nextViewpointIdx = -(viewpointState.allViewpoints.length - 1);
|
|
3543
|
-
}
|
|
3544
|
-
} else {
|
|
3545
|
-
nextViewpointIdx = -1;
|
|
3546
|
-
if (viewpointState.activeViewpoint.current + nextViewpointIdx < 0) {
|
|
3547
|
-
nextViewpointIdx = viewpointState.allViewpoints.length - 1;
|
|
3548
|
-
}
|
|
3549
|
-
}
|
|
3550
|
-
var viewpoint = scene.cameras.find(function (cam) {
|
|
3551
|
-
return cam.name == viewpointState.allViewpoints[viewpointState.activeViewpoint.current + nextViewpointIdx].name;
|
|
3552
|
-
});
|
|
3553
|
-
if (!viewpoint) throw new Error('missing viewpoint in scene');
|
|
3554
|
-
setViewpointState(_objectSpread(_objectSpread({}, viewpointState), {}, {
|
|
3555
|
-
activeViewpoint: {
|
|
3556
|
-
current: viewpointState.activeViewpoint.current + nextViewpointIdx,
|
|
3557
|
-
name: viewpoint.name
|
|
3558
|
-
}
|
|
3559
|
-
}));
|
|
3560
|
-
scene.activeCamera = viewpoint;
|
|
3561
|
-
viewpoint.attachControl((_sceneStore$scene = sceneStore.scene) === null || _sceneStore$scene === void 0 ? void 0 : _sceneStore$scene.getEngine().getRenderingCanvas(), true);
|
|
3562
|
-
}
|
|
3563
3481
|
return {
|
|
3564
|
-
gameCanvas: gameCanvas
|
|
3565
|
-
resolutionDiv: resolutionDiv,
|
|
3566
|
-
viewpoints: {
|
|
3567
|
-
state: viewpointState,
|
|
3568
|
-
methods: {
|
|
3569
|
-
create: createViewpoint,
|
|
3570
|
-
next: nextViewpoint
|
|
3571
|
-
}
|
|
3572
|
-
}
|
|
3482
|
+
gameCanvas: gameCanvas
|
|
3573
3483
|
};
|
|
3574
3484
|
}
|
|
3575
3485
|
|
|
@@ -3601,142 +3511,13 @@ function styleInject(css, ref) {
|
|
|
3601
3511
|
}
|
|
3602
3512
|
|
|
3603
3513
|
var canvas = "canvas-gZFEa";
|
|
3604
|
-
var flexContainerColumn = "flex-container-column-XYHvU";
|
|
3605
|
-
var flexContainerRow = "flex-container-row-ENPOV";
|
|
3606
|
-
var createButton = "create-button-NPGTz";
|
|
3607
|
-
var checkBox = "check-box-2GPp1";
|
|
3608
|
-
var inputField = "input-field-uCQ0h";
|
|
3609
3514
|
var css_248z = ".canvas-gZFEa.focus-visible-ubYpO {\n outline: medium none invert;\n outline: initial;\n}\n\n.canvas-gZFEa.focus-visible-ubYpO {\n outline: medium none invert;\n outline: initial;\n}\n\n.canvas-gZFEa.focus-visible-ubYpO {\n outline: medium none invert;\n outline: initial;\n}\n\n.canvas-gZFEa:focus-visible {\n outline: medium none invert;\n outline: initial;\n}\n\n.flex-container-column-XYHvU {\n display: flex;\n flex-wrap: nowrap;\n flex-direction: column;\n background-color: white;\n gap: 15px;\n padding: 10px;\n margin-top: 50px;\n border: 0.5px solid;\n border-top-right-radius: 10px;\n border-bottom-right-radius: 10px;\n}\n\n.flex-container-column-closed-2D7IF {\n display: flex;\n flex-wrap: nowrap;\n flex-direction: column;\n background-color: white;\n gap: 15px;\n padding: 10px;\n}\n\n.flex-container-row-ENPOV {\n display: flex;\n justify-content: space-between;\n flex-wrap: nowrap;\n flex-direction: row;\n background-color: white;\n gap: 5px;\n}\n\n.create-button-NPGTz {\n width: 200px;\n height: 35px;\n border-radius: 5px;\n border-style: none;\n color: #fff;\n background-color: #713434;\n}\n\n.create-button-NPGTz:hover {\n background-color: #42090e;\n}\n\n.check-box-2GPp1 {\n width: 20px;\n height: 20px;\n margin: 0px;\n}\n\n.input-field-uCQ0h {\n width: 193px;\n height: 35px;\n border-radius: 5px;\n border-style: none;\n color: rgb(0, 0, 0);\n border-style: solid;\n border-color: #000000;\n background-color: #f7f7f7;\n border-width: 0.5px;\n}\n\n.input-field-uCQ0h:hover {\n background-color: #ebebeb;\n}\n";
|
|
3610
3515
|
styleInject(css_248z);
|
|
3611
3516
|
|
|
3612
|
-
var arrowLeft = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20height%3D%2248%22%20width%3D%2248%22%3E%3Cpath%20d%3D%22M28.05%2036%2016%2023.95%2028.05%2011.9l2.15%202.15-9.9%209.9%209.9%209.9Z%22%2F%3E%3C%2Fsvg%3E";
|
|
3613
|
-
|
|
3614
|
-
var arrowRight = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20height%3D%2248%22%20width%3D%2248%22%3E%3Cpath%20d%3D%22m18.75%2036-2.15-2.15%209.9-9.9-9.9-9.9%202.15-2.15L30.8%2023.95Z%22%2F%3E%3C%2Fsvg%3E";
|
|
3615
|
-
|
|
3616
|
-
function ViewpointCreationGui(_ref) {
|
|
3617
|
-
var callback = _ref.callback;
|
|
3618
|
-
var _useState = useState(''),
|
|
3619
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
3620
|
-
name = _useState2[0],
|
|
3621
|
-
setName = _useState2[1];
|
|
3622
|
-
var _useState3 = useState(false),
|
|
3623
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
3624
|
-
global = _useState4[0],
|
|
3625
|
-
setGlobal = _useState4[1];
|
|
3626
|
-
var _useState5 = useState(false),
|
|
3627
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
3628
|
-
showViewpointGui = _useState6[0],
|
|
3629
|
-
setShowViewpointGui = _useState6[1];
|
|
3630
|
-
return /*#__PURE__*/jsxs("div", {
|
|
3631
|
-
children: [/*#__PURE__*/jsxs("div", {
|
|
3632
|
-
id: "Viewpoint Gui",
|
|
3633
|
-
style: showViewpointGui ? {
|
|
3634
|
-
position: 'absolute',
|
|
3635
|
-
width: '250px'
|
|
3636
|
-
} : {
|
|
3637
|
-
display: 'none'
|
|
3638
|
-
},
|
|
3639
|
-
className: flexContainerColumn,
|
|
3640
|
-
children: [/*#__PURE__*/jsxs("div", {
|
|
3641
|
-
className: flexContainerRow,
|
|
3642
|
-
children: [/*#__PURE__*/jsx("input", {
|
|
3643
|
-
className: inputField,
|
|
3644
|
-
onChange: function onChange(e) {
|
|
3645
|
-
return setName(e.target.value);
|
|
3646
|
-
}
|
|
3647
|
-
}), /*#__PURE__*/jsx("div", {
|
|
3648
|
-
onClick: function onClick() {
|
|
3649
|
-
return setShowViewpointGui(false);
|
|
3650
|
-
},
|
|
3651
|
-
style: {
|
|
3652
|
-
width: '28px',
|
|
3653
|
-
height: '34px',
|
|
3654
|
-
backgroundImage: "url(".concat(arrowLeft, ")")
|
|
3655
|
-
}
|
|
3656
|
-
})]
|
|
3657
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
3658
|
-
className: flexContainerRow,
|
|
3659
|
-
children: [/*#__PURE__*/jsx("div", {
|
|
3660
|
-
children: "Global"
|
|
3661
|
-
}), /*#__PURE__*/jsx("input", {
|
|
3662
|
-
type: "checkbox",
|
|
3663
|
-
className: checkBox,
|
|
3664
|
-
onClick: function onClick() {
|
|
3665
|
-
return setGlobal(!global);
|
|
3666
|
-
}
|
|
3667
|
-
})]
|
|
3668
|
-
}), /*#__PURE__*/jsx("button", {
|
|
3669
|
-
className: createButton,
|
|
3670
|
-
onClick: function onClick() {
|
|
3671
|
-
return callback(name, global);
|
|
3672
|
-
},
|
|
3673
|
-
children: "create"
|
|
3674
|
-
})]
|
|
3675
|
-
}), /*#__PURE__*/jsx("div", {
|
|
3676
|
-
onClick: function onClick() {
|
|
3677
|
-
return setShowViewpointGui(true);
|
|
3678
|
-
},
|
|
3679
|
-
style: showViewpointGui ? {
|
|
3680
|
-
display: 'none'
|
|
3681
|
-
} : {
|
|
3682
|
-
position: 'absolute',
|
|
3683
|
-
marginTop: '50px',
|
|
3684
|
-
width: '30px',
|
|
3685
|
-
height: '36px',
|
|
3686
|
-
backgroundImage: "url(".concat(arrowRight, ")")
|
|
3687
|
-
}
|
|
3688
|
-
})]
|
|
3689
|
-
});
|
|
3690
|
-
}
|
|
3691
|
-
function ViewpointSelectionGui(_ref2) {
|
|
3692
|
-
var name = _ref2.name,
|
|
3693
|
-
nextViewpoint = _ref2.nextViewpoint;
|
|
3694
|
-
return /*#__PURE__*/jsxs("div", {
|
|
3695
|
-
id: "viewpointSelectionGui",
|
|
3696
|
-
style: {
|
|
3697
|
-
position: 'absolute',
|
|
3698
|
-
bottom: 5,
|
|
3699
|
-
left: '41%',
|
|
3700
|
-
display: 'flex',
|
|
3701
|
-
flexDirection: 'row'
|
|
3702
|
-
},
|
|
3703
|
-
children: [/*#__PURE__*/jsx("div", {
|
|
3704
|
-
id: "setLastViewpoint",
|
|
3705
|
-
style: {
|
|
3706
|
-
width: 50,
|
|
3707
|
-
height: 35,
|
|
3708
|
-
backgroundImage: "url(".concat(arrowLeft, ")")
|
|
3709
|
-
},
|
|
3710
|
-
onClick: function onClick() {
|
|
3711
|
-
return nextViewpoint(false);
|
|
3712
|
-
}
|
|
3713
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
3714
|
-
style: {
|
|
3715
|
-
paddingTop: '12px'
|
|
3716
|
-
},
|
|
3717
|
-
children: [" ", name, " "]
|
|
3718
|
-
}), /*#__PURE__*/jsx("div", {
|
|
3719
|
-
id: "setNextViewpoint",
|
|
3720
|
-
style: {
|
|
3721
|
-
width: 50,
|
|
3722
|
-
height: 35,
|
|
3723
|
-
backgroundImage: "url(".concat(arrowRight, ")")
|
|
3724
|
-
},
|
|
3725
|
-
onClick: function onClick() {
|
|
3726
|
-
return nextViewpoint(true);
|
|
3727
|
-
}
|
|
3728
|
-
})]
|
|
3729
|
-
});
|
|
3730
|
-
}
|
|
3731
|
-
|
|
3732
3517
|
var RealTimeRenderer = /*#__PURE__*/memo(function (props) {
|
|
3733
|
-
var _viewpoints$state$all;
|
|
3734
3518
|
var _useRealTimeRenderDat = useRealTimeRenderData(props),
|
|
3735
|
-
resolutionDiv = _useRealTimeRenderDat.resolutionDiv,
|
|
3736
|
-
viewpoints = _useRealTimeRenderDat.viewpoints,
|
|
3737
3519
|
gameCanvas = _useRealTimeRenderDat.gameCanvas;
|
|
3738
|
-
return /*#__PURE__*/
|
|
3739
|
-
ref: resolutionDiv,
|
|
3520
|
+
return /*#__PURE__*/jsx("div", {
|
|
3740
3521
|
style: {
|
|
3741
3522
|
position: 'absolute',
|
|
3742
3523
|
top: '0px',
|
|
@@ -3745,19 +3526,7 @@ var RealTimeRenderer = /*#__PURE__*/memo(function (props) {
|
|
|
3745
3526
|
backgroundColor: 'white',
|
|
3746
3527
|
zIndex: 2
|
|
3747
3528
|
},
|
|
3748
|
-
|
|
3749
|
-
if (ev.key == 'ArrowLeft') {
|
|
3750
|
-
viewpoints.methods.next(false);
|
|
3751
|
-
} else if (ev.key == 'ArrowRight') {
|
|
3752
|
-
viewpoints.methods.next(false);
|
|
3753
|
-
}
|
|
3754
|
-
},
|
|
3755
|
-
children: [props.viewpoints && /*#__PURE__*/jsx(ViewpointCreationGui, {
|
|
3756
|
-
callback: viewpoints.methods.create
|
|
3757
|
-
}), viewpoints.state.allViewpoints && ((_viewpoints$state$all = viewpoints.state.allViewpoints) === null || _viewpoints$state$all === void 0 ? void 0 : _viewpoints$state$all.length) > 0 && /*#__PURE__*/jsx(ViewpointSelectionGui, {
|
|
3758
|
-
nextViewpoint: viewpoints.methods.next,
|
|
3759
|
-
name: viewpoints.state.activeViewpoint.name
|
|
3760
|
-
}), /*#__PURE__*/jsx("canvas", {
|
|
3529
|
+
children: /*#__PURE__*/jsx("canvas", {
|
|
3761
3530
|
id: "gameCanvas",
|
|
3762
3531
|
ref: gameCanvas,
|
|
3763
3532
|
style: {
|
|
@@ -3767,11 +3536,11 @@ var RealTimeRenderer = /*#__PURE__*/memo(function (props) {
|
|
|
3767
3536
|
display: 'block'
|
|
3768
3537
|
},
|
|
3769
3538
|
className: canvas
|
|
3770
|
-
})
|
|
3539
|
+
})
|
|
3771
3540
|
});
|
|
3772
3541
|
}, function (prevProps, curProps) {
|
|
3773
|
-
var _prevProps$overlayIma, _curProps$overlayImag, _prevProps$overlayIma2, _curProps$overlayImag2;
|
|
3774
|
-
if (((_prevProps$overlayIma = prevProps.overlayImage) === null || _prevProps$overlayIma === void 0 ? void 0 : _prevProps$overlayIma.base64) != ((_curProps$overlayImag = curProps.overlayImage) === null || _curProps$overlayImag === void 0 ? void 0 : _curProps$overlayImag.base64) || ((_prevProps$overlayIma2 = prevProps.overlayImage) === null || _prevProps$overlayIma2 === void 0 ? void 0 : _prevProps$overlayIma2.isStaticBg) != ((_curProps$overlayImag2 = curProps.overlayImage) === null || _curProps$overlayImag2 === void 0 ? void 0 : _curProps$overlayImag2.isStaticBg)) return false;
|
|
3542
|
+
var _prevProps$overlayIma, _curProps$overlayImag, _prevProps$overlayIma2, _curProps$overlayImag2, _curProps$overlayImag3;
|
|
3543
|
+
if (((_prevProps$overlayIma = prevProps.overlayImage) === null || _prevProps$overlayIma === void 0 ? void 0 : _prevProps$overlayIma.base64) != ((_curProps$overlayImag = curProps.overlayImage) === null || _curProps$overlayImag === void 0 ? void 0 : _curProps$overlayImag.base64) || ((_prevProps$overlayIma2 = prevProps.overlayImage) === null || _prevProps$overlayIma2 === void 0 ? void 0 : _prevProps$overlayIma2.isStaticBg) != ((_curProps$overlayImag2 = curProps.overlayImage) === null || _curProps$overlayImag2 === void 0 ? void 0 : _curProps$overlayImag2.isStaticBg) || (_curProps$overlayImag3 = curProps.overlayImage) !== null && _curProps$overlayImag3 !== void 0 && _curProps$overlayImag3.isStart) return false;
|
|
3775
3544
|
if (prevProps.renderjob != curProps.renderjob) return false;
|
|
3776
3545
|
if (JSON.stringify(prevProps.elementsInfo) != JSON.stringify(curProps.elementsInfo)) return false;
|
|
3777
3546
|
if (prevProps.inBackground != curProps.inBackground) return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/caching/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/caching/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAI3C,MAAM,CAAC,OAAO;;;;EAwEb"}
|
|
@@ -16,6 +16,7 @@ export declare const unregisterContext: () => void;
|
|
|
16
16
|
export declare const registerContext: (scene: Scene, hqRenderScript: string, apiConfig: ApiConfig, jwt?: string, viewHandler?: ViewHandler, onMissingGeo?: () => void, requestNewOverlayImage?: any, overlayImage?: {
|
|
17
17
|
base64: string;
|
|
18
18
|
isStaticBg: boolean;
|
|
19
|
+
isStart: boolean;
|
|
19
20
|
}, uiConfig?: UIConfig, updateCameraInformation?: (cam: ViewpointCamInfo) => void) => {
|
|
20
21
|
utilStore: UtilStore;
|
|
21
22
|
sceneStore: SceneStore;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,E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C,OAAO,EAAE,gBAAgB,EAAE,MAAM,GAAG,CAAC;AAErC,MAAM,WAAW,OAAO;IACtB,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;CAClB;AAID,eAAO,MAAM,iBAAiB,YAE7B,CAAC;AAEF,eAAO,MAAM,eAAe,UACnB,KAAK,kBACI,MAAM,aACX,SAAS,QACd,MAAM,gBACE,WAAW,iBACV,MAAM,IAAI,2BACA,GAAG,iBACb;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,aAC7D,QAAQ,4BACO,CAAC,GAAG,EAAE,gBAAgB,KAAK,IAAI;;;;;CAW1D,CAAC;AAEF,eAAO,MAAM,iBAAiB,eAE7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,kBAEhC,CAAC;AAEF,eAAO,MAAM,mBAAmB,iBAE/B,CAAC;AAEF,eAAO,MAAM,mBAAmB,iBAE/B,CAAC"}
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import { ElementsInfo } from './types';
|
|
5
5
|
import { ViewpointCamInfo } from '.';
|
|
6
6
|
import { Actions, ApiConfig } from '@crystaldesign/diva-core';
|
|
7
|
-
import { HQS_Transform
|
|
7
|
+
import { HQS_Transform } from './parser/types';
|
|
8
8
|
import { RTVAnalyzeData } from './store/types';
|
|
9
9
|
export * from './parser/types';
|
|
10
10
|
export interface FreePlacesOnGrids {
|
|
@@ -105,15 +105,15 @@ export interface Props {
|
|
|
105
105
|
overlayImage?: {
|
|
106
106
|
base64: string;
|
|
107
107
|
isStaticBg: boolean;
|
|
108
|
+
isStart: boolean;
|
|
108
109
|
};
|
|
109
|
-
|
|
110
|
+
viewpoint?: ViewpointCamInfo;
|
|
110
111
|
isMobile?: boolean;
|
|
111
112
|
elementsInfo?: ElementsInfo[];
|
|
112
113
|
resolution?: {
|
|
113
114
|
x: number;
|
|
114
115
|
y: number;
|
|
115
116
|
};
|
|
116
|
-
viewpoints?: Viewpoint[];
|
|
117
117
|
inBackground?: boolean;
|
|
118
118
|
viewHandler?: ViewHandler;
|
|
119
119
|
freePlacesOnGrids?: FreePlacesOnGrids[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,GAAG,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,GAAG,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAa,MAAM,gBAAgB,CAAC;AAG1D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,cAAc,gBAAgB,CAAC;AAO/B,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG;YAAE,SA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
|
|
|
1
1
|
import { Scene } from '@babylonjs/core/scene';
|
|
2
2
|
import { UniversalCamera } from '@babylonjs/core/Cameras/universalCamera';
|
|
3
|
-
import {
|
|
4
|
-
export default function createCams(scene: Scene,
|
|
3
|
+
import { ViewpointCamInfo } from '../types';
|
|
4
|
+
export default function createCams(scene: Scene, viewpoint?: ViewpointCamInfo): UniversalCamera[];
|
|
5
5
|
export declare function updateCam(camera: ViewpointCamInfo, scene: Scene): void;
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/createCams/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/createCams/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAE1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5C,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,gBAAgB,GAAG,eAAe,EAAE,CAkDhG;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,QAwB/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/parser/index.ts"],"names":[],"mappings":"AAUA,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/parser/index.ts"],"names":[],"mappings":"AAUA,QAAA,MAAM,MAAM,qBAoCX,CAAC;AAEF,eAAe,MAAM,CAAC"}
|