vim-web 0.5.0-dev.8 → 0.5.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.
- package/dist/style.css +34 -7
- package/dist/types/core-viewers/shared/inputAdapter.d.ts +1 -0
- package/dist/types/core-viewers/shared/keyboardHandler.d.ts +1 -1
- package/dist/types/core-viewers/shared/mouseHandler.d.ts +3 -0
- package/dist/types/core-viewers/ultra/rpcClient.d.ts +5 -3
- package/dist/types/core-viewers/ultra/rpcSafeClient.d.ts +12 -1
- package/dist/types/core-viewers/ultra/viewer.d.ts +5 -0
- package/dist/types/core-viewers/ultra/viewport.d.ts +6 -0
- package/dist/types/core-viewers/ultra/vim.d.ts +3 -1
- package/dist/types/core-viewers/webgl/loader/mesh.d.ts +3 -1
- package/dist/types/core-viewers/webgl/loader/progressive/insertableMesh.d.ts +4 -2
- package/dist/types/core-viewers/webgl/loader/progressive/instancedMesh.d.ts +5 -0
- package/dist/types/core-viewers/webgl/loader/vim.d.ts +5 -0
- package/dist/types/core-viewers/webgl/viewer/gizmos/markers/gizmoMarker.d.ts +1 -0
- package/dist/types/core-viewers/webgl/viewer/rendering/renderer.d.ts +7 -0
- package/dist/types/core-viewers/webgl/viewer/viewer.d.ts +5 -0
- package/dist/types/core-viewers/webgl/viewer/viewport.d.ts +1 -1
- package/dist/types/react-viewers/bim/bimPanel.d.ts +3 -3
- package/dist/types/react-viewers/controlbar/controlBarIds.d.ts +32 -36
- package/dist/types/react-viewers/errors/errorStyle.d.ts +1 -1
- package/dist/types/react-viewers/helpers/reactUtils.d.ts +2 -1
- package/dist/types/react-viewers/helpers/utils.d.ts +8 -0
- package/dist/types/react-viewers/panels/axesPanel.d.ts +2 -1
- package/dist/types/react-viewers/panels/index.d.ts +1 -0
- package/dist/types/react-viewers/panels/isolationPanel.d.ts +2 -0
- package/dist/types/react-viewers/panels/messageBox.d.ts +2 -0
- package/dist/types/react-viewers/panels/sidePanel.d.ts +1 -1
- package/dist/types/react-viewers/settings/anySettings.d.ts +7 -0
- package/dist/types/react-viewers/settings/index.d.ts +1 -1
- package/dist/types/react-viewers/settings/settingsInputBox.d.ts +4 -0
- package/dist/types/react-viewers/settings/settingsItem.d.ts +30 -0
- package/dist/types/react-viewers/settings/settingsKeys.d.ts +46 -0
- package/dist/types/react-viewers/settings/settingsPanel.d.ts +5 -4
- package/dist/types/react-viewers/settings/settingsPanelContent.d.ts +6 -0
- package/dist/types/react-viewers/settings/settingsState.d.ts +11 -11
- package/dist/types/react-viewers/settings/settingsStorage.d.ts +3 -3
- package/dist/types/react-viewers/settings/settingsSubtitle.d.ts +2 -0
- package/dist/types/react-viewers/settings/settingsToggle.d.ts +11 -0
- package/dist/types/react-viewers/state/controlBarState.d.ts +41 -7
- package/dist/types/react-viewers/state/sharedIsolation.d.ts +2 -0
- package/dist/types/react-viewers/ultra/controlBar.d.ts +4 -1
- package/dist/types/react-viewers/ultra/index.d.ts +1 -0
- package/dist/types/react-viewers/ultra/settings.d.ts +13 -0
- package/dist/types/react-viewers/ultra/settingsPanel.d.ts +5 -0
- package/dist/types/react-viewers/ultra/viewer.d.ts +3 -1
- package/dist/types/react-viewers/ultra/viewerRef.d.ts +3 -0
- package/dist/types/react-viewers/urls.d.ts +0 -1
- package/dist/types/react-viewers/webgl/index.d.ts +1 -0
- package/dist/types/react-viewers/webgl/loading.d.ts +2 -2
- package/dist/types/react-viewers/webgl/settings.d.ts +36 -0
- package/dist/types/react-viewers/webgl/settingsPanel.d.ts +12 -0
- package/dist/types/react-viewers/webgl/viewer.d.ts +3 -3
- package/dist/types/react-viewers/webgl/viewerRef.d.ts +12 -5
- package/dist/vim-web.iife.js +1449 -765
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +1449 -765
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/react-viewers/settings/settings.d.ts +0 -61
package/dist/vim-web.iife.js
CHANGED
|
@@ -46785,6 +46785,11 @@ void main() {
|
|
|
46785
46785
|
* @param {boolean} isLegacy - Indicates whether the Vim object uses a legacy loading pipeline.
|
|
46786
46786
|
*/
|
|
46787
46787
|
constructor(header, document2, g3d2, scene, settings2, map, builder, source, format) {
|
|
46788
|
+
/**
|
|
46789
|
+
* The type of the viewer, indicating it is a WebGL viewer.
|
|
46790
|
+
* Useful for distinguishing between different viewer types in a multi-viewer application.
|
|
46791
|
+
*/
|
|
46792
|
+
__publicField(this, "type", "webgl");
|
|
46788
46793
|
/**
|
|
46789
46794
|
* Indicates whether the vim was opened from a vim or vimx file.
|
|
46790
46795
|
*/
|
|
@@ -48862,19 +48867,38 @@ void main() {
|
|
|
48862
48867
|
return new InsertableSubmesh(this, index2);
|
|
48863
48868
|
}
|
|
48864
48869
|
/**
|
|
48865
|
-
|
|
48866
|
-
|
|
48870
|
+
* Sets the material for this mesh.
|
|
48871
|
+
* Set to undefined to reset to original materials.
|
|
48872
|
+
*/
|
|
48867
48873
|
setMaterial(value) {
|
|
48868
|
-
if (this._material === value) return;
|
|
48869
48874
|
if (this.ignoreSceneMaterial) return;
|
|
48870
|
-
|
|
48875
|
+
const base = this._material;
|
|
48876
|
+
let mat;
|
|
48877
|
+
if (Array.isArray(value)) {
|
|
48878
|
+
mat = this._mergeMaterials(value, base);
|
|
48879
|
+
} else {
|
|
48880
|
+
mat = value ?? base;
|
|
48881
|
+
}
|
|
48882
|
+
this.mesh.material = mat;
|
|
48871
48883
|
this.mesh.geometry.clearGroups();
|
|
48872
|
-
if (
|
|
48873
|
-
|
|
48884
|
+
if (Array.isArray(mat)) {
|
|
48885
|
+
mat.forEach((_m, i2) => {
|
|
48874
48886
|
this.mesh.geometry.addGroup(0, Infinity, i2);
|
|
48875
48887
|
});
|
|
48876
48888
|
}
|
|
48877
48889
|
}
|
|
48890
|
+
_mergeMaterials(value, base) {
|
|
48891
|
+
const baseArr = Array.isArray(base) ? base : [base];
|
|
48892
|
+
const result = [];
|
|
48893
|
+
for (const v of value) {
|
|
48894
|
+
if (v === void 0) {
|
|
48895
|
+
result.push(...baseArr);
|
|
48896
|
+
} else {
|
|
48897
|
+
result.push(v);
|
|
48898
|
+
}
|
|
48899
|
+
}
|
|
48900
|
+
return result;
|
|
48901
|
+
}
|
|
48878
48902
|
}
|
|
48879
48903
|
class InstancedSubmesh {
|
|
48880
48904
|
constructor(mesh, index2) {
|
|
@@ -48961,17 +48985,39 @@ void main() {
|
|
|
48961
48985
|
}
|
|
48962
48986
|
return submeshes;
|
|
48963
48987
|
}
|
|
48988
|
+
/**
|
|
48989
|
+
* Sets the material for this mesh.
|
|
48990
|
+
* Set to undefined to reset to original materials.
|
|
48991
|
+
*/
|
|
48964
48992
|
setMaterial(value) {
|
|
48965
|
-
if (this._material === value) return;
|
|
48966
48993
|
if (this.ignoreSceneMaterial) return;
|
|
48967
|
-
|
|
48994
|
+
const base = this._material;
|
|
48995
|
+
let mat;
|
|
48996
|
+
if (Array.isArray(value)) {
|
|
48997
|
+
mat = this._mergeMaterials(value, base);
|
|
48998
|
+
} else {
|
|
48999
|
+
mat = value ?? base;
|
|
49000
|
+
}
|
|
49001
|
+
this.mesh.material = mat;
|
|
48968
49002
|
this.mesh.geometry.clearGroups();
|
|
48969
|
-
if (
|
|
48970
|
-
|
|
49003
|
+
if (Array.isArray(mat)) {
|
|
49004
|
+
mat.forEach((_m, i2) => {
|
|
48971
49005
|
this.mesh.geometry.addGroup(0, Infinity, i2);
|
|
48972
49006
|
});
|
|
48973
49007
|
}
|
|
48974
49008
|
}
|
|
49009
|
+
_mergeMaterials(value, base) {
|
|
49010
|
+
const baseArr = Array.isArray(base) ? base : [base];
|
|
49011
|
+
const result = [];
|
|
49012
|
+
for (const v of value) {
|
|
49013
|
+
if (v === void 0) {
|
|
49014
|
+
result.push(...baseArr);
|
|
49015
|
+
} else {
|
|
49016
|
+
result.push(v);
|
|
49017
|
+
}
|
|
49018
|
+
}
|
|
49019
|
+
return result;
|
|
49020
|
+
}
|
|
48975
49021
|
computeBoundingBoxes() {
|
|
48976
49022
|
this.mesh.geometry.computeBoundingBox();
|
|
48977
49023
|
const boxes = new Array(this.mesh.count);
|
|
@@ -50111,6 +50157,9 @@ void main() {
|
|
|
50111
50157
|
get index() {
|
|
50112
50158
|
return this._submesh.index;
|
|
50113
50159
|
}
|
|
50160
|
+
get isRoom() {
|
|
50161
|
+
return false;
|
|
50162
|
+
}
|
|
50114
50163
|
/**
|
|
50115
50164
|
* Updates the underlying submesh and rebinds all attributes to the new mesh.
|
|
50116
50165
|
* @param mesh - The new submesh to bind to this marker.
|
|
@@ -52597,7 +52646,11 @@ void main() {
|
|
|
52597
52646
|
* @param handler Callback invoked on key up.
|
|
52598
52647
|
*/
|
|
52599
52648
|
registerKeyUp(code, mode, handler) {
|
|
52600
|
-
|
|
52649
|
+
if (Array.isArray(code)) {
|
|
52650
|
+
code.forEach((c) => this.registerKey(this.keyUpHandlers, c, mode, handler));
|
|
52651
|
+
} else {
|
|
52652
|
+
this.registerKey(this.keyUpHandlers, code, mode, handler);
|
|
52653
|
+
}
|
|
52601
52654
|
}
|
|
52602
52655
|
registerKey(map, code, mode, callback) {
|
|
52603
52656
|
mode = map.has(code) ? mode : "replace";
|
|
@@ -52635,6 +52688,7 @@ void main() {
|
|
|
52635
52688
|
__publicField(this, "_capture");
|
|
52636
52689
|
__publicField(this, "_dragHandler");
|
|
52637
52690
|
__publicField(this, "_doubleClickHandler", new DoubleClickHandler());
|
|
52691
|
+
__publicField(this, "_clickHandler", new ClickHandler());
|
|
52638
52692
|
__publicField(this, "onButtonDown");
|
|
52639
52693
|
__publicField(this, "onButtonUp");
|
|
52640
52694
|
__publicField(this, "onMouseMove");
|
|
@@ -52643,6 +52697,7 @@ void main() {
|
|
|
52643
52697
|
__publicField(this, "onClick");
|
|
52644
52698
|
__publicField(this, "onDoubleClick");
|
|
52645
52699
|
__publicField(this, "onWheel");
|
|
52700
|
+
__publicField(this, "onContextMenu");
|
|
52646
52701
|
this._capture = new CaptureHandler(canvas);
|
|
52647
52702
|
this._dragHandler = new DragHandler((delta, button) => this.onDrag(delta, button));
|
|
52648
52703
|
}
|
|
@@ -52670,22 +52725,28 @@ void main() {
|
|
|
52670
52725
|
(_a3 = this.onButtonDown) == null ? void 0 : _a3.call(this, pos, event.button);
|
|
52671
52726
|
this._lastMouseDownPosition = pos;
|
|
52672
52727
|
this._dragHandler.onPointerDown(pos, event.button);
|
|
52728
|
+
this._clickHandler.onPointerDown(pos);
|
|
52673
52729
|
this._capture.onPointerDown(event);
|
|
52674
52730
|
event.preventDefault();
|
|
52675
52731
|
}
|
|
52676
52732
|
handlePointerUp(event) {
|
|
52677
52733
|
var _a3;
|
|
52678
52734
|
if (event.pointerType !== "mouse") return;
|
|
52735
|
+
event.preventDefault();
|
|
52679
52736
|
const pos = this.relativePosition(event);
|
|
52680
52737
|
(_a3 = this.onButtonUp) == null ? void 0 : _a3.call(this, pos, event.button);
|
|
52681
52738
|
this._capture.onPointerUp(event);
|
|
52682
52739
|
this._dragHandler.onPointerUp();
|
|
52683
|
-
|
|
52740
|
+
this._clickHandler.onPointerUp();
|
|
52741
|
+
if (this._doubleClickHandler.isDoubleClick(event)) {
|
|
52684
52742
|
this.handleDoubleClick(event);
|
|
52685
|
-
|
|
52743
|
+
return;
|
|
52744
|
+
}
|
|
52745
|
+
if (this._clickHandler.isClick(event)) {
|
|
52686
52746
|
this.handleMouseClick(event);
|
|
52747
|
+
return;
|
|
52687
52748
|
}
|
|
52688
|
-
|
|
52749
|
+
this.handleContextMenu(event);
|
|
52689
52750
|
}
|
|
52690
52751
|
async handleMouseClick(event) {
|
|
52691
52752
|
var _a3;
|
|
@@ -52698,12 +52759,23 @@ void main() {
|
|
|
52698
52759
|
const modif = event.getModifierState("Shift") || event.getModifierState("Control");
|
|
52699
52760
|
(_a3 = this.onClick) == null ? void 0 : _a3.call(this, pos, modif);
|
|
52700
52761
|
}
|
|
52762
|
+
async handleContextMenu(event) {
|
|
52763
|
+
var _a3;
|
|
52764
|
+
if (event.pointerType !== "mouse") return;
|
|
52765
|
+
if (event.button !== 2) return;
|
|
52766
|
+
const pos = this.relativePosition(event);
|
|
52767
|
+
if (!almostEqual(this._lastMouseDownPosition, pos, 0.01)) {
|
|
52768
|
+
return;
|
|
52769
|
+
}
|
|
52770
|
+
(_a3 = this.onContextMenu) == null ? void 0 : _a3.call(this, new Vector2(event.clientX, event.clientY));
|
|
52771
|
+
}
|
|
52701
52772
|
handlePointerMove(event) {
|
|
52702
52773
|
var _a3;
|
|
52703
52774
|
if (event.pointerType !== "mouse") return;
|
|
52704
52775
|
this._canvas.focus();
|
|
52705
52776
|
const pos = this.relativePosition(event);
|
|
52706
52777
|
this._dragHandler.onPointerMove(pos);
|
|
52778
|
+
this._clickHandler.onPointerMove(pos);
|
|
52707
52779
|
(_a3 = this.onMouseMove) == null ? void 0 : _a3.call(this, pos);
|
|
52708
52780
|
}
|
|
52709
52781
|
async handleDoubleClick(event) {
|
|
@@ -52747,17 +52819,46 @@ void main() {
|
|
|
52747
52819
|
}
|
|
52748
52820
|
}
|
|
52749
52821
|
}
|
|
52822
|
+
class ClickHandler {
|
|
52823
|
+
constructor() {
|
|
52824
|
+
__publicField(this, "_moved", false);
|
|
52825
|
+
__publicField(this, "_startPosition", new Vector2());
|
|
52826
|
+
__publicField(this, "_clickThreshold", 3e-3);
|
|
52827
|
+
}
|
|
52828
|
+
onPointerDown(pos) {
|
|
52829
|
+
this._moved = false;
|
|
52830
|
+
this._startPosition.copy(pos);
|
|
52831
|
+
}
|
|
52832
|
+
onPointerMove(pos) {
|
|
52833
|
+
if (pos.distanceTo(this._startPosition) > this._clickThreshold) {
|
|
52834
|
+
this._moved = true;
|
|
52835
|
+
}
|
|
52836
|
+
}
|
|
52837
|
+
onPointerUp() {
|
|
52838
|
+
}
|
|
52839
|
+
isClick(event) {
|
|
52840
|
+
if (event.button !== 0) return false;
|
|
52841
|
+
return !this._moved;
|
|
52842
|
+
}
|
|
52843
|
+
}
|
|
52750
52844
|
class DoubleClickHandler {
|
|
52751
52845
|
constructor() {
|
|
52752
52846
|
__publicField(this, "_lastClickTime", 0);
|
|
52753
52847
|
__publicField(this, "_clickDelay", 300);
|
|
52848
|
+
// Max time between clicks for double-click
|
|
52849
|
+
__publicField(this, "_lastClickPosition", null);
|
|
52850
|
+
__publicField(this, "_positionThreshold", 5);
|
|
52754
52851
|
}
|
|
52755
|
-
//
|
|
52756
|
-
|
|
52852
|
+
// Max pixel distance between clicks
|
|
52853
|
+
isDoubleClick(event) {
|
|
52757
52854
|
const currentTime = Date.now();
|
|
52855
|
+
const currentPosition = new Vector2(event.clientX, event.clientY);
|
|
52758
52856
|
const timeDiff = currentTime - this._lastClickTime;
|
|
52857
|
+
const isClose = this._lastClickPosition !== null && this._lastClickPosition.distanceTo(currentPosition) < this._positionThreshold;
|
|
52858
|
+
const isWithinTime = timeDiff < this._clickDelay;
|
|
52759
52859
|
this._lastClickTime = currentTime;
|
|
52760
|
-
|
|
52860
|
+
this._lastClickPosition = currentPosition;
|
|
52861
|
+
return isClose && isWithinTime;
|
|
52761
52862
|
}
|
|
52762
52863
|
}
|
|
52763
52864
|
class DragHandler {
|
|
@@ -52997,23 +53098,15 @@ void main() {
|
|
|
52997
53098
|
this._moveSpeed = settings2.moveSpeed ?? 1;
|
|
52998
53099
|
this.rotateSpeed = settings2.rotateSpeed ?? 1;
|
|
52999
53100
|
this.orbitSpeed = settings2.orbitSpeed ?? 1;
|
|
53000
|
-
this.reg(document, "contextmenu", (e) => {
|
|
53001
|
-
this._onContextMenu.dispatch(new Vector2(e.clientX, e.clientY));
|
|
53002
|
-
e.preventDefault();
|
|
53003
|
-
});
|
|
53004
53101
|
this.keyboard = new KeyboardHandler(canvas);
|
|
53005
53102
|
this.mouse = new MouseHandler(canvas);
|
|
53006
53103
|
this.touch = new TouchHandler(canvas);
|
|
53007
53104
|
this.keyboard.onKeyDown = (key) => adapter.keyDown(key);
|
|
53008
53105
|
this.keyboard.onKeyUp = (key) => adapter.keyUp(key);
|
|
53009
53106
|
this.keyboard.registerKeyUp("KeyP", "replace", () => adapter.toggleOrthographic());
|
|
53010
|
-
this.keyboard.registerKeyUp("Equal", "replace", () => this.moveSpeed++);
|
|
53011
|
-
this.keyboard.registerKeyUp("Minus", "replace", () => this.moveSpeed--);
|
|
53012
|
-
this.keyboard.registerKeyUp("Space", "replace", () =>
|
|
53013
|
-
this._pointerActive = this._pointerActive === "orbit" ? "look" : "orbit";
|
|
53014
|
-
this._pointerFallback = this._pointerActive;
|
|
53015
|
-
this._onPointerModeChanged.dispatch();
|
|
53016
|
-
});
|
|
53107
|
+
this.keyboard.registerKeyUp(["Equal", "NumpadAdd"], "replace", () => this.moveSpeed++);
|
|
53108
|
+
this.keyboard.registerKeyUp(["Minus", "NumpadSubtract"], "replace", () => this.moveSpeed--);
|
|
53109
|
+
this.keyboard.registerKeyUp("Space", "replace", () => adapter.toggleCameraOrbitMode());
|
|
53017
53110
|
this.keyboard.registerKeyUp("Home", "replace", () => adapter.resetCamera());
|
|
53018
53111
|
this.keyboard.registerKeyUp("Escape", "replace", () => adapter.clearSelection());
|
|
53019
53112
|
this.keyboard.registerKeyUp("KeyF", "replace", () => {
|
|
@@ -53023,18 +53116,28 @@ void main() {
|
|
|
53023
53116
|
const mul = Math.pow(1.25, this._moveSpeed);
|
|
53024
53117
|
adapter.moveCamera(value.multiplyScalar(mul));
|
|
53025
53118
|
};
|
|
53119
|
+
this.mouse.onContextMenu = (pos) => this._onContextMenu.dispatch(pos);
|
|
53026
53120
|
this.mouse.onButtonDown = adapter.mouseDown;
|
|
53027
53121
|
this.mouse.onMouseMove = adapter.mouseMove;
|
|
53028
|
-
this.mouse.onButtonUp =
|
|
53122
|
+
this.mouse.onButtonUp = (pos, button) => {
|
|
53123
|
+
this.pointerOverride = void 0;
|
|
53124
|
+
adapter.mouseUp(pos, button);
|
|
53125
|
+
};
|
|
53029
53126
|
this.mouse.onDrag = (delta, button) => {
|
|
53030
53127
|
if (button === 0) {
|
|
53031
|
-
if (this.
|
|
53032
|
-
if (this.
|
|
53033
|
-
if (this.
|
|
53034
|
-
if (this.
|
|
53128
|
+
if (this.pointerActive === "orbit") adapter.orbitCamera(toRotation(delta, this.orbitSpeed));
|
|
53129
|
+
if (this.pointerActive === "look") adapter.rotateCamera(toRotation(delta, this.rotateSpeed));
|
|
53130
|
+
if (this.pointerActive === "pan") adapter.panCamera(delta);
|
|
53131
|
+
if (this.pointerActive === "zoom") adapter.dollyCamera(delta);
|
|
53132
|
+
}
|
|
53133
|
+
if (button === 2) {
|
|
53134
|
+
this.pointerOverride = "look";
|
|
53135
|
+
adapter.rotateCamera(toRotation(delta, 1));
|
|
53136
|
+
}
|
|
53137
|
+
if (button === 1) {
|
|
53138
|
+
this.pointerOverride = "pan";
|
|
53139
|
+
adapter.panCamera(delta);
|
|
53035
53140
|
}
|
|
53036
|
-
if (button === 2) adapter.rotateCamera(toRotation(delta, 1));
|
|
53037
|
-
if (button === 1) adapter.panCamera(delta);
|
|
53038
53141
|
};
|
|
53039
53142
|
this.mouse.onClick = (pos, modif) => adapter.selectAtPointer(pos, modif);
|
|
53040
53143
|
this.mouse.onDoubleClick = adapter.frameAtPointer;
|
|
@@ -55332,7 +55435,7 @@ void main() {
|
|
|
55332
55435
|
}
|
|
55333
55436
|
unparent2dObjects(target) {
|
|
55334
55437
|
if (target instanceof Group) {
|
|
55335
|
-
for (const child of target.children) {
|
|
55438
|
+
for (const child of [...target.children]) {
|
|
55336
55439
|
if (child instanceof CSS2DObject) {
|
|
55337
55440
|
target.remove(child);
|
|
55338
55441
|
}
|
|
@@ -55507,6 +55610,7 @@ void main() {
|
|
|
55507
55610
|
}
|
|
55508
55611
|
add(objectOrObjects) {
|
|
55509
55612
|
if (!this.enabled) return;
|
|
55613
|
+
if (!objectOrObjects) return;
|
|
55510
55614
|
const objects = this.toArray(objectOrObjects);
|
|
55511
55615
|
let changed = false;
|
|
55512
55616
|
for (const obj of objects) {
|
|
@@ -55857,7 +55961,7 @@ void main() {
|
|
|
55857
55961
|
/**
|
|
55858
55962
|
* Resizes the canvas and updates the camera to match new parent dimensions.
|
|
55859
55963
|
*/
|
|
55860
|
-
|
|
55964
|
+
resizeToParent() {
|
|
55861
55965
|
this._onResize.dispatch();
|
|
55862
55966
|
}
|
|
55863
55967
|
/**
|
|
@@ -55911,6 +56015,9 @@ void main() {
|
|
|
55911
56015
|
toggleOrthographic: () => {
|
|
55912
56016
|
viewer.camera.orthographic = !viewer.camera.orthographic;
|
|
55913
56017
|
},
|
|
56018
|
+
toggleCameraOrbitMode: () => {
|
|
56019
|
+
viewer.inputs.pointerActive = viewer.inputs.pointerActive === PointerMode$1.ORBIT ? PointerMode$1.LOOK : PointerMode$1.ORBIT;
|
|
56020
|
+
},
|
|
55914
56021
|
resetCamera: () => {
|
|
55915
56022
|
viewer.camera.lerp(0.75).reset();
|
|
55916
56023
|
},
|
|
@@ -55935,7 +56042,7 @@ void main() {
|
|
|
55935
56042
|
},
|
|
55936
56043
|
frameAtPointer: async (pos) => {
|
|
55937
56044
|
const result = await viewer.raycaster.raycastFromScreen(pos);
|
|
55938
|
-
viewer.camera.lerp(0.75).frame(result.object);
|
|
56045
|
+
viewer.camera.lerp(0.75).frame(result.object ?? "all");
|
|
55939
56046
|
},
|
|
55940
56047
|
zoom: (value) => {
|
|
55941
56048
|
viewer.camera.lerp(0.75).zoom(value);
|
|
@@ -56946,6 +57053,10 @@ void main() {
|
|
|
56946
57053
|
* Indicates whether the scene should be re-rendered on change only.
|
|
56947
57054
|
*/
|
|
56948
57055
|
__publicField(this, "onDemand");
|
|
57056
|
+
/**
|
|
57057
|
+
* The material that will be used when setting model material to undefined.
|
|
57058
|
+
*/
|
|
57059
|
+
__publicField(this, "defaultModelMaterial");
|
|
56949
57060
|
__publicField(this, "fitViewport", () => {
|
|
56950
57061
|
const size = this._viewport.getParentSize();
|
|
56951
57062
|
this.renderer.setPixelRatio(window.devicePixelRatio);
|
|
@@ -57017,11 +57128,14 @@ void main() {
|
|
|
57017
57128
|
this._scene.threeScene.background = color;
|
|
57018
57129
|
this.needsUpdate = true;
|
|
57019
57130
|
}
|
|
57131
|
+
/**
|
|
57132
|
+
* Sets the material used to render models. If set to undefined, the default model or mesh material is used.
|
|
57133
|
+
*/
|
|
57020
57134
|
get modelMaterial() {
|
|
57021
57135
|
return this._scene.modelMaterial;
|
|
57022
57136
|
}
|
|
57023
57137
|
set modelMaterial(material) {
|
|
57024
|
-
this._scene.modelMaterial = material;
|
|
57138
|
+
this._scene.modelMaterial = material ?? this.defaultModelMaterial;
|
|
57025
57139
|
}
|
|
57026
57140
|
/**
|
|
57027
57141
|
* Signal dispatched at the end of each frame if the scene was updated, such as visibility changes.
|
|
@@ -57157,6 +57271,11 @@ void main() {
|
|
|
57157
57271
|
};
|
|
57158
57272
|
let Viewer$3 = class Viewer {
|
|
57159
57273
|
constructor(settings2) {
|
|
57274
|
+
/**
|
|
57275
|
+
* The type of the viewer, indicating it is a WebGL viewer.
|
|
57276
|
+
* Useful for distinguishing between different viewer types in a multi-viewer application.
|
|
57277
|
+
*/
|
|
57278
|
+
__publicField(this, "type", "webgl");
|
|
57160
57279
|
/**
|
|
57161
57280
|
* The settings configuration used by the viewer.
|
|
57162
57281
|
*/
|
|
@@ -57943,9 +58062,22 @@ void main() {
|
|
|
57943
58062
|
get url() {
|
|
57944
58063
|
return this._socket.url;
|
|
57945
58064
|
}
|
|
57946
|
-
|
|
58065
|
+
RPCClearMaterialOverridesForElements(vimIndex, elementIndices) {
|
|
58066
|
+
const marshal = new Marshal();
|
|
58067
|
+
marshal.writeString("RPCClearMaterialOverridesForElements");
|
|
58068
|
+
marshal.writeUInt(vimIndex);
|
|
58069
|
+
marshal.writeArrayOfUInt(elementIndices);
|
|
58070
|
+
this._socket.sendRPC(marshal);
|
|
58071
|
+
}
|
|
58072
|
+
RPCClearMaterialOverridesForScene() {
|
|
58073
|
+
const marshal = new Marshal();
|
|
58074
|
+
marshal.writeString("RPCClearMaterialOverridesForScene");
|
|
58075
|
+
this._socket.sendRPC(marshal);
|
|
58076
|
+
}
|
|
58077
|
+
RPCClearMaterialOverridesForVim(vimIndex) {
|
|
57947
58078
|
const marshal = new Marshal();
|
|
57948
|
-
marshal.writeString("
|
|
58079
|
+
marshal.writeString("RPCClearMaterialOverridesForVim");
|
|
58080
|
+
marshal.writeUInt(vimIndex);
|
|
57949
58081
|
this._socket.sendRPC(marshal);
|
|
57950
58082
|
}
|
|
57951
58083
|
async RPCCreateMaterialInstances(materialHandle, smoothness, colors) {
|
|
@@ -58053,9 +58185,9 @@ void main() {
|
|
|
58053
58185
|
const ret = returnMarshal.readString();
|
|
58054
58186
|
return ret;
|
|
58055
58187
|
}
|
|
58056
|
-
async
|
|
58188
|
+
async RPCGetCameraPose() {
|
|
58057
58189
|
const marshal = new Marshal();
|
|
58058
|
-
marshal.writeString("
|
|
58190
|
+
marshal.writeString("RPCGetCameraPose");
|
|
58059
58191
|
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
58060
58192
|
const ret = returnMarshal.readSegment();
|
|
58061
58193
|
return ret;
|
|
@@ -58198,6 +58330,13 @@ void main() {
|
|
|
58198
58330
|
marshal.writeBoolean(orbit2);
|
|
58199
58331
|
this._socket.sendRPC(marshal);
|
|
58200
58332
|
}
|
|
58333
|
+
RPCSetCameraPose(state, blendTime) {
|
|
58334
|
+
const marshal = new Marshal();
|
|
58335
|
+
marshal.writeString("RPCSetCameraPose");
|
|
58336
|
+
marshal.writeSegment(state);
|
|
58337
|
+
marshal.writeFloat(blendTime);
|
|
58338
|
+
this._socket.sendRPC(marshal);
|
|
58339
|
+
}
|
|
58201
58340
|
RPCSetCameraPosition(position, blendTime) {
|
|
58202
58341
|
const marshal = new Marshal();
|
|
58203
58342
|
marshal.writeString("RPCSetCameraPosition");
|
|
@@ -58218,13 +58357,6 @@ void main() {
|
|
|
58218
58357
|
marshal.writeFloat(blendTime);
|
|
58219
58358
|
this._socket.sendRPC(marshal);
|
|
58220
58359
|
}
|
|
58221
|
-
RPCSetCameraView(state, blendTime) {
|
|
58222
|
-
const marshal = new Marshal();
|
|
58223
|
-
marshal.writeString("RPCSetCameraView");
|
|
58224
|
-
marshal.writeSegment(state);
|
|
58225
|
-
marshal.writeFloat(blendTime);
|
|
58226
|
-
this._socket.sendRPC(marshal);
|
|
58227
|
-
}
|
|
58228
58360
|
RPCSetGhostColor(ghostColor) {
|
|
58229
58361
|
const marshal = new Marshal();
|
|
58230
58362
|
marshal.writeString("RPCSetGhostColor");
|
|
@@ -58821,6 +58953,7 @@ void main() {
|
|
|
58821
58953
|
}
|
|
58822
58954
|
}
|
|
58823
58955
|
const CODE_TO_KEYCODE = {
|
|
58956
|
+
"Space": 32,
|
|
58824
58957
|
"ArrowUp": 38,
|
|
58825
58958
|
"ArrowDown": 40,
|
|
58826
58959
|
"ArrowLeft": 37,
|
|
@@ -58841,7 +58974,6 @@ void main() {
|
|
|
58841
58974
|
function createAdapter$1(viewer) {
|
|
58842
58975
|
return {
|
|
58843
58976
|
init: () => {
|
|
58844
|
-
viewer.rpc.RPCSetCameraSpeed(10);
|
|
58845
58977
|
},
|
|
58846
58978
|
orbitCamera: (value) => {
|
|
58847
58979
|
},
|
|
@@ -58854,6 +58986,9 @@ void main() {
|
|
|
58854
58986
|
toggleOrthographic: () => {
|
|
58855
58987
|
console.log("toggleOrthographic. Not supported yet");
|
|
58856
58988
|
},
|
|
58989
|
+
toggleCameraOrbitMode: () => {
|
|
58990
|
+
viewer.rpc.RPCKeyEvent(CODE_TO_KEYCODE["Space"], true);
|
|
58991
|
+
},
|
|
58857
58992
|
resetCamera: () => {
|
|
58858
58993
|
viewer.camera.restoreSavedPosition();
|
|
58859
58994
|
},
|
|
@@ -59294,7 +59429,7 @@ void main() {
|
|
|
59294
59429
|
*/
|
|
59295
59430
|
async RPCGetCameraView() {
|
|
59296
59431
|
return await this.safeCall(
|
|
59297
|
-
() => this.rpc.
|
|
59432
|
+
() => this.rpc.RPCGetCameraPose(),
|
|
59298
59433
|
void 0
|
|
59299
59434
|
);
|
|
59300
59435
|
}
|
|
@@ -59306,7 +59441,7 @@ void main() {
|
|
|
59306
59441
|
RPCSetCameraView(segment, blendTime) {
|
|
59307
59442
|
if (!Validation.isValidSegment(segment)) return;
|
|
59308
59443
|
blendTime = Validation.clamp01(blendTime);
|
|
59309
|
-
this.rpc.
|
|
59444
|
+
this.rpc.RPCSetCameraPose(segment, blendTime);
|
|
59310
59445
|
}
|
|
59311
59446
|
/**
|
|
59312
59447
|
* Sets the camera's position without changing its target.
|
|
@@ -59688,8 +59823,23 @@ void main() {
|
|
|
59688
59823
|
/**
|
|
59689
59824
|
* Clears all material overrides for the entire scene.
|
|
59690
59825
|
*/
|
|
59691
|
-
|
|
59692
|
-
this.rpc.
|
|
59826
|
+
RPCClearMaterialOverridesForScene() {
|
|
59827
|
+
this.rpc.RPCClearMaterialOverridesForScene();
|
|
59828
|
+
}
|
|
59829
|
+
/**
|
|
59830
|
+
* Clears all material overrides for a specific loaded vim.
|
|
59831
|
+
* @param vimIndex - The index of the loaded vim
|
|
59832
|
+
*/
|
|
59833
|
+
RPCClearMaterialOverridesForVim(vimIndex) {
|
|
59834
|
+
this.rpc.RPCClearMaterialOverridesForVim(vimIndex);
|
|
59835
|
+
}
|
|
59836
|
+
/**
|
|
59837
|
+
* Clears all material overrides for specific elements in a loaded vim.
|
|
59838
|
+
* @param vimIndex - The index of the loaded vim
|
|
59839
|
+
* @param vimElementIndices - Array of vim-based element indices to clear overrides for
|
|
59840
|
+
*/
|
|
59841
|
+
RPCClearMaterialOverridesForElements(vimIndex, vimElementIndices) {
|
|
59842
|
+
this.rpc.RPCClearMaterialOverridesForElements(vimIndex, vimElementIndices);
|
|
59693
59843
|
}
|
|
59694
59844
|
/*******************************************************************************
|
|
59695
59845
|
* DEBUG AND UTILITY METHODS
|
|
@@ -60807,6 +60957,12 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
60807
60957
|
this._rpc.RPCSetCameraAspectRatio(this.canvas.offsetWidth, this.canvas.offsetHeight);
|
|
60808
60958
|
}
|
|
60809
60959
|
}
|
|
60960
|
+
/**
|
|
60961
|
+
* Resizes the viewport to match its parent's dimensions
|
|
60962
|
+
*/
|
|
60963
|
+
resizeToParent() {
|
|
60964
|
+
this.update();
|
|
60965
|
+
}
|
|
60810
60966
|
/**
|
|
60811
60967
|
* Cleans up resources by removing resize observer and clearing timeouts
|
|
60812
60968
|
*/
|
|
@@ -60865,11 +61021,12 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
60865
61021
|
* @returns A promise resolving to the element's bounding box.
|
|
60866
61022
|
*/
|
|
60867
61023
|
async getBoundingBox() {
|
|
60868
|
-
return this.vim.
|
|
61024
|
+
return this.vim.getBoundingBoxForElements([this.element]);
|
|
60869
61025
|
}
|
|
60870
61026
|
}
|
|
60871
61027
|
class Vim {
|
|
60872
61028
|
constructor(rpc, color, renderer, source, logger) {
|
|
61029
|
+
__publicField(this, "type", "ultra");
|
|
60873
61030
|
__publicField(this, "source");
|
|
60874
61031
|
__publicField(this, "_handle", -1);
|
|
60875
61032
|
__publicField(this, "_request");
|
|
@@ -60883,6 +61040,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
60883
61040
|
// Color tracking remains unchanged.
|
|
60884
61041
|
__publicField(this, "_elementColors", /* @__PURE__ */ new Map());
|
|
60885
61042
|
__publicField(this, "_updatedColors", /* @__PURE__ */ new Set());
|
|
61043
|
+
__publicField(this, "_removedColors", /* @__PURE__ */ new Set());
|
|
60886
61044
|
// Delayed update flag.
|
|
60887
61045
|
__publicField(this, "_updateScheduled", false);
|
|
60888
61046
|
__publicField(this, "_elementCount", 0);
|
|
@@ -61020,14 +61178,14 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61020
61178
|
}
|
|
61021
61179
|
return handle;
|
|
61022
61180
|
}
|
|
61023
|
-
async
|
|
61024
|
-
if (!this.connected ||
|
|
61181
|
+
async getBoundingBoxForElements(elements) {
|
|
61182
|
+
if (!this.connected || elements !== "all" && elements.length === 0) {
|
|
61025
61183
|
return Promise.resolve(void 0);
|
|
61026
61184
|
}
|
|
61027
|
-
if (
|
|
61185
|
+
if (elements === "all") {
|
|
61028
61186
|
return await this._rpc.RPCGetAABBForVim(this._handle);
|
|
61029
61187
|
}
|
|
61030
|
-
return await this._rpc.RPCGetAABBForElements(this._handle,
|
|
61188
|
+
return await this._rpc.RPCGetAABBForElements(this._handle, elements);
|
|
61031
61189
|
}
|
|
61032
61190
|
async getBoundingBox() {
|
|
61033
61191
|
if (!this.connected) {
|
|
@@ -61048,19 +61206,22 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61048
61206
|
}
|
|
61049
61207
|
this.applyColor(elements, color);
|
|
61050
61208
|
}
|
|
61051
|
-
applyColor(elements,
|
|
61052
|
-
for (let i2 = 0; i2 <
|
|
61053
|
-
const
|
|
61209
|
+
applyColor(elements, colors) {
|
|
61210
|
+
for (let i2 = 0; i2 < colors.length; i2++) {
|
|
61211
|
+
const color = colors[i2];
|
|
61054
61212
|
const element = elements[i2];
|
|
61055
|
-
|
|
61213
|
+
const existingColor = this._elementColors.get(element);
|
|
61214
|
+
if (color === void 0 && existingColor !== void 0) {
|
|
61056
61215
|
this._elementColors.delete(element);
|
|
61057
|
-
|
|
61058
|
-
|
|
61216
|
+
this._removedColors.add(element);
|
|
61217
|
+
} else if (color !== existingColor) {
|
|
61218
|
+
this._elementColors.set(element, color);
|
|
61219
|
+
this._updatedColors.add(element);
|
|
61059
61220
|
}
|
|
61060
|
-
this._updatedColors.add(element);
|
|
61061
61221
|
}
|
|
61062
61222
|
this.scheduleColorUpdate();
|
|
61063
61223
|
}
|
|
61224
|
+
//TODO: Remove and rely on element.color
|
|
61064
61225
|
clearColor(elements) {
|
|
61065
61226
|
if (elements === "all") {
|
|
61066
61227
|
this._elementColors.clear();
|
|
@@ -61069,14 +61230,14 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61069
61230
|
}
|
|
61070
61231
|
if (!this.connected) return;
|
|
61071
61232
|
if (elements === "all") {
|
|
61072
|
-
this._rpc.
|
|
61233
|
+
this._rpc.RPCClearMaterialOverridesForVim(this._handle);
|
|
61073
61234
|
} else {
|
|
61074
|
-
|
|
61075
|
-
this._rpc.RPCSetMaterialOverridesForElements(this._handle, elements, ids);
|
|
61235
|
+
this._rpc.RPCClearMaterialOverridesForElements(this._handle, elements);
|
|
61076
61236
|
}
|
|
61077
61237
|
}
|
|
61078
61238
|
reapplyColors() {
|
|
61079
61239
|
this._updatedColors.clear();
|
|
61240
|
+
this._removedColors.clear();
|
|
61080
61241
|
this._elementColors.forEach((c, n) => this._updatedColors.add(n));
|
|
61081
61242
|
this.scheduleColorUpdate();
|
|
61082
61243
|
}
|
|
@@ -61093,12 +61254,15 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61093
61254
|
this._renderer.notifySceneUpdated();
|
|
61094
61255
|
}
|
|
61095
61256
|
async updateRemoteColors() {
|
|
61096
|
-
const
|
|
61097
|
-
const
|
|
61257
|
+
const updatedElement = Array.from(this._updatedColors);
|
|
61258
|
+
const removedElement = Array.from(this._removedColors);
|
|
61259
|
+
const colors = updatedElement.map((n) => this._elementColors.get(n));
|
|
61098
61260
|
const remoteColors = await this._colors.getColors(colors);
|
|
61099
61261
|
const colorIds = remoteColors.map((c) => (c == null ? void 0 : c.id) ?? -1);
|
|
61100
|
-
this._rpc.
|
|
61262
|
+
this._rpc.RPCClearMaterialOverridesForElements(this._handle, removedElement);
|
|
61263
|
+
this._rpc.RPCSetMaterialOverridesForElements(this._handle, updatedElement, colorIds);
|
|
61101
61264
|
this._updatedColors.clear();
|
|
61265
|
+
this._removedColors.clear();
|
|
61102
61266
|
}
|
|
61103
61267
|
}
|
|
61104
61268
|
function wait(ms) {
|
|
@@ -61175,6 +61339,11 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61175
61339
|
* @param logger - Optional logger for logging messages.
|
|
61176
61340
|
*/
|
|
61177
61341
|
constructor(canvas, logger) {
|
|
61342
|
+
/**
|
|
61343
|
+
* The type of the viewer, indicating it is a WebGL viewer.
|
|
61344
|
+
* Useful for distinguishing between different viewer types in a multi-viewer application.
|
|
61345
|
+
*/
|
|
61346
|
+
__publicField(this, "type", "ultra");
|
|
61178
61347
|
__publicField(this, "_decoder");
|
|
61179
61348
|
__publicField(this, "_socketClient");
|
|
61180
61349
|
__publicField(this, "_input");
|
|
@@ -61435,80 +61604,72 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61435
61604
|
Ultra: index$7,
|
|
61436
61605
|
Webgl: index$8
|
|
61437
61606
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
61438
|
-
const
|
|
61439
|
-
const
|
|
61440
|
-
const
|
|
61441
|
-
const
|
|
61442
|
-
const
|
|
61443
|
-
const
|
|
61444
|
-
const
|
|
61445
|
-
const
|
|
61446
|
-
const
|
|
61447
|
-
const
|
|
61448
|
-
const
|
|
61449
|
-
const
|
|
61450
|
-
const
|
|
61451
|
-
const
|
|
61452
|
-
const
|
|
61453
|
-
const
|
|
61454
|
-
const
|
|
61455
|
-
const
|
|
61456
|
-
const
|
|
61457
|
-
const
|
|
61458
|
-
const
|
|
61459
|
-
const
|
|
61460
|
-
const
|
|
61461
|
-
const
|
|
61462
|
-
const
|
|
61463
|
-
const
|
|
61464
|
-
const
|
|
61465
|
-
const
|
|
61466
|
-
const
|
|
61467
|
-
const
|
|
61468
|
-
const
|
|
61469
|
-
const
|
|
61470
|
-
const buttonSectionBoxToSelection = "controlBar.sectionBox.sectionSelection";
|
|
61471
|
-
const buttonSectionBoxToScene = "controlBar.sectionBox.sectionScene";
|
|
61472
|
-
const buttonSectionBoxAuto = "controlBar.sectionBox.auto";
|
|
61473
|
-
const buttonSectionBoxSettings = "controlBar.sectionBox.settings";
|
|
61607
|
+
const cameraSpan = "controlBar.cameraSpan";
|
|
61608
|
+
const cameraFrameSelection = "controlBar.cameraFrameSelection";
|
|
61609
|
+
const cameraFrameScene = "controlBar.cameraFrameScene";
|
|
61610
|
+
const cameraAuto = "controlBar.cameraAuto";
|
|
61611
|
+
const cursorSpan = "controlBar.cursorSpan";
|
|
61612
|
+
const cursorOrbit = "controlBar.cursorOrbit";
|
|
61613
|
+
const cursorLook = "controlBar.cursorLook";
|
|
61614
|
+
const cursorPan = "controlBar.cursorPan";
|
|
61615
|
+
const cursorZoom = "controlBar.cursorZoom";
|
|
61616
|
+
const cursorZoomWindow = "controlBar.cursorZoomWindow";
|
|
61617
|
+
const visibilitySpan = "controlBar.visibilitySpan";
|
|
61618
|
+
const visibilityClearSelection = "controlBar.visibilityClearSelection";
|
|
61619
|
+
const visibilityShowAll = "controlBar.visibilityShowAll";
|
|
61620
|
+
const visibilityIsolateSelection = "controlBar.visibilityIsolateSelection";
|
|
61621
|
+
const visibilityHideSelection = "controlBar.visibilityHideSelection";
|
|
61622
|
+
const visibilityShowSelection = "controlBar.visibilityShowSelection";
|
|
61623
|
+
const visibilityAutoIsolate = "controlBar.visibilityAutoIsolate";
|
|
61624
|
+
const visibilitySettings = "controlBar.visibilitySettings";
|
|
61625
|
+
const sectioningSpan = "controlBar.sectioningSpan";
|
|
61626
|
+
const sectioningEnable = "controlBar.sectioningEnable";
|
|
61627
|
+
const sectioningVisible = "controlBar.sectioningVisible";
|
|
61628
|
+
const sectioningFitSelection = "controlBar.sectioningFitSelection";
|
|
61629
|
+
const sectioningFitScene = "controlBar.sectioningFitScene";
|
|
61630
|
+
const sectioningAuto = "controlBar.sectioningAuto";
|
|
61631
|
+
const sectioningSettings = "controlBar.sectioningSettings";
|
|
61632
|
+
const measureSpan = "controlBar.measureSpan";
|
|
61633
|
+
const measureEnable = "controlBar.measureEnable";
|
|
61634
|
+
const miscSpan = "controlBar.miscSpan";
|
|
61635
|
+
const miscInspector = "controlBar.miscInspector";
|
|
61636
|
+
const miscSettings = "controlBar.miscSettings";
|
|
61637
|
+
const miscHelp = "controlBar.miscHelp";
|
|
61638
|
+
const miscMaximize = "controlBar.miscMaximize";
|
|
61474
61639
|
const controlBarIds = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
61475
61640
|
__proto__: null,
|
|
61476
|
-
|
|
61477
|
-
|
|
61478
|
-
|
|
61479
|
-
|
|
61480
|
-
|
|
61481
|
-
|
|
61482
|
-
|
|
61483
|
-
|
|
61484
|
-
|
|
61485
|
-
|
|
61486
|
-
|
|
61487
|
-
|
|
61488
|
-
|
|
61489
|
-
|
|
61490
|
-
|
|
61491
|
-
|
|
61492
|
-
|
|
61493
|
-
|
|
61494
|
-
|
|
61495
|
-
|
|
61496
|
-
|
|
61497
|
-
|
|
61498
|
-
|
|
61499
|
-
|
|
61500
|
-
|
|
61501
|
-
|
|
61502
|
-
|
|
61503
|
-
|
|
61504
|
-
|
|
61505
|
-
|
|
61506
|
-
|
|
61507
|
-
|
|
61508
|
-
sectionSectionBox,
|
|
61509
|
-
sectionSelection,
|
|
61510
|
-
sectionSettings,
|
|
61511
|
-
sectionTools
|
|
61641
|
+
cameraAuto,
|
|
61642
|
+
cameraFrameScene,
|
|
61643
|
+
cameraFrameSelection,
|
|
61644
|
+
cameraSpan,
|
|
61645
|
+
cursorLook,
|
|
61646
|
+
cursorOrbit,
|
|
61647
|
+
cursorPan,
|
|
61648
|
+
cursorSpan,
|
|
61649
|
+
cursorZoom,
|
|
61650
|
+
cursorZoomWindow,
|
|
61651
|
+
measureEnable,
|
|
61652
|
+
measureSpan,
|
|
61653
|
+
miscHelp,
|
|
61654
|
+
miscInspector,
|
|
61655
|
+
miscMaximize,
|
|
61656
|
+
miscSettings,
|
|
61657
|
+
miscSpan,
|
|
61658
|
+
sectioningAuto,
|
|
61659
|
+
sectioningEnable,
|
|
61660
|
+
sectioningFitScene,
|
|
61661
|
+
sectioningFitSelection,
|
|
61662
|
+
sectioningSettings,
|
|
61663
|
+
sectioningSpan,
|
|
61664
|
+
sectioningVisible,
|
|
61665
|
+
visibilityAutoIsolate,
|
|
61666
|
+
visibilityClearSelection,
|
|
61667
|
+
visibilityHideSelection,
|
|
61668
|
+
visibilityIsolateSelection,
|
|
61669
|
+
visibilitySettings,
|
|
61670
|
+
visibilityShowAll,
|
|
61671
|
+
visibilityShowSelection,
|
|
61672
|
+
visibilitySpan
|
|
61512
61673
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
61513
61674
|
const baseSectionStyle = "vc-flex vc-items-center vc-rounded-full vc-mb-2 vc-shadow-md";
|
|
61514
61675
|
const sectionDefaultStyle = baseSectionStyle + " vc-bg-white";
|
|
@@ -63601,50 +63762,6 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
63601
63762
|
visible,
|
|
63602
63763
|
zoom
|
|
63603
63764
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
63604
|
-
function getDefaultSettings() {
|
|
63605
|
-
return {
|
|
63606
|
-
capacity: {
|
|
63607
|
-
canFollowUrl: true,
|
|
63608
|
-
canGoFullScreen: true,
|
|
63609
|
-
canDownload: true,
|
|
63610
|
-
canReadLocalStorage: true
|
|
63611
|
-
},
|
|
63612
|
-
ui: {
|
|
63613
|
-
logo: true,
|
|
63614
|
-
performance: false,
|
|
63615
|
-
bimTreePanel: true,
|
|
63616
|
-
bimInfoPanel: true,
|
|
63617
|
-
// axesPanel
|
|
63618
|
-
axesPanel: true,
|
|
63619
|
-
orthographic: true,
|
|
63620
|
-
resetCamera: true,
|
|
63621
|
-
// Control bar
|
|
63622
|
-
controlBar: true,
|
|
63623
|
-
// Control bar - cursors
|
|
63624
|
-
orbit: true,
|
|
63625
|
-
lookAround: true,
|
|
63626
|
-
pan: true,
|
|
63627
|
-
zoom: true,
|
|
63628
|
-
zoomWindow: true,
|
|
63629
|
-
// Control bar - camera
|
|
63630
|
-
autoCamera: true,
|
|
63631
|
-
frameScene: true,
|
|
63632
|
-
frameSelection: true,
|
|
63633
|
-
// Control bar - tools
|
|
63634
|
-
sectioningMode: true,
|
|
63635
|
-
measuringMode: true,
|
|
63636
|
-
toggleIsolation: true,
|
|
63637
|
-
// Control bar - settings
|
|
63638
|
-
projectInspector: true,
|
|
63639
|
-
settings: true,
|
|
63640
|
-
help: true,
|
|
63641
|
-
maximise: true
|
|
63642
|
-
}
|
|
63643
|
-
};
|
|
63644
|
-
}
|
|
63645
|
-
function createSettings(settings2) {
|
|
63646
|
-
return settings2 !== void 0 ? deepmerge(getDefaultSettings(), settings2) : getDefaultSettings();
|
|
63647
|
-
}
|
|
63648
63765
|
function getLocalSettings(settings2 = {}) {
|
|
63649
63766
|
try {
|
|
63650
63767
|
const json = localStorage.getItem("viewer.settings");
|
|
@@ -63699,8 +63816,6 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
63699
63816
|
}
|
|
63700
63817
|
const index$4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
63701
63818
|
__proto__: null,
|
|
63702
|
-
createSettings,
|
|
63703
|
-
getDefaultSettings,
|
|
63704
63819
|
getLocalSettings,
|
|
63705
63820
|
isFalse,
|
|
63706
63821
|
isTrue,
|
|
@@ -67236,7 +67351,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67236
67351
|
return value.some(isTrue) ? element : null;
|
|
67237
67352
|
}
|
|
67238
67353
|
function anyUiAxesButton(settings2) {
|
|
67239
|
-
return settings2.ui.
|
|
67354
|
+
return settings2.ui.axesOrthographic || settings2.ui.axesHome;
|
|
67240
67355
|
}
|
|
67241
67356
|
const AxesPanelMemo = React2.memo(AxesPanel);
|
|
67242
67357
|
function AxesPanel(props) {
|
|
@@ -67296,15 +67411,15 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67296
67411
|
children: ortho ? /* @__PURE__ */ jsxRuntimeExports.jsx(orthographic, { height: 20, width: 20, fill: "currentColor" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(perspective, { height: 20, width: 20, fill: "currentColor" })
|
|
67297
67412
|
}
|
|
67298
67413
|
);
|
|
67299
|
-
const hidden2 = isTrue(props.settings.value.ui.
|
|
67414
|
+
const hidden2 = isTrue(props.settings.value.ui.panelAxes) ? "" : " vc-hidden";
|
|
67300
67415
|
const empty2 = !anyUiAxesButton(props.settings.value);
|
|
67301
67416
|
const createBar = () => {
|
|
67302
67417
|
if (empty2) return null;
|
|
67303
67418
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vim-axes-panel-bar vc-absolute vc-top-[75%] vc-bottom-0 vc-right-0 vc-left-0", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "vim-axes-panel-buttons vc-absolute vc-inset-0 vc-pointer-events-auto vc-order-2 vc-flex vc-items-center vc-justify-evenly vc-bg-white", children: [
|
|
67304
67419
|
whenAllTrue([
|
|
67305
|
-
props.settings.value.ui.
|
|
67420
|
+
props.settings.value.ui.axesOrthographic
|
|
67306
67421
|
], btnOrtho),
|
|
67307
|
-
whenTrue(props.settings.value.ui.
|
|
67422
|
+
whenTrue(props.settings.value.ui.axesHome, btnHome)
|
|
67308
67423
|
] }) });
|
|
67309
67424
|
};
|
|
67310
67425
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -67532,77 +67647,78 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67532
67647
|
}
|
|
67533
67648
|
const Style = style;
|
|
67534
67649
|
const Ids$2 = controlBarIds;
|
|
67535
|
-
function controlBarSectionBox(section, hasSelection) {
|
|
67650
|
+
function controlBarSectionBox(section, hasSelection, settings2) {
|
|
67536
67651
|
return {
|
|
67537
|
-
id: Ids$2.
|
|
67652
|
+
id: Ids$2.sectioningSpan,
|
|
67538
67653
|
style: section.enable.get() ? Style.sectionNoPadStyle : Style.sectionDefaultStyle,
|
|
67539
67654
|
//enable: () => section.getEnable(),
|
|
67540
67655
|
buttons: [
|
|
67541
67656
|
{
|
|
67542
|
-
id: Ids$2.
|
|
67657
|
+
id: Ids$2.sectioningEnable,
|
|
67658
|
+
enabled: () => isTrue(settings2.sectioningEnable),
|
|
67543
67659
|
tip: "Enable Section Box",
|
|
67544
67660
|
isOn: () => section.enable.get(),
|
|
67545
|
-
style:
|
|
67661
|
+
style: Style.buttonExpandStyle,
|
|
67546
67662
|
action: () => section.enable.set(!section.enable.get()),
|
|
67547
67663
|
icon: sectionBox
|
|
67548
67664
|
},
|
|
67549
67665
|
{
|
|
67550
|
-
id: Ids$2.
|
|
67666
|
+
id: Ids$2.sectioningFitSelection,
|
|
67551
67667
|
tip: "Fit Section",
|
|
67552
|
-
enabled: () => section.enable.get(),
|
|
67668
|
+
enabled: () => section.enable.get() && isTrue(settings2.sectioningFitToSelection),
|
|
67553
67669
|
isOn: () => hasSelection,
|
|
67554
|
-
style:
|
|
67670
|
+
style: Style.buttonDisableStyle,
|
|
67555
67671
|
action: () => section.sectionSelection.call(),
|
|
67556
67672
|
icon: sectionBoxShrink
|
|
67557
67673
|
},
|
|
67558
67674
|
{
|
|
67559
|
-
id: Ids$2.
|
|
67675
|
+
id: Ids$2.sectioningFitScene,
|
|
67560
67676
|
tip: "Reset Section",
|
|
67561
|
-
enabled: () => section.enable.get(),
|
|
67562
|
-
style:
|
|
67677
|
+
enabled: () => section.enable.get() && isTrue(settings2.sectioningReset),
|
|
67678
|
+
style: Style.buttonDefaultStyle,
|
|
67563
67679
|
action: () => section.sectionScene.call(),
|
|
67564
67680
|
icon: sectionBoxReset
|
|
67565
67681
|
},
|
|
67566
67682
|
{
|
|
67567
|
-
id: Ids$2.
|
|
67683
|
+
id: Ids$2.sectioningVisible,
|
|
67568
67684
|
tip: "Show Section Box",
|
|
67569
|
-
enabled: () => section.enable.get(),
|
|
67685
|
+
enabled: () => section.enable.get() && isTrue(settings2.sectioningShow),
|
|
67570
67686
|
isOn: () => section.visible.get(),
|
|
67571
|
-
style:
|
|
67687
|
+
style: Style.buttonDefaultStyle,
|
|
67572
67688
|
action: () => section.visible.set(!section.visible.get()),
|
|
67573
67689
|
icon: visible
|
|
67574
67690
|
},
|
|
67575
67691
|
{
|
|
67576
|
-
id: Ids$2.
|
|
67692
|
+
id: Ids$2.sectioningAuto,
|
|
67577
67693
|
tip: "Auto Section",
|
|
67578
|
-
enabled: () => section.enable.get(),
|
|
67694
|
+
enabled: () => section.enable.get() && isTrue(settings2.sectioningAuto),
|
|
67579
67695
|
isOn: () => section.auto.get(),
|
|
67580
|
-
style:
|
|
67696
|
+
style: Style.buttonDefaultStyle,
|
|
67581
67697
|
action: () => section.auto.set(!section.auto.get()),
|
|
67582
67698
|
icon: sectionBoxAuto
|
|
67583
67699
|
},
|
|
67584
67700
|
{
|
|
67585
|
-
id: Ids$2.
|
|
67701
|
+
id: Ids$2.sectioningSettings,
|
|
67586
67702
|
tip: "Section Settings",
|
|
67587
|
-
enabled: () => section.enable.get(),
|
|
67703
|
+
enabled: () => section.enable.get() && isTrue(settings2.sectioningSettings),
|
|
67588
67704
|
isOn: () => section.showOffsetPanel.get(),
|
|
67589
|
-
style:
|
|
67705
|
+
style: Style.buttonDefaultStyle,
|
|
67590
67706
|
action: () => section.showOffsetPanel.set(!section.showOffsetPanel.get()),
|
|
67591
67707
|
icon: slidersHoriz
|
|
67592
67708
|
}
|
|
67593
67709
|
]
|
|
67594
67710
|
};
|
|
67595
67711
|
}
|
|
67596
|
-
function controlBarPointer(viewer,
|
|
67712
|
+
function controlBarPointer(viewer, settings2) {
|
|
67597
67713
|
const pointer2 = getPointerState(viewer);
|
|
67598
67714
|
return {
|
|
67599
|
-
id: Ids$2.
|
|
67715
|
+
id: Ids$2.cursorSpan,
|
|
67600
67716
|
enable: () => anyUiCursorButton(settings2),
|
|
67601
67717
|
style: Style.sectionDefaultStyle,
|
|
67602
67718
|
buttons: [
|
|
67603
67719
|
{
|
|
67604
|
-
id: Ids$2.
|
|
67605
|
-
enabled: () => isTrue(settings2.
|
|
67720
|
+
id: Ids$2.cursorOrbit,
|
|
67721
|
+
enabled: () => isTrue(settings2.cursorOrbit),
|
|
67606
67722
|
tip: "Orbit",
|
|
67607
67723
|
action: () => pointer2.onButton(PointerMode$1.ORBIT),
|
|
67608
67724
|
icon: orbit,
|
|
@@ -67610,8 +67726,8 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67610
67726
|
style: Style.buttonDefaultStyle
|
|
67611
67727
|
},
|
|
67612
67728
|
{
|
|
67613
|
-
id: Ids$2.
|
|
67614
|
-
enabled: () => isTrue(settings2.
|
|
67729
|
+
id: Ids$2.cursorLook,
|
|
67730
|
+
enabled: () => isTrue(settings2.cursorLookAround),
|
|
67615
67731
|
tip: "Look Around",
|
|
67616
67732
|
action: () => pointer2.onButton(PointerMode$1.LOOK),
|
|
67617
67733
|
icon: look,
|
|
@@ -67619,8 +67735,8 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67619
67735
|
style: Style.buttonDefaultStyle
|
|
67620
67736
|
},
|
|
67621
67737
|
{
|
|
67622
|
-
id: Ids$2.
|
|
67623
|
-
enabled: () => isTrue(settings2.
|
|
67738
|
+
id: Ids$2.cursorPan,
|
|
67739
|
+
enabled: () => isTrue(settings2.cursorPan),
|
|
67624
67740
|
tip: "Pan",
|
|
67625
67741
|
action: () => pointer2.onButton(PointerMode$1.PAN),
|
|
67626
67742
|
icon: pan,
|
|
@@ -67628,8 +67744,8 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67628
67744
|
style: Style.buttonDefaultStyle
|
|
67629
67745
|
},
|
|
67630
67746
|
{
|
|
67631
|
-
id: Ids$2.
|
|
67632
|
-
enabled: () => isTrue(settings2.
|
|
67747
|
+
id: Ids$2.cursorZoom,
|
|
67748
|
+
enabled: () => isTrue(settings2.cursorZoom),
|
|
67633
67749
|
tip: "Zoom",
|
|
67634
67750
|
action: () => pointer2.onButton(PointerMode$1.ZOOM),
|
|
67635
67751
|
icon: zoom,
|
|
@@ -67639,15 +67755,15 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67639
67755
|
]
|
|
67640
67756
|
};
|
|
67641
67757
|
}
|
|
67642
|
-
function controlBarMeasure(
|
|
67758
|
+
function controlBarMeasure(measure$1, settings2) {
|
|
67643
67759
|
return {
|
|
67644
|
-
id: Ids$2.
|
|
67760
|
+
id: Ids$2.measureSpan,
|
|
67645
67761
|
enable: () => true,
|
|
67646
67762
|
style: Style.sectionDefaultStyle,
|
|
67647
67763
|
buttons: [
|
|
67648
67764
|
{
|
|
67649
|
-
id: Ids$2.
|
|
67650
|
-
enabled: () => isTrue(settings2.
|
|
67765
|
+
id: Ids$2.measureEnable,
|
|
67766
|
+
enabled: () => isTrue(settings2.measureEnable),
|
|
67651
67767
|
isOn: () => measure$1.active,
|
|
67652
67768
|
tip: "Measuring Mode",
|
|
67653
67769
|
action: () => measure$1.toggle(),
|
|
@@ -67657,40 +67773,57 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67657
67773
|
]
|
|
67658
67774
|
};
|
|
67659
67775
|
}
|
|
67660
|
-
function
|
|
67776
|
+
function createMiscSettingsButton(side, settings$1) {
|
|
67777
|
+
return {
|
|
67778
|
+
id: Ids$2.miscSettings,
|
|
67779
|
+
enabled: () => isTrue(settings$1.ui.miscSettings),
|
|
67780
|
+
tip: "Settings",
|
|
67781
|
+
action: () => side.toggleContent("settings"),
|
|
67782
|
+
icon: settings,
|
|
67783
|
+
style: Style.buttonDefaultStyle
|
|
67784
|
+
};
|
|
67785
|
+
}
|
|
67786
|
+
function createMiscHelpButton(modal, settings2) {
|
|
67787
|
+
return {
|
|
67788
|
+
id: Ids$2.miscHelp,
|
|
67789
|
+
enabled: () => isTrue(settings2.ui.miscHelp),
|
|
67790
|
+
tip: "Help",
|
|
67791
|
+
action: () => modal.help(true),
|
|
67792
|
+
icon: help,
|
|
67793
|
+
style: Style.buttonDefaultStyle
|
|
67794
|
+
};
|
|
67795
|
+
}
|
|
67796
|
+
function controlBarMiscUltra(modal, side, settings2) {
|
|
67797
|
+
return {
|
|
67798
|
+
id: Ids$2.miscSpan,
|
|
67799
|
+
enable: () => anyUltraMiscButton(settings2),
|
|
67800
|
+
style: Style.sectionDefaultStyle,
|
|
67801
|
+
buttons: [
|
|
67802
|
+
createMiscSettingsButton(side, settings2),
|
|
67803
|
+
createMiscHelpButton(modal, settings2)
|
|
67804
|
+
]
|
|
67805
|
+
};
|
|
67806
|
+
}
|
|
67807
|
+
function controlBarMisc(modal, side, settings2) {
|
|
67661
67808
|
const fullScreen = getFullScreenState();
|
|
67662
67809
|
return {
|
|
67663
|
-
id: Ids$2.
|
|
67664
|
-
enable: () =>
|
|
67810
|
+
id: Ids$2.miscSpan,
|
|
67811
|
+
enable: () => anyWebglMiscButton(settings2),
|
|
67665
67812
|
style: Style.sectionDefaultStyle,
|
|
67666
67813
|
buttons: [
|
|
67667
67814
|
{
|
|
67668
|
-
id: Ids$2.
|
|
67669
|
-
enabled: () =>
|
|
67815
|
+
id: Ids$2.miscInspector,
|
|
67816
|
+
enabled: () => showBimButton(settings2),
|
|
67670
67817
|
tip: "Project Inspector",
|
|
67671
67818
|
action: () => side.toggleContent("bim"),
|
|
67672
67819
|
icon: treeView,
|
|
67673
67820
|
style: Style.buttonDefaultStyle
|
|
67674
67821
|
},
|
|
67822
|
+
createMiscSettingsButton(side, settings2),
|
|
67823
|
+
createMiscHelpButton(modal, settings2),
|
|
67675
67824
|
{
|
|
67676
|
-
id: Ids$2.
|
|
67677
|
-
enabled: () => isTrue(
|
|
67678
|
-
tip: "Settings",
|
|
67679
|
-
action: () => side.toggleContent("settings"),
|
|
67680
|
-
icon: settings,
|
|
67681
|
-
style: Style.buttonDefaultStyle
|
|
67682
|
-
},
|
|
67683
|
-
{
|
|
67684
|
-
id: Ids$2.buttonHelp,
|
|
67685
|
-
enabled: () => isTrue(settings$1.ui.help),
|
|
67686
|
-
tip: "Help",
|
|
67687
|
-
action: () => modal.help(true),
|
|
67688
|
-
icon: help,
|
|
67689
|
-
style: Style.buttonDefaultStyle
|
|
67690
|
-
},
|
|
67691
|
-
{
|
|
67692
|
-
id: Ids$2.buttonMaximize,
|
|
67693
|
-
enabled: () => isTrue(settings$1.ui.maximise) && settings$1.capacity.canGoFullScreen,
|
|
67825
|
+
id: Ids$2.miscMaximize,
|
|
67826
|
+
enabled: () => isTrue(settings2.ui.miscMaximise) && settings2.capacity.canGoFullScreen,
|
|
67694
67827
|
tip: fullScreen.get() ? "Minimize" : "Fullscreen",
|
|
67695
67828
|
action: () => fullScreen.toggle(),
|
|
67696
67829
|
icon: fullScreen.get() ? minimize : fullsScreen,
|
|
@@ -67699,14 +67832,15 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67699
67832
|
]
|
|
67700
67833
|
};
|
|
67701
67834
|
}
|
|
67702
|
-
function controlBarCamera(camera2) {
|
|
67835
|
+
function controlBarCamera(camera2, settings2) {
|
|
67703
67836
|
return {
|
|
67704
|
-
id: Ids$2.
|
|
67837
|
+
id: Ids$2.cameraSpan,
|
|
67705
67838
|
enable: () => true,
|
|
67706
67839
|
style: Style.sectionDefaultStyle,
|
|
67707
67840
|
buttons: [
|
|
67708
67841
|
{
|
|
67709
|
-
id: Ids$2.
|
|
67842
|
+
id: Ids$2.cameraAuto,
|
|
67843
|
+
enabled: () => isTrue(settings2.cameraAuto),
|
|
67710
67844
|
tip: "Auto Camera",
|
|
67711
67845
|
isOn: () => camera2.autoCamera.get(),
|
|
67712
67846
|
action: () => camera2.autoCamera.set(!camera2.autoCamera.get()),
|
|
@@ -67714,8 +67848,8 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67714
67848
|
style: Style.buttonDefaultStyle
|
|
67715
67849
|
},
|
|
67716
67850
|
{
|
|
67717
|
-
id: Ids$2.
|
|
67718
|
-
|
|
67851
|
+
id: Ids$2.cameraFrameSelection,
|
|
67852
|
+
enabled: () => isTrue(settings2.cameraFrameSelection),
|
|
67719
67853
|
tip: "Frame Selection",
|
|
67720
67854
|
action: () => camera2.frameSelection.call(),
|
|
67721
67855
|
icon: frameSelection,
|
|
@@ -67723,8 +67857,8 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67723
67857
|
style: Style.buttonDefaultStyle
|
|
67724
67858
|
},
|
|
67725
67859
|
{
|
|
67726
|
-
id: Ids$2.
|
|
67727
|
-
|
|
67860
|
+
id: Ids$2.cameraFrameScene,
|
|
67861
|
+
enabled: () => isTrue(settings2.cameraFrameScene),
|
|
67728
67862
|
tip: "Frame All",
|
|
67729
67863
|
action: () => camera2.frameScene.call(),
|
|
67730
67864
|
icon: frameScene,
|
|
@@ -67734,16 +67868,17 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67734
67868
|
]
|
|
67735
67869
|
};
|
|
67736
67870
|
}
|
|
67737
|
-
function
|
|
67871
|
+
function controlBarVisibility(isolation, settings2) {
|
|
67738
67872
|
const adapter = isolation.adapter.current;
|
|
67739
67873
|
const someVisible = adapter.hasVisibleSelection() || !adapter.hasHiddenSelection();
|
|
67740
67874
|
return {
|
|
67741
|
-
id: Ids$2.
|
|
67875
|
+
id: Ids$2.visibilitySpan,
|
|
67742
67876
|
enable: () => true,
|
|
67743
|
-
style:
|
|
67877
|
+
style: Style.sectionDefaultStyle,
|
|
67744
67878
|
buttons: [
|
|
67745
67879
|
{
|
|
67746
|
-
id: Ids$2.
|
|
67880
|
+
id: Ids$2.visibilityClearSelection,
|
|
67881
|
+
enabled: () => isTrue(settings2.visibilityClearSelection),
|
|
67747
67882
|
tip: "Clear Selection",
|
|
67748
67883
|
action: () => adapter.clearSelection(),
|
|
67749
67884
|
icon: pointer,
|
|
@@ -67751,16 +67886,17 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67751
67886
|
style: Style.buttonDisableDefaultStyle
|
|
67752
67887
|
},
|
|
67753
67888
|
{
|
|
67754
|
-
id: Ids$2.
|
|
67889
|
+
id: Ids$2.visibilityShowAll,
|
|
67755
67890
|
tip: "Show All",
|
|
67891
|
+
enabled: () => isTrue(settings2.visibilityShowAll),
|
|
67756
67892
|
action: () => adapter.showAll(),
|
|
67757
67893
|
icon: showAll,
|
|
67758
67894
|
isOn: () => !isolation.autoIsolate.get() && isolation.visibility.get() !== "all",
|
|
67759
67895
|
style: Style.buttonDisableStyle
|
|
67760
67896
|
},
|
|
67761
67897
|
{
|
|
67762
|
-
id: Ids$2.
|
|
67763
|
-
enabled: () => someVisible,
|
|
67898
|
+
id: Ids$2.visibilityHideSelection,
|
|
67899
|
+
enabled: () => someVisible && isTrue(settings2.visibilityToggle),
|
|
67764
67900
|
tip: "Hide Selection",
|
|
67765
67901
|
action: () => adapter.hideSelection(),
|
|
67766
67902
|
icon: hideSelection,
|
|
@@ -67768,8 +67904,8 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67768
67904
|
style: Style.buttonDisableStyle
|
|
67769
67905
|
},
|
|
67770
67906
|
{
|
|
67771
|
-
id: Ids$2.
|
|
67772
|
-
enabled: () => !someVisible,
|
|
67907
|
+
id: Ids$2.visibilityShowSelection,
|
|
67908
|
+
enabled: () => !someVisible && isTrue(settings2.visibilityToggle),
|
|
67773
67909
|
tip: "Show Selection",
|
|
67774
67910
|
action: () => adapter.showSelection(),
|
|
67775
67911
|
icon: showSelection,
|
|
@@ -67777,7 +67913,8 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67777
67913
|
style: Style.buttonDisableStyle
|
|
67778
67914
|
},
|
|
67779
67915
|
{
|
|
67780
|
-
id: Ids$2.
|
|
67916
|
+
id: Ids$2.visibilityIsolateSelection,
|
|
67917
|
+
enabled: () => isTrue(settings2.visibilityIsolate),
|
|
67781
67918
|
tip: "Isolate Selection",
|
|
67782
67919
|
action: () => adapter.isolateSelection(),
|
|
67783
67920
|
icon: isolateSelection,
|
|
@@ -67785,14 +67922,16 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67785
67922
|
style: Style.buttonDisableStyle
|
|
67786
67923
|
},
|
|
67787
67924
|
{
|
|
67788
|
-
id: Ids$2.
|
|
67925
|
+
id: Ids$2.visibilityAutoIsolate,
|
|
67926
|
+
enabled: () => isTrue(settings2.visibilityAutoIsolate),
|
|
67789
67927
|
tip: "Auto Isolate",
|
|
67790
67928
|
action: () => isolation.autoIsolate.set(!isolation.autoIsolate.get()),
|
|
67791
67929
|
isOn: () => isolation.autoIsolate.get(),
|
|
67792
67930
|
icon: autoIsolate
|
|
67793
67931
|
},
|
|
67794
67932
|
{
|
|
67795
|
-
id: Ids$2.
|
|
67933
|
+
id: Ids$2.visibilitySettings,
|
|
67934
|
+
enabled: () => isTrue(settings2.visibilitySettings),
|
|
67796
67935
|
tip: "Isolation Settings",
|
|
67797
67936
|
action: () => isolation.showPanel.set(!isolation.showPanel.get()),
|
|
67798
67937
|
icon: slidersHoriz,
|
|
@@ -67803,28 +67942,31 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67803
67942
|
}
|
|
67804
67943
|
function useControlBar(viewer, camera2, modal, side, cursor, settings2, section, isolationRef, customization) {
|
|
67805
67944
|
const measure2 = getMeasureState(viewer, cursor);
|
|
67806
|
-
const pointerSection = controlBarPointer(viewer, camera2, settings2);
|
|
67807
|
-
const actionSection = controlBarMeasure(settings2, measure2);
|
|
67808
|
-
const sectionBoxSection = controlBarSectionBox(section, viewer.selection.any());
|
|
67809
|
-
const settingsSection = controlBarSettings(modal, side, settings2);
|
|
67810
|
-
const cameraSection = controlBarCamera(camera2);
|
|
67811
|
-
const selectionSection = controlBarSelection(isolationRef);
|
|
67812
67945
|
let controlBarSections = [
|
|
67813
|
-
|
|
67814
|
-
|
|
67815
|
-
|
|
67816
|
-
|
|
67817
|
-
|
|
67818
|
-
|
|
67946
|
+
controlBarPointer(viewer, settings2.ui),
|
|
67947
|
+
controlBarCamera(camera2, settings2.ui),
|
|
67948
|
+
controlBarVisibility(isolationRef, settings2.ui),
|
|
67949
|
+
controlBarMeasure(measure2, settings2.ui),
|
|
67950
|
+
controlBarSectionBox(section, viewer.selection.any(), settings2.ui),
|
|
67951
|
+
controlBarMisc(modal, side, settings2)
|
|
67819
67952
|
];
|
|
67820
67953
|
controlBarSections = (customization == null ? void 0 : customization(controlBarSections)) ?? controlBarSections;
|
|
67821
67954
|
return controlBarSections;
|
|
67822
67955
|
}
|
|
67956
|
+
function showBimButton(settings2) {
|
|
67957
|
+
if (isFalse(settings2.ui.miscProjectInspector)) return false;
|
|
67958
|
+
if (isTrue(settings2.ui.panelBimTree)) return true;
|
|
67959
|
+
if (isTrue(settings2.ui.panelBimInfo)) return true;
|
|
67960
|
+
return false;
|
|
67961
|
+
}
|
|
67823
67962
|
function anyUiCursorButton(settings2) {
|
|
67824
|
-
return isTrue(settings2.
|
|
67963
|
+
return isTrue(settings2.cursorOrbit) || isTrue(settings2.cursorLookAround) || isTrue(settings2.cursorPan) || isTrue(settings2.cursorZoom);
|
|
67825
67964
|
}
|
|
67826
|
-
function
|
|
67827
|
-
return isTrue(settings2.ui.
|
|
67965
|
+
function anyWebglMiscButton(settings2) {
|
|
67966
|
+
return isTrue(settings2.ui.miscProjectInspector) || isTrue(settings2.ui.miscSettings) || isTrue(settings2.ui.miscHelp) || isTrue(settings2.ui.miscMaximise);
|
|
67967
|
+
}
|
|
67968
|
+
function anyUltraMiscButton(settings2) {
|
|
67969
|
+
return isTrue(settings2.ui.miscSettings) || isTrue(settings2.ui.miscHelp);
|
|
67828
67970
|
}
|
|
67829
67971
|
function RestOfScreen(props) {
|
|
67830
67972
|
const [, setVersion] = React2.useState(0);
|
|
@@ -72725,7 +72867,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72725
72867
|
return;
|
|
72726
72868
|
}
|
|
72727
72869
|
if (rectElem.top < rectContainer.top || rectElem.top < 0) {
|
|
72728
|
-
selection.scrollIntoView();
|
|
72870
|
+
selection.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
72729
72871
|
}
|
|
72730
72872
|
}
|
|
72731
72873
|
const isControlKey = (e) => {
|
|
@@ -72930,8 +73072,8 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72930
73072
|
function OptionalBimPanel(props) {
|
|
72931
73073
|
return whenSomeTrue(
|
|
72932
73074
|
[
|
|
72933
|
-
props.settings.ui.
|
|
72934
|
-
props.settings.ui.
|
|
73075
|
+
props.settings.ui.panelBimTree,
|
|
73076
|
+
props.settings.ui.panelBimInfo
|
|
72935
73077
|
],
|
|
72936
73078
|
React2.createElement(BimPanel, props)
|
|
72937
73079
|
);
|
|
@@ -72944,11 +73086,11 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72944
73086
|
}, [props.viewerState.vim.get(), props.viewerState.elements.get()]);
|
|
72945
73087
|
const selection = props.viewerState.selection.get();
|
|
72946
73088
|
const last = selection[selection.length - 1];
|
|
72947
|
-
const fullTree = isFalse(props.settings.ui.
|
|
72948
|
-
const fullInfo = isFalse(props.settings.ui.
|
|
73089
|
+
const fullTree = isFalse(props.settings.ui.panelBimInfo);
|
|
73090
|
+
const fullInfo = isFalse(props.settings.ui.panelBimTree);
|
|
72949
73091
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `vim-bim-panel vc-inset-0 vc-absolute vc-h-full vc-w-full ${fullTree ? "full-tree" : ""} ${props.visible ? "" : "vc-hidden"}`, children: [
|
|
72950
73092
|
whenTrue(
|
|
72951
|
-
props.settings.ui.
|
|
73093
|
+
props.settings.ui.panelBimTree,
|
|
72952
73094
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `vim-bim-upper vc-flex vc-flex-col vc-absolute vc-w-full ${fullTree ? "vc-h-full" : "vc-h-[49%]"} `, children: [
|
|
72953
73095
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
72954
73096
|
"h2",
|
|
@@ -72982,21 +73124,21 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72982
73124
|
// Divider if needed.
|
|
72983
73125
|
whenAllTrue(
|
|
72984
73126
|
[
|
|
72985
|
-
props.settings.ui.
|
|
72986
|
-
props.settings.ui.
|
|
73127
|
+
props.settings.ui.panelBimTree,
|
|
73128
|
+
props.settings.ui.panelBimInfo,
|
|
72987
73129
|
((_b2 = props.viewerState.elements.get()) == null ? void 0 : _b2.length) > 0
|
|
72988
73130
|
],
|
|
72989
73131
|
divider$1()
|
|
72990
73132
|
),
|
|
72991
73133
|
whenTrue(
|
|
72992
|
-
props.settings.ui.
|
|
73134
|
+
props.settings.ui.panelBimInfo,
|
|
72993
73135
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `vim-bim-lower-container vc-absolute ${fullInfo ? "vc-top-0" : "vc-top-[50%]"} vc-bottom-0 vc-bottom vc-left-0 vc-right-0`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
72994
73136
|
BimInfoPanel,
|
|
72995
73137
|
{
|
|
72996
73138
|
object: last,
|
|
72997
73139
|
vim: props.viewerState.vim.get(),
|
|
72998
73140
|
elements: props.viewerState.elements.get(),
|
|
72999
|
-
full: isFalse(props.settings.ui.
|
|
73141
|
+
full: isFalse(props.settings.ui.panelBimTree),
|
|
73000
73142
|
bimInfoRef: props.bimInfoRef
|
|
73001
73143
|
}
|
|
73002
73144
|
) })
|
|
@@ -73836,7 +73978,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
73836
73978
|
} else {
|
|
73837
73979
|
props.container.gfx.style.left = "0px";
|
|
73838
73980
|
}
|
|
73839
|
-
props.viewer.viewport.
|
|
73981
|
+
props.viewer.viewport.resizeToParent();
|
|
73840
73982
|
};
|
|
73841
73983
|
const getMaxSize = () => {
|
|
73842
73984
|
return props.container.root.clientWidth * MAX_WIDTH;
|
|
@@ -73895,7 +74037,10 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
73895
74037
|
style: {
|
|
73896
74038
|
position: "absolute"
|
|
73897
74039
|
},
|
|
73898
|
-
className: `vim-side-panel vc-top-0 vc-left-0 vc-z-20
|
|
74040
|
+
className: `vim-side-panel vc-top-0 vc-left-0 vc-z-20
|
|
74041
|
+
vc-bg-gray-lightest vc-text-gray-darker
|
|
74042
|
+
vc-border-r vc-border-gray-light
|
|
74043
|
+
${props.side.getContent() !== "none" ? "" : "vc-hidden"}`,
|
|
73899
74044
|
children: [
|
|
73900
74045
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
73901
74046
|
"button",
|
|
@@ -73978,180 +74123,6 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
73978
74123
|
[side, width]
|
|
73979
74124
|
);
|
|
73980
74125
|
}
|
|
73981
|
-
function SettingsPanel(props) {
|
|
73982
|
-
if (!props.visible) return null;
|
|
73983
|
-
const toggleElement = (label, state, action) => {
|
|
73984
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "vc-m-1 vc-block vc-select-none vc-items-center vc-py-1 vc-text-gray-warm", children: [
|
|
73985
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
73986
|
-
"input",
|
|
73987
|
-
{
|
|
73988
|
-
type: "checkbox",
|
|
73989
|
-
checked: state,
|
|
73990
|
-
onChange: action,
|
|
73991
|
-
className: "vim-settings-checkbox vc-checked:bg-primary-royal vc-mr-2 vc-rounded vc-border vc-border-gray-medium "
|
|
73992
|
-
}
|
|
73993
|
-
),
|
|
73994
|
-
" ",
|
|
73995
|
-
label
|
|
73996
|
-
] });
|
|
73997
|
-
};
|
|
73998
|
-
const settingsToggle = (label, getter, setter) => {
|
|
73999
|
-
const value = getter(props.settings.value);
|
|
74000
|
-
if (value === "AlwaysTrue" || value === "AlwaysFalse") {
|
|
74001
|
-
return null;
|
|
74002
|
-
}
|
|
74003
|
-
return toggleElement(label, value, () => {
|
|
74004
|
-
const value2 = getter(props.settings.value);
|
|
74005
|
-
props.settings.update((s) => setter(s, !value2));
|
|
74006
|
-
});
|
|
74007
|
-
};
|
|
74008
|
-
const settingsBox = (label, info, transform, getter, setter) => {
|
|
74009
|
-
const ref = React2.useRef(null);
|
|
74010
|
-
React2.useEffect(() => {
|
|
74011
|
-
ref.current.value = props.viewer.inputs.scrollSpeed.toFixed(2);
|
|
74012
|
-
}, []);
|
|
74013
|
-
getter(props.settings.value).toString();
|
|
74014
|
-
const update = (event) => {
|
|
74015
|
-
const str = event.target.value;
|
|
74016
|
-
const n = Number.parseFloat(str);
|
|
74017
|
-
if (Number.isNaN(n)) {
|
|
74018
|
-
event.target.value = getter(props.settings.value).toString();
|
|
74019
|
-
} else {
|
|
74020
|
-
const value2 = transform(n);
|
|
74021
|
-
event.target.value = value2.toString();
|
|
74022
|
-
props.settings.update((s) => setter(s, value2));
|
|
74023
|
-
}
|
|
74024
|
-
};
|
|
74025
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "vc-box-input vc-my-1", children: [
|
|
74026
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("label", { htmlFor: "textbox", className: "vc-w-3 vc-h-2", children: [
|
|
74027
|
-
label,
|
|
74028
|
-
":"
|
|
74029
|
-
] }),
|
|
74030
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("input", { ref, type: "text", className: "vim-settings-textbox vc-w-14 vc-ml-1 vc-p-1", onBlur: (e) => update(e) }),
|
|
74031
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { htmlFor: "textbox", className: "vc-w-3 vc-h-2 vc-text-gray vc-ml-1", children: info })
|
|
74032
|
-
] });
|
|
74033
|
-
};
|
|
74034
|
-
function settingsSubtitle(title2) {
|
|
74035
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "vc-subtitle", children: title2 });
|
|
74036
|
-
}
|
|
74037
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
74038
|
-
"div",
|
|
74039
|
-
{
|
|
74040
|
-
className: "vc-absolute vc-inset-0",
|
|
74041
|
-
children: [
|
|
74042
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "vc-title", children: "Settings " }),
|
|
74043
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "vim-settings vc-absolute vc-top-6 vc-left-0 vc-bottom-0 vc-right-0 vc-overflow-y-auto", children: [
|
|
74044
|
-
settingsSubtitle("Inputs"),
|
|
74045
|
-
settingsBox(
|
|
74046
|
-
"Scroll Speed",
|
|
74047
|
-
"[0.1,10]",
|
|
74048
|
-
(n) => MathUtils.clamp(n, 0.1, 10),
|
|
74049
|
-
(s) => props.viewer.inputs.scrollSpeed,
|
|
74050
|
-
(s, v) => {
|
|
74051
|
-
props.viewer.inputs.scrollSpeed = v;
|
|
74052
|
-
}
|
|
74053
|
-
),
|
|
74054
|
-
settingsSubtitle("Panels"),
|
|
74055
|
-
settingsToggle(
|
|
74056
|
-
"Show Logo",
|
|
74057
|
-
(settings2) => settings2.ui.logo,
|
|
74058
|
-
(settings2, value) => settings2.ui.logo = value
|
|
74059
|
-
),
|
|
74060
|
-
settingsToggle(
|
|
74061
|
-
"Show Bim Tree",
|
|
74062
|
-
(settings2) => settings2.ui.bimTreePanel,
|
|
74063
|
-
(settings2, value) => settings2.ui.bimTreePanel = value
|
|
74064
|
-
),
|
|
74065
|
-
settingsToggle(
|
|
74066
|
-
"Show Bim Info",
|
|
74067
|
-
(settings2) => settings2.ui.bimInfoPanel,
|
|
74068
|
-
(settings2, value) => settings2.ui.bimInfoPanel = value
|
|
74069
|
-
),
|
|
74070
|
-
settingsToggle(
|
|
74071
|
-
"Show Axes Panel",
|
|
74072
|
-
(settings2) => settings2.ui.axesPanel,
|
|
74073
|
-
(settings2, value) => settings2.ui.axesPanel = value
|
|
74074
|
-
),
|
|
74075
|
-
settingsToggle(
|
|
74076
|
-
"Show Performance Panel",
|
|
74077
|
-
(settings2) => settings2.ui.performance,
|
|
74078
|
-
(settings2, value) => settings2.ui.performance = value
|
|
74079
|
-
),
|
|
74080
|
-
settingsSubtitle("Axes"),
|
|
74081
|
-
settingsToggle(
|
|
74082
|
-
"Show Orthographic Button",
|
|
74083
|
-
(settings2) => settings2.ui.orthographic,
|
|
74084
|
-
(settings2, value) => settings2.ui.orthographic = value
|
|
74085
|
-
),
|
|
74086
|
-
settingsToggle(
|
|
74087
|
-
"Show Reset Camera Button",
|
|
74088
|
-
(settings2) => settings2.ui.resetCamera,
|
|
74089
|
-
(settings2, value) => settings2.ui.resetCamera = value
|
|
74090
|
-
),
|
|
74091
|
-
settingsSubtitle("Control Bar"),
|
|
74092
|
-
settingsToggle(
|
|
74093
|
-
"Show Control Bar",
|
|
74094
|
-
(settings2) => settings2.ui.controlBar,
|
|
74095
|
-
(settings2, value) => settings2.ui.controlBar = value
|
|
74096
|
-
),
|
|
74097
|
-
settingsSubtitle("Control Bar - Cursors"),
|
|
74098
|
-
settingsToggle(
|
|
74099
|
-
"Show Orbit Button",
|
|
74100
|
-
(settings2) => settings2.ui.orbit,
|
|
74101
|
-
(settings2, value) => settings2.ui.orbit = value
|
|
74102
|
-
),
|
|
74103
|
-
settingsToggle(
|
|
74104
|
-
"Show Look Around Button",
|
|
74105
|
-
(settings2) => settings2.ui.lookAround,
|
|
74106
|
-
(settings2, value) => settings2.ui.lookAround = value
|
|
74107
|
-
),
|
|
74108
|
-
settingsToggle(
|
|
74109
|
-
"Show Pan Button",
|
|
74110
|
-
(settings2) => settings2.ui.pan,
|
|
74111
|
-
(settings2, value) => settings2.ui.pan = value
|
|
74112
|
-
),
|
|
74113
|
-
settingsToggle(
|
|
74114
|
-
"Show Zoom Button",
|
|
74115
|
-
(settings2) => settings2.ui.zoom,
|
|
74116
|
-
(settings2, value) => settings2.ui.zoom = value
|
|
74117
|
-
),
|
|
74118
|
-
settingsToggle(
|
|
74119
|
-
"Show Zoom Window Button",
|
|
74120
|
-
(settings2) => settings2.ui.zoomWindow,
|
|
74121
|
-
(settings2, value) => settings2.ui.zoomWindow = value
|
|
74122
|
-
),
|
|
74123
|
-
settingsSubtitle("Control Bar - Tools"),
|
|
74124
|
-
settingsToggle(
|
|
74125
|
-
"Show Measuring Mode Button",
|
|
74126
|
-
(settings2) => settings2.ui.measuringMode,
|
|
74127
|
-
(settings2, value) => settings2.ui.measuringMode = value
|
|
74128
|
-
),
|
|
74129
|
-
settingsSubtitle("Control Bar - Settings"),
|
|
74130
|
-
settingsToggle(
|
|
74131
|
-
"Show Project Inspector Button",
|
|
74132
|
-
(settings2) => settings2.ui.projectInspector,
|
|
74133
|
-
(settings2, value) => settings2.ui.projectInspector = value
|
|
74134
|
-
),
|
|
74135
|
-
settingsToggle(
|
|
74136
|
-
"Show Settings Button",
|
|
74137
|
-
(settings2) => settings2.ui.settings,
|
|
74138
|
-
(settings2, value) => settings2.ui.settings = value
|
|
74139
|
-
),
|
|
74140
|
-
settingsToggle(
|
|
74141
|
-
"Show Help Button",
|
|
74142
|
-
(settings2) => settings2.ui.help,
|
|
74143
|
-
(settings2, value) => settings2.ui.help = value
|
|
74144
|
-
),
|
|
74145
|
-
settingsToggle(
|
|
74146
|
-
"Show Maximise Button",
|
|
74147
|
-
(settings2) => settings2.ui.maximise,
|
|
74148
|
-
(settings2, value) => settings2.ui.maximise = value
|
|
74149
|
-
)
|
|
74150
|
-
] })
|
|
74151
|
-
]
|
|
74152
|
-
}
|
|
74153
|
-
);
|
|
74154
|
-
}
|
|
74155
74126
|
const MenuToastMemo = React2.memo(MenuToast);
|
|
74156
74127
|
function MenuToast(props) {
|
|
74157
74128
|
const [visible2, setVisible] = React2.useState();
|
|
@@ -74316,164 +74287,56 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
74316
74287
|
}
|
|
74317
74288
|
});
|
|
74318
74289
|
}
|
|
74319
|
-
|
|
74320
|
-
|
|
74321
|
-
|
|
74322
|
-
|
|
74323
|
-
|
|
74324
|
-
var _a3;
|
|
74325
|
-
const next = { ...settings2 };
|
|
74326
|
-
updater(next);
|
|
74327
|
-
saveSettingsToLocal(next);
|
|
74328
|
-
setSettings(next);
|
|
74329
|
-
(_a3 = onUpdate.current) == null ? void 0 : _a3.call(onUpdate, next);
|
|
74330
|
-
};
|
|
74331
|
-
React2.useEffect(() => {
|
|
74332
|
-
applySettings(viewer, settings2);
|
|
74333
|
-
}, []);
|
|
74334
|
-
React2.useEffect(() => {
|
|
74335
|
-
applySettings(viewer, settings2);
|
|
74336
|
-
}, [settings2]);
|
|
74337
|
-
return React2.useMemo(
|
|
74338
|
-
() => ({
|
|
74339
|
-
value: settings2,
|
|
74340
|
-
update,
|
|
74341
|
-
register: (v) => onUpdate.current = v
|
|
74342
|
-
}),
|
|
74343
|
-
[settings2]
|
|
74344
|
-
);
|
|
74345
|
-
}
|
|
74346
|
-
function applySettings(viewer, settings2) {
|
|
74347
|
-
const performance2 = document.getElementsByClassName("vim-performance-div")[0];
|
|
74348
|
-
if (performance2) {
|
|
74349
|
-
if (isTrue(settings2.ui.performance)) {
|
|
74350
|
-
performance2.classList.remove("vc-hidden");
|
|
74351
|
-
} else {
|
|
74352
|
-
performance2.classList.add("vc-hidden");
|
|
74353
|
-
}
|
|
74290
|
+
class MutableState {
|
|
74291
|
+
constructor(initial) {
|
|
74292
|
+
__publicField(this, "_value");
|
|
74293
|
+
__publicField(this, "_onChange", new distExports.SimpleEventDispatcher());
|
|
74294
|
+
this._value = initial;
|
|
74354
74295
|
}
|
|
74355
|
-
|
|
74356
|
-
|
|
74357
|
-
let root = element;
|
|
74358
|
-
if (root === void 0) {
|
|
74359
|
-
root = document.createElement("div");
|
|
74360
|
-
document.body.append(root);
|
|
74361
|
-
root.classList.add("vc-inset-0");
|
|
74296
|
+
get() {
|
|
74297
|
+
return this._value;
|
|
74362
74298
|
}
|
|
74363
|
-
|
|
74364
|
-
|
|
74365
|
-
|
|
74366
|
-
|
|
74367
|
-
|
|
74368
|
-
|
|
74369
|
-
|
|
74370
|
-
|
|
74371
|
-
|
|
74372
|
-
|
|
74373
|
-
|
|
74374
|
-
|
|
74375
|
-
|
|
74376
|
-
|
|
74377
|
-
|
|
74299
|
+
set(value) {
|
|
74300
|
+
if (value === this._value) return;
|
|
74301
|
+
this._value = value;
|
|
74302
|
+
this._onChange.dispatch(value);
|
|
74303
|
+
}
|
|
74304
|
+
confirm() {
|
|
74305
|
+
}
|
|
74306
|
+
get onChange() {
|
|
74307
|
+
return this._onChange.asEvent();
|
|
74308
|
+
}
|
|
74309
|
+
}
|
|
74310
|
+
function useRefresher() {
|
|
74311
|
+
const [refresh, setRefresh] = React2.useState(false);
|
|
74312
|
+
return {
|
|
74313
|
+
refresh: () => {
|
|
74314
|
+
setRefresh(!refresh);
|
|
74378
74315
|
}
|
|
74379
74316
|
};
|
|
74380
|
-
return { root, ui, gfx, dispose };
|
|
74381
74317
|
}
|
|
74382
|
-
|
|
74383
|
-
|
|
74384
|
-
|
|
74385
|
-
|
|
74386
|
-
[
|
|
74387
|
-
(_a3 = vim.bim.element) == null ? void 0 : _a3.getAll(),
|
|
74388
|
-
(_b2 = vim.bim.bimDocument) == null ? void 0 : _b2.getAllTitle(),
|
|
74389
|
-
(_c = vim.bim.category) == null ? void 0 : _c.getAllName(),
|
|
74390
|
-
(_d = vim.bim.level) == null ? void 0 : _d.getAllElementIndex(),
|
|
74391
|
-
(_e = vim.bim.workset) == null ? void 0 : _e.getAllName()
|
|
74392
|
-
]
|
|
74393
|
-
);
|
|
74394
|
-
const familyTypeMap = await getFamilyTypeNameMap(vim.bim);
|
|
74395
|
-
if (!elements) return void 0;
|
|
74396
|
-
const result = elements.map((e) => {
|
|
74397
|
-
var _a4;
|
|
74398
|
-
return {
|
|
74399
|
-
...e,
|
|
74400
|
-
bimDocumentName: bimDocument ? bimDocument[e.bimDocumentIndex] : void 0,
|
|
74401
|
-
categoryName: category ? category[e.categoryIndex] : void 0,
|
|
74402
|
-
familyTypeName: familyTypeMap.get(e.index),
|
|
74403
|
-
levelName: levels ? (_a4 = elements[levels[(e == null ? void 0 : e.levelIndex) ?? -1]]) == null ? void 0 : _a4.name : void 0,
|
|
74404
|
-
worksetName: worksets ? worksets[(e == null ? void 0 : e.worksetIndex) ?? -1] : void 0
|
|
74405
|
-
};
|
|
74406
|
-
});
|
|
74407
|
-
const real = result.filter((e) => vim.getElementFromIndex(e.index).hasMesh);
|
|
74408
|
-
return real;
|
|
74409
|
-
}
|
|
74410
|
-
async function getFamilyTypeNameMap(document2) {
|
|
74411
|
-
const [
|
|
74412
|
-
familyInstanceElement,
|
|
74413
|
-
familyInstanceFamilyType,
|
|
74414
|
-
familyTypeElement,
|
|
74415
|
-
elementName
|
|
74416
|
-
] = await Promise.all([
|
|
74417
|
-
document2.familyInstance.getAllElementIndex(),
|
|
74418
|
-
document2.familyInstance.getAllFamilyTypeIndex(),
|
|
74419
|
-
document2.familyType.getAllElementIndex(),
|
|
74420
|
-
document2.element.getAllName()
|
|
74421
|
-
]);
|
|
74422
|
-
return new Map(
|
|
74423
|
-
familyInstanceElement.map((e, i2) => {
|
|
74424
|
-
const familyType = familyInstanceFamilyType == null ? void 0 : familyInstanceFamilyType[i2];
|
|
74425
|
-
const element = Number.isInteger(familyType) ? familyTypeElement[familyType] : void 0;
|
|
74426
|
-
const name = Number.isInteger(element) ? elementName == null ? void 0 : elementName[element] : void 0;
|
|
74427
|
-
return [e, name];
|
|
74428
|
-
})
|
|
74429
|
-
);
|
|
74430
|
-
}
|
|
74431
|
-
class MutableState {
|
|
74432
|
-
constructor(initial) {
|
|
74433
|
-
__publicField(this, "_value");
|
|
74434
|
-
__publicField(this, "_onChange", new distExports.SimpleEventDispatcher());
|
|
74435
|
-
this._value = initial;
|
|
74436
|
-
}
|
|
74437
|
-
get() {
|
|
74438
|
-
return this._value;
|
|
74439
|
-
}
|
|
74440
|
-
set(value) {
|
|
74441
|
-
if (value === this._value) return;
|
|
74442
|
-
this._value = value;
|
|
74443
|
-
this._onChange.dispatch(value);
|
|
74444
|
-
}
|
|
74445
|
-
confirm() {
|
|
74446
|
-
}
|
|
74447
|
-
get onChange() {
|
|
74448
|
-
return this._onChange.asEvent();
|
|
74449
|
-
}
|
|
74450
|
-
}
|
|
74451
|
-
function useRefresher() {
|
|
74452
|
-
const [refresh, setRefresh] = React2.useState(false);
|
|
74453
|
-
return {
|
|
74454
|
-
refresh: () => {
|
|
74455
|
-
setRefresh(!refresh);
|
|
74318
|
+
function useStateRef(initialValue, isLazy = false) {
|
|
74319
|
+
const getInitialValue = () => {
|
|
74320
|
+
if (isLazy && typeof initialValue === "function") {
|
|
74321
|
+
return initialValue();
|
|
74456
74322
|
}
|
|
74323
|
+
return initialValue;
|
|
74457
74324
|
};
|
|
74458
|
-
|
|
74459
|
-
|
|
74460
|
-
|
|
74325
|
+
const [box, setBox] = React2.useState(() => ({
|
|
74326
|
+
current: getInitialValue()
|
|
74327
|
+
}));
|
|
74461
74328
|
const ref = React2.useRef(void 0);
|
|
74462
74329
|
if (ref.current === void 0) {
|
|
74463
|
-
|
|
74464
|
-
ref.current = initialValue();
|
|
74465
|
-
} else {
|
|
74466
|
-
ref.current = initialValue;
|
|
74467
|
-
}
|
|
74330
|
+
ref.current = getInitialValue();
|
|
74468
74331
|
}
|
|
74469
74332
|
const event = React2.useRef(new distExports.SimpleEventDispatcher());
|
|
74470
74333
|
const validate = React2.useRef((next, current) => next);
|
|
74471
|
-
const confirm = React2.useRef((
|
|
74472
|
-
const set2 = (
|
|
74473
|
-
const finalValue = validate.current(
|
|
74334
|
+
const confirm = React2.useRef((value) => value);
|
|
74335
|
+
const set2 = (value) => {
|
|
74336
|
+
const finalValue = validate.current(value, ref.current);
|
|
74474
74337
|
if (finalValue === ref.current) return;
|
|
74475
74338
|
ref.current = finalValue;
|
|
74476
|
-
|
|
74339
|
+
setBox({ current: finalValue });
|
|
74477
74340
|
event.current.dispatch(finalValue);
|
|
74478
74341
|
};
|
|
74479
74342
|
return {
|
|
@@ -74499,8 +74362,8 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
74499
74362
|
*/
|
|
74500
74363
|
useOnChange(on) {
|
|
74501
74364
|
React2.useEffect(() => {
|
|
74502
|
-
return event.current.subscribe((
|
|
74503
|
-
const result = on(
|
|
74365
|
+
return event.current.subscribe((value) => {
|
|
74366
|
+
const result = on(value);
|
|
74504
74367
|
if (result instanceof Promise) {
|
|
74505
74368
|
result.catch(console.error);
|
|
74506
74369
|
}
|
|
@@ -74514,7 +74377,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
74514
74377
|
* @returns The memoized value.
|
|
74515
74378
|
*/
|
|
74516
74379
|
useMemo(on, deps) {
|
|
74517
|
-
return React2.useMemo(() => on(
|
|
74380
|
+
return React2.useMemo(() => on(box.current), [...deps || [], box.current]);
|
|
74518
74381
|
},
|
|
74519
74382
|
/**
|
|
74520
74383
|
* Sets a validation function to process any new state value before updating.
|
|
@@ -74691,6 +74554,114 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
74691
74554
|
useRefresher,
|
|
74692
74555
|
useStateRef
|
|
74693
74556
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
74557
|
+
function useSettings(value, defaultSettings, applySettings = () => {
|
|
74558
|
+
}) {
|
|
74559
|
+
const merged = createSettings(value, defaultSettings);
|
|
74560
|
+
const [settings2, setSettings] = React2.useState(merged);
|
|
74561
|
+
const onUpdate = React2.useRef();
|
|
74562
|
+
const customizer = useStateRef((settings22) => settings22);
|
|
74563
|
+
const update = function(updater) {
|
|
74564
|
+
var _a3;
|
|
74565
|
+
const next = { ...settings2 };
|
|
74566
|
+
updater(next);
|
|
74567
|
+
saveSettingsToLocal(next);
|
|
74568
|
+
setSettings(next);
|
|
74569
|
+
(_a3 = onUpdate.current) == null ? void 0 : _a3.call(onUpdate, next);
|
|
74570
|
+
};
|
|
74571
|
+
React2.useEffect(() => {
|
|
74572
|
+
applySettings(settings2);
|
|
74573
|
+
}, []);
|
|
74574
|
+
React2.useEffect(() => {
|
|
74575
|
+
applySettings(settings2);
|
|
74576
|
+
}, [settings2]);
|
|
74577
|
+
return React2.useMemo(
|
|
74578
|
+
() => ({
|
|
74579
|
+
value: settings2,
|
|
74580
|
+
update,
|
|
74581
|
+
register: (v) => onUpdate.current = v,
|
|
74582
|
+
customizer
|
|
74583
|
+
}),
|
|
74584
|
+
[settings2]
|
|
74585
|
+
);
|
|
74586
|
+
}
|
|
74587
|
+
function createSettings(settings2, defaultSettings) {
|
|
74588
|
+
return settings2 !== void 0 ? deepmerge(defaultSettings, settings2) : defaultSettings;
|
|
74589
|
+
}
|
|
74590
|
+
function createContainer(element) {
|
|
74591
|
+
let root = element;
|
|
74592
|
+
if (root === void 0) {
|
|
74593
|
+
root = document.createElement("div");
|
|
74594
|
+
document.body.append(root);
|
|
74595
|
+
root.classList.add("vc-inset-0");
|
|
74596
|
+
}
|
|
74597
|
+
root.style.position = "absolute";
|
|
74598
|
+
root.classList.add("vim-component");
|
|
74599
|
+
const gfx = document.createElement("div");
|
|
74600
|
+
gfx.className = "vim-gfx vc-absolute vc-inset-0 vc-pointer-events-none";
|
|
74601
|
+
const ui = document.createElement("div");
|
|
74602
|
+
ui.className = "vim-ui vc-absolute vc-inset-0";
|
|
74603
|
+
root.append(gfx);
|
|
74604
|
+
root.append(ui);
|
|
74605
|
+
const dispose = () => {
|
|
74606
|
+
if (element === void 0) {
|
|
74607
|
+
root.remove();
|
|
74608
|
+
} else {
|
|
74609
|
+
root.classList.remove("vim-component");
|
|
74610
|
+
gfx.remove();
|
|
74611
|
+
ui.remove();
|
|
74612
|
+
}
|
|
74613
|
+
};
|
|
74614
|
+
return { root, ui, gfx, dispose };
|
|
74615
|
+
}
|
|
74616
|
+
async function getElements(vim) {
|
|
74617
|
+
var _a3, _b2, _c, _d, _e;
|
|
74618
|
+
if (!vim.bim) return [];
|
|
74619
|
+
const [elements, bimDocument, category, levels, worksets] = await Promise.all(
|
|
74620
|
+
[
|
|
74621
|
+
(_a3 = vim.bim.element) == null ? void 0 : _a3.getAll(),
|
|
74622
|
+
(_b2 = vim.bim.bimDocument) == null ? void 0 : _b2.getAllTitle(),
|
|
74623
|
+
(_c = vim.bim.category) == null ? void 0 : _c.getAllName(),
|
|
74624
|
+
(_d = vim.bim.level) == null ? void 0 : _d.getAllElementIndex(),
|
|
74625
|
+
(_e = vim.bim.workset) == null ? void 0 : _e.getAllName()
|
|
74626
|
+
]
|
|
74627
|
+
);
|
|
74628
|
+
const familyTypeMap = await getFamilyTypeNameMap(vim.bim);
|
|
74629
|
+
if (!elements) return void 0;
|
|
74630
|
+
const result = elements.map((e) => {
|
|
74631
|
+
var _a4;
|
|
74632
|
+
return {
|
|
74633
|
+
...e,
|
|
74634
|
+
bimDocumentName: bimDocument ? bimDocument[e.bimDocumentIndex] : void 0,
|
|
74635
|
+
categoryName: category ? category[e.categoryIndex] : void 0,
|
|
74636
|
+
familyTypeName: familyTypeMap.get(e.index),
|
|
74637
|
+
levelName: levels ? (_a4 = elements[levels[(e == null ? void 0 : e.levelIndex) ?? -1]]) == null ? void 0 : _a4.name : void 0,
|
|
74638
|
+
worksetName: worksets ? worksets[(e == null ? void 0 : e.worksetIndex) ?? -1] : void 0
|
|
74639
|
+
};
|
|
74640
|
+
});
|
|
74641
|
+
const real = result.filter((e) => vim.getElementFromIndex(e.index).hasMesh);
|
|
74642
|
+
return real;
|
|
74643
|
+
}
|
|
74644
|
+
async function getFamilyTypeNameMap(document2) {
|
|
74645
|
+
const [
|
|
74646
|
+
familyInstanceElement,
|
|
74647
|
+
familyInstanceFamilyType,
|
|
74648
|
+
familyTypeElement,
|
|
74649
|
+
elementName
|
|
74650
|
+
] = await Promise.all([
|
|
74651
|
+
document2.familyInstance.getAllElementIndex(),
|
|
74652
|
+
document2.familyInstance.getAllFamilyTypeIndex(),
|
|
74653
|
+
document2.familyType.getAllElementIndex(),
|
|
74654
|
+
document2.element.getAllName()
|
|
74655
|
+
]);
|
|
74656
|
+
return new Map(
|
|
74657
|
+
familyInstanceElement.map((e, i2) => {
|
|
74658
|
+
const familyType = familyInstanceFamilyType == null ? void 0 : familyInstanceFamilyType[i2];
|
|
74659
|
+
const element = Number.isInteger(familyType) ? familyTypeElement[familyType] : void 0;
|
|
74660
|
+
const name = Number.isInteger(element) ? elementName == null ? void 0 : elementName[element] : void 0;
|
|
74661
|
+
return [e, name];
|
|
74662
|
+
})
|
|
74663
|
+
);
|
|
74664
|
+
}
|
|
74694
74665
|
function useViewerState(viewer) {
|
|
74695
74666
|
const getVim = () => {
|
|
74696
74667
|
var _a3;
|
|
@@ -74832,12 +74803,8 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
74832
74803
|
const vcLink = `${vcColorLink} vc-underline`;
|
|
74833
74804
|
const vcLabel = "vc-text-[#3F444F]";
|
|
74834
74805
|
const vcRoboto = "vc-font-['Roboto',sans-serif]";
|
|
74835
|
-
function footer$1(
|
|
74836
|
-
return /* @__PURE__ */ jsxRuntimeExports.
|
|
74837
|
-
"More troubleshooting tips can be found",
|
|
74838
|
-
" ",
|
|
74839
|
-
link(url, "here")
|
|
74840
|
-
] });
|
|
74806
|
+
function footer$1() {
|
|
74807
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {});
|
|
74841
74808
|
}
|
|
74842
74809
|
function mainText(text) {
|
|
74843
74810
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: `vim-main-text vc-text-base ${vcColorPrimary} vc-mb-4 vc-font-normal`, children: text });
|
|
@@ -74885,31 +74852,18 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
74885
74852
|
vcLink,
|
|
74886
74853
|
vcRoboto
|
|
74887
74854
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
74888
|
-
const support = "https://docs.vimaec.com";
|
|
74889
|
-
const supportUltra = "https://docs.vimaec.com/docs/vim-for-windows/configuring-vim-ultra";
|
|
74890
|
-
const supportControls = "https://docs.vimaec.com/docs/vim-cloud/webgl-navigation-and-controls-guide";
|
|
74891
|
-
const urls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
74892
|
-
__proto__: null,
|
|
74893
|
-
support,
|
|
74894
|
-
supportControls,
|
|
74895
|
-
supportUltra
|
|
74896
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
74897
74855
|
function fileOpeningError(url) {
|
|
74898
74856
|
return {
|
|
74899
|
-
title: "File
|
|
74857
|
+
title: "VIM Ultra File Error",
|
|
74900
74858
|
body: serverFileOpeningErrorBody(url),
|
|
74901
|
-
footer: footer$1(
|
|
74859
|
+
footer: footer$1(),
|
|
74902
74860
|
canClose: false
|
|
74903
74861
|
};
|
|
74904
74862
|
}
|
|
74905
74863
|
function serverFileOpeningErrorBody(url) {
|
|
74906
74864
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: vcRoboto, children: [
|
|
74907
|
-
mainText(/* @__PURE__ */ jsxRuntimeExports.
|
|
74908
|
-
|
|
74909
|
-
bold("error opening the VIM file"),
|
|
74910
|
-
". Please check the file exists at the path noted below."
|
|
74911
|
-
] })),
|
|
74912
|
-
subTitle("Error details:"),
|
|
74865
|
+
mainText(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "We encountered an error opening the VIM file in VIM Ultra." })),
|
|
74866
|
+
subTitle("Details"),
|
|
74913
74867
|
dotList([bullet("File path:", url)])
|
|
74914
74868
|
] });
|
|
74915
74869
|
}
|
|
@@ -74918,136 +74872,110 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
74918
74872
|
return fileOpeningError(url);
|
|
74919
74873
|
}
|
|
74920
74874
|
return {
|
|
74921
|
-
title: "
|
|
74875
|
+
title: "VIM Ultra Download Error",
|
|
74922
74876
|
body: body$5(url, authToken, server),
|
|
74923
|
-
footer: footer$1(
|
|
74877
|
+
footer: footer$1(),
|
|
74924
74878
|
canClose: false
|
|
74925
74879
|
};
|
|
74926
74880
|
}
|
|
74927
74881
|
function body$5(url, authToken, server) {
|
|
74928
74882
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: vcRoboto, children: [
|
|
74929
|
-
mainText(/* @__PURE__ */ jsxRuntimeExports.
|
|
74930
|
-
|
|
74931
|
-
bold("error downloading the VIM file"),
|
|
74932
|
-
". Please check the following conditions to get back up and running quickly."
|
|
74933
|
-
] })),
|
|
74934
|
-
subTitle("Error details:"),
|
|
74883
|
+
mainText(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "We encountered an error downloading the VIM file in VIM Ultra." })),
|
|
74884
|
+
subTitle("Details"),
|
|
74935
74885
|
dotList([
|
|
74936
|
-
server ? bullet("VIM
|
|
74937
|
-
bullet("
|
|
74938
|
-
authToken ? bullet("
|
|
74886
|
+
server ? bullet("VIM Ultra:", server) : null,
|
|
74887
|
+
bullet("VIM URL:", url),
|
|
74888
|
+
authToken ? bullet("Access Token:", authToken) : null
|
|
74939
74889
|
]),
|
|
74940
|
-
subTitle("
|
|
74890
|
+
subTitle("Tips"),
|
|
74941
74891
|
numList([
|
|
74942
|
-
"
|
|
74943
|
-
"
|
|
74944
|
-
server ? "Check network access policies to allow the VIM Ultra Server access to the VIM File url." : ""
|
|
74892
|
+
"Ensure the VIM URL is valid",
|
|
74893
|
+
"Check your network connection and access policies"
|
|
74945
74894
|
])
|
|
74946
74895
|
] });
|
|
74947
74896
|
}
|
|
74948
74897
|
function serverFileLoadingError(url) {
|
|
74949
74898
|
return {
|
|
74950
|
-
title: "
|
|
74899
|
+
title: "VIM Ultra Loading Error",
|
|
74951
74900
|
body: body$4(url),
|
|
74952
|
-
footer: footer$1(
|
|
74901
|
+
footer: footer$1(),
|
|
74953
74902
|
canClose: false
|
|
74954
74903
|
};
|
|
74955
74904
|
}
|
|
74956
74905
|
function body$4(url) {
|
|
74957
74906
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: vcRoboto, children: [
|
|
74958
|
-
mainText(/* @__PURE__ */ jsxRuntimeExports.
|
|
74959
|
-
|
|
74960
|
-
bold("couldn’t load the VIM file"),
|
|
74961
|
-
". This could be due to a couple of reasons, including that the file could be corrupt or not recognizable."
|
|
74962
|
-
] })),
|
|
74963
|
-
subTitle("Error details:"),
|
|
74907
|
+
mainText(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "We encountered an error loading the VIM file in VIM Ultra." })),
|
|
74908
|
+
subTitle("Details"),
|
|
74964
74909
|
dotList([bullet("File path:", url)]),
|
|
74965
|
-
subTitle("
|
|
74910
|
+
subTitle("Tips"),
|
|
74966
74911
|
numList([
|
|
74967
|
-
"Reload
|
|
74968
|
-
"
|
|
74912
|
+
"Reload the page",
|
|
74913
|
+
"Ensure the VIM URL points to a valid VIM file",
|
|
74914
|
+
"Clear your VIM Ultra download cache"
|
|
74969
74915
|
])
|
|
74970
74916
|
] });
|
|
74971
74917
|
}
|
|
74972
74918
|
function serverConnectionError(url) {
|
|
74973
74919
|
return {
|
|
74974
|
-
title: "Connection
|
|
74920
|
+
title: "VIM Ultra Connection",
|
|
74975
74921
|
body: body$3(url, isLocalUrl(url)),
|
|
74976
|
-
footer: footer$1(
|
|
74922
|
+
footer: footer$1(),
|
|
74977
74923
|
canClose: false
|
|
74978
74924
|
};
|
|
74979
74925
|
}
|
|
74980
74926
|
function body$3(url, local) {
|
|
74981
74927
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: vcRoboto, children: [
|
|
74982
|
-
mainText(/* @__PURE__ */ jsxRuntimeExports.
|
|
74983
|
-
|
|
74984
|
-
bold("error connecting to the ULTRA server"),
|
|
74985
|
-
". Please check the following conditions to get back up and running quickly."
|
|
74986
|
-
] })),
|
|
74987
|
-
subTitle("Troubleshooting tips:"),
|
|
74928
|
+
mainText(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "We encountered an error connecting to VIM Ultra." })),
|
|
74929
|
+
subTitle("Tips"),
|
|
74988
74930
|
numList([
|
|
74989
74931
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
74990
|
-
"Ensure that VIM Ultra",
|
|
74991
|
-
" ",
|
|
74992
|
-
link(supportUltra, "process is running"),
|
|
74993
|
-
" ",
|
|
74994
|
-
"at ",
|
|
74932
|
+
"Ensure that VIM Ultra is running at ",
|
|
74995
74933
|
detailText(url)
|
|
74996
74934
|
] }),
|
|
74997
|
-
"Check your
|
|
74998
|
-
"Check firewall permissions."
|
|
74935
|
+
"Check your network connection and access policies"
|
|
74999
74936
|
])
|
|
75000
74937
|
] });
|
|
75001
74938
|
}
|
|
75002
74939
|
function serverCompatibilityError(url, localVersion, remoteVersion) {
|
|
75003
74940
|
return {
|
|
75004
|
-
title: "Compatibility
|
|
74941
|
+
title: "VIM Ultra Compatibility",
|
|
75005
74942
|
body: body$2(url, localVersion, remoteVersion),
|
|
75006
|
-
footer: footer$1(
|
|
74943
|
+
footer: footer$1(),
|
|
75007
74944
|
canClose: false
|
|
75008
74945
|
};
|
|
75009
74946
|
}
|
|
75010
74947
|
function body$2(url, localVersion, remoteVersion) {
|
|
75011
74948
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: vcRoboto, children: [
|
|
75012
|
-
mainText(/* @__PURE__ */ jsxRuntimeExports.
|
|
75013
|
-
|
|
75014
|
-
" ",
|
|
75015
|
-
bold("version of VIM Ultra Server that isn’t compatible with this visual"),
|
|
75016
|
-
". Please check the following conditions to get back up and running quickly."
|
|
75017
|
-
] })),
|
|
75018
|
-
subTitle("Error details:"),
|
|
74949
|
+
mainText(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "The VIM Ultra version is incompatible with this visual." })),
|
|
74950
|
+
subTitle("Details"),
|
|
75019
74951
|
dotList([
|
|
75020
74952
|
bullet("Url:", url),
|
|
75021
74953
|
bullet("Local Version:", localVersion),
|
|
75022
74954
|
bullet("Remote Version:", remoteVersion)
|
|
75023
74955
|
]),
|
|
75024
|
-
subTitle("
|
|
74956
|
+
subTitle("Tips"),
|
|
75025
74957
|
numList([
|
|
75026
|
-
"Update
|
|
75027
|
-
"
|
|
74958
|
+
"Update this visual to a compatible version.",
|
|
74959
|
+
"Start a compatible version of VIM Ultra."
|
|
75028
74960
|
])
|
|
75029
74961
|
] });
|
|
75030
74962
|
}
|
|
75031
74963
|
function serverStreamError(url) {
|
|
75032
74964
|
return {
|
|
75033
|
-
title: "Stream Error",
|
|
74965
|
+
title: "VIM Ultra Stream Error",
|
|
75034
74966
|
body: body$1(),
|
|
75035
|
-
footer: footer$1(
|
|
74967
|
+
footer: footer$1(),
|
|
75036
74968
|
canClose: false
|
|
75037
74969
|
};
|
|
75038
74970
|
}
|
|
75039
74971
|
function body$1(url) {
|
|
75040
74972
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: vcRoboto, children: [
|
|
75041
|
-
mainText(/* @__PURE__ */ jsxRuntimeExports.
|
|
75042
|
-
|
|
75043
|
-
bold("error starting a stream on the VIM Ultra Server"),
|
|
75044
|
-
". Please check the following conditions to get back up and running quickly."
|
|
75045
|
-
] })),
|
|
75046
|
-
subTitle("Troubleshooting tips:"),
|
|
74973
|
+
mainText(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "We encountered a streaming error with VIM Ultra." })),
|
|
74974
|
+
subTitle("Tips"),
|
|
75047
74975
|
numList([
|
|
75048
|
-
"
|
|
75049
|
-
"
|
|
75050
|
-
"Restart
|
|
74976
|
+
"Reload the page",
|
|
74977
|
+
"Close other applications that may be using VIM Ultra",
|
|
74978
|
+
"Restart VIM Ultra"
|
|
75051
74979
|
])
|
|
75052
74980
|
] });
|
|
75053
74981
|
}
|
|
@@ -75279,16 +75207,19 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75279
75207
|
}
|
|
75280
75208
|
}
|
|
75281
75209
|
function MessageBox(props) {
|
|
75210
|
+
const [minimized, setMinimized] = React2.useState(props.value.minimize ?? false);
|
|
75282
75211
|
const p = props.value;
|
|
75283
75212
|
if (!p.title || !p.body) return null;
|
|
75284
75213
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "vim-message-box vc-p-6 vc-max-h-[80%] vc-max-w-[80%] vc-w-[424px] vc-bg-white vc-rounded-md vc-shadow-message vc-shadow-[0px_4px_16px_rgba(33,39,51,0.5)] vc-font-roboto", children: [
|
|
75285
75214
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "vc-flex vc-justify-between vc-items-center", children: [
|
|
75215
|
+
props.value.icon,
|
|
75286
75216
|
title(p.title),
|
|
75287
|
-
closeBtn(p.onClose)
|
|
75217
|
+
props.value.canClose && closeBtn(p.onClose),
|
|
75218
|
+
props.value.minimize && minimizeButton(minimized, setMinimized)
|
|
75288
75219
|
] }),
|
|
75289
|
-
divider(),
|
|
75290
|
-
body(p.body),
|
|
75291
|
-
footer(p.footer)
|
|
75220
|
+
!minimized && divider(),
|
|
75221
|
+
!minimized && body(p.body),
|
|
75222
|
+
!minimized && footer(p.footer)
|
|
75292
75223
|
] });
|
|
75293
75224
|
}
|
|
75294
75225
|
function title(title2) {
|
|
@@ -75298,6 +75229,9 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75298
75229
|
if (!onClose) return null;
|
|
75299
75230
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: onClose, className: "vc-text-[#212733] vc-text-xl", children: "×" });
|
|
75300
75231
|
}
|
|
75232
|
+
function minimizeButton(minimized, setMinimized) {
|
|
75233
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: () => setMinimized(!minimized), className: "vc-text-[#212733] vc-text-xl", children: minimized ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "▼" }) : /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "▲" }) });
|
|
75234
|
+
}
|
|
75301
75235
|
function body(content2) {
|
|
75302
75236
|
if (content2 === void 0) return null;
|
|
75303
75237
|
if (typeof content2 === "string") {
|
|
@@ -75656,7 +75590,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75656
75590
|
adapter.setVisible(false);
|
|
75657
75591
|
adapter.setClip(false);
|
|
75658
75592
|
return adapter.onSelectionChanged.sub(() => {
|
|
75659
|
-
if (auto.get() && enable.get())
|
|
75593
|
+
if (auto.get() && enable.get()) sectionSelection.call();
|
|
75660
75594
|
});
|
|
75661
75595
|
}, []);
|
|
75662
75596
|
enable.useOnChange((v) => {
|
|
@@ -75664,7 +75598,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75664
75598
|
visible2.set(v);
|
|
75665
75599
|
showOffsetPanel.set(false);
|
|
75666
75600
|
if (v && auto.get()) {
|
|
75667
|
-
|
|
75601
|
+
sectionSelection.call();
|
|
75668
75602
|
} else {
|
|
75669
75603
|
sectionScene.call();
|
|
75670
75604
|
}
|
|
@@ -75675,7 +75609,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75675
75609
|
sideOffset.useOnChange((v) => sectionBox2.call(boxRef.current));
|
|
75676
75610
|
bottomOffset.useOnChange((v) => sectionBox2.call(boxRef.current));
|
|
75677
75611
|
auto.useOnChange((v) => {
|
|
75678
|
-
if (v)
|
|
75612
|
+
if (v) sectionSelection.call();
|
|
75679
75613
|
});
|
|
75680
75614
|
visible2.useOnChange((v) => adapter.setVisible(v));
|
|
75681
75615
|
const sectionBox2 = useArgActionRef((box) => {
|
|
@@ -75685,7 +75619,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75685
75619
|
const newBox = addBox(box, offsetsToBox3_(topOffset.get(), sideOffset.get(), bottomOffset.get()));
|
|
75686
75620
|
adapter.setBox(newBox);
|
|
75687
75621
|
});
|
|
75688
|
-
const
|
|
75622
|
+
const sectionSelection = useFuncRef(async () => {
|
|
75689
75623
|
const id2 = requestId.current;
|
|
75690
75624
|
const box = await getSelectionBox.call() ?? await getSceneBox.call();
|
|
75691
75625
|
if (requestId.current !== id2) return;
|
|
@@ -75705,7 +75639,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75705
75639
|
topOffset,
|
|
75706
75640
|
sideOffset,
|
|
75707
75641
|
bottomOffset,
|
|
75708
|
-
sectionSelection
|
|
75642
|
+
sectionSelection,
|
|
75709
75643
|
sectionScene,
|
|
75710
75644
|
sectionBox: sectionBox2,
|
|
75711
75645
|
getBox: () => adapter.getBox(),
|
|
@@ -75803,7 +75737,8 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75803
75737
|
}
|
|
75804
75738
|
const Ids = {
|
|
75805
75739
|
showGhost: "isolationPanel.showGhost",
|
|
75806
|
-
ghostOpacity: "isolationPanel.ghostOpacity"
|
|
75740
|
+
ghostOpacity: "isolationPanel.ghostOpacity",
|
|
75741
|
+
transparency: "isolationPanel.transparency"
|
|
75807
75742
|
};
|
|
75808
75743
|
const IsolationPanel$1 = React2.forwardRef(
|
|
75809
75744
|
(props, ref) => {
|
|
@@ -75815,8 +75750,20 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75815
75750
|
anchorElement: document.getElementById("vim-control-bar"),
|
|
75816
75751
|
showPanel: props.state.showPanel,
|
|
75817
75752
|
entries: [
|
|
75818
|
-
{
|
|
75819
|
-
|
|
75753
|
+
{
|
|
75754
|
+
type: "bool",
|
|
75755
|
+
id: Ids.showGhost,
|
|
75756
|
+
label: "Show Ghost",
|
|
75757
|
+
state: props.state.showGhost
|
|
75758
|
+
},
|
|
75759
|
+
/*
|
|
75760
|
+
{
|
|
75761
|
+
type: "bool",
|
|
75762
|
+
id: "showRooms",
|
|
75763
|
+
label: "Show Rooms",
|
|
75764
|
+
state: props.state.showRooms
|
|
75765
|
+
},
|
|
75766
|
+
*/
|
|
75820
75767
|
{
|
|
75821
75768
|
type: "number",
|
|
75822
75769
|
id: Ids.ghostOpacity,
|
|
@@ -75826,6 +75773,13 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75826
75773
|
min: 0,
|
|
75827
75774
|
max: 1,
|
|
75828
75775
|
step: 0.05
|
|
75776
|
+
},
|
|
75777
|
+
{
|
|
75778
|
+
type: "bool",
|
|
75779
|
+
visible: () => props.transparency,
|
|
75780
|
+
id: Ids.transparency,
|
|
75781
|
+
label: "Transparency",
|
|
75782
|
+
state: props.state.transparency
|
|
75829
75783
|
}
|
|
75830
75784
|
]
|
|
75831
75785
|
}
|
|
@@ -75834,12 +75788,13 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75834
75788
|
);
|
|
75835
75789
|
function useSharedIsolation(adapter) {
|
|
75836
75790
|
const _adapter = React2.useRef(adapter);
|
|
75837
|
-
const visibility = useStateRef(() => adapter.computeVisibility());
|
|
75791
|
+
const visibility = useStateRef(() => adapter.computeVisibility(), true);
|
|
75838
75792
|
const autoIsolate2 = useStateRef(false);
|
|
75839
75793
|
const showPanel = useStateRef(false);
|
|
75840
75794
|
const showRooms = useStateRef(false);
|
|
75841
75795
|
const showGhost = useStateRef(false);
|
|
75842
|
-
const ghostOpacity = useStateRef(() => adapter.getGhostOpacity());
|
|
75796
|
+
const ghostOpacity = useStateRef(() => adapter.getGhostOpacity(), true);
|
|
75797
|
+
const transparency = useStateRef(true);
|
|
75843
75798
|
const onAutoIsolate = useFuncRef(() => {
|
|
75844
75799
|
if (adapter.hasSelection()) {
|
|
75845
75800
|
adapter.isolateSelection();
|
|
@@ -75864,6 +75819,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75864
75819
|
});
|
|
75865
75820
|
showGhost.useOnChange((v) => adapter.showGhost(v));
|
|
75866
75821
|
showRooms.useOnChange((v) => adapter.setShowRooms(v));
|
|
75822
|
+
transparency.useOnChange((v) => adapter.enableTransparency(v));
|
|
75867
75823
|
ghostOpacity.useValidate((next, current) => {
|
|
75868
75824
|
return next <= 0 ? current : next;
|
|
75869
75825
|
});
|
|
@@ -75877,7 +75833,8 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75877
75833
|
showRooms,
|
|
75878
75834
|
ghostOpacity,
|
|
75879
75835
|
onAutoIsolate,
|
|
75880
|
-
onVisibilityChange
|
|
75836
|
+
onVisibilityChange,
|
|
75837
|
+
transparency
|
|
75881
75838
|
};
|
|
75882
75839
|
}
|
|
75883
75840
|
function useWebglIsolation(viewer) {
|
|
@@ -75885,6 +75842,29 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75885
75842
|
return useSharedIsolation(adapter);
|
|
75886
75843
|
}
|
|
75887
75844
|
function createWebglIsolationAdapter(viewer) {
|
|
75845
|
+
var transparency = true;
|
|
75846
|
+
var ghost2 = false;
|
|
75847
|
+
var rooms = false;
|
|
75848
|
+
function updateMaterials() {
|
|
75849
|
+
viewer.renderer.modelMaterial = !ghost2 && transparency ? void 0 : ghost2 && transparency ? [void 0, viewer.materials.ghost] : !ghost2 && !transparency ? viewer.materials.simple : ghost2 && !transparency ? [viewer.materials.simple, viewer.materials.ghost] : (() => {
|
|
75850
|
+
throw new Error("Unreachable state in isolation materials");
|
|
75851
|
+
})();
|
|
75852
|
+
}
|
|
75853
|
+
function updateVisibility(elements, predicate) {
|
|
75854
|
+
if (elements === "all") {
|
|
75855
|
+
for (let v of viewer.vims) {
|
|
75856
|
+
for (let o of v.getAllElements()) {
|
|
75857
|
+
if (o.type === "Element3D") {
|
|
75858
|
+
o.visible = o.isRoom ? rooms : predicate(o);
|
|
75859
|
+
}
|
|
75860
|
+
}
|
|
75861
|
+
}
|
|
75862
|
+
} else {
|
|
75863
|
+
for (let o of elements) {
|
|
75864
|
+
o.visible = o.isRoom ? rooms : predicate(o);
|
|
75865
|
+
}
|
|
75866
|
+
}
|
|
75867
|
+
}
|
|
75888
75868
|
return {
|
|
75889
75869
|
onVisibilityChange: viewer.renderer.onSceneUpdated,
|
|
75890
75870
|
onSelectionChanged: viewer.selection.onSelectionChanged,
|
|
@@ -75893,28 +75873,28 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75893
75873
|
hasVisibleSelection: () => viewer.selection.any() && viewer.selection.getAll().every((o) => o.visible),
|
|
75894
75874
|
hasHiddenSelection: () => viewer.selection.any() && viewer.selection.getAll().every((o) => !o.visible),
|
|
75895
75875
|
clearSelection: () => viewer.selection.clear(),
|
|
75896
|
-
isolateSelection: () =>
|
|
75876
|
+
isolateSelection: () => updateVisibility("all", (o) => viewer.selection.has(o)),
|
|
75897
75877
|
hideSelection: () => {
|
|
75898
|
-
viewer.selection.getAll()
|
|
75878
|
+
updateVisibility(viewer.selection.getAll(), (o) => false);
|
|
75899
75879
|
},
|
|
75900
75880
|
showSelection: () => {
|
|
75901
|
-
viewer.selection.getAll()
|
|
75881
|
+
updateVisibility(viewer.selection.getAll(), (o) => true);
|
|
75902
75882
|
},
|
|
75903
75883
|
hideAll: () => {
|
|
75904
|
-
|
|
75884
|
+
updateVisibility("all", (o) => false);
|
|
75905
75885
|
},
|
|
75906
75886
|
showAll: () => {
|
|
75907
|
-
|
|
75887
|
+
updateVisibility("all", (o) => true);
|
|
75908
75888
|
},
|
|
75909
75889
|
isolate: (instances) => {
|
|
75910
75890
|
const set2 = new Set(instances);
|
|
75911
|
-
|
|
75891
|
+
updateVisibility("all", (o) => o.instances.some((i2) => set2.has(i2)));
|
|
75912
75892
|
},
|
|
75913
75893
|
show: (instances) => {
|
|
75914
75894
|
for (let i2 of instances) {
|
|
75915
75895
|
for (let v of viewer.vims) {
|
|
75916
75896
|
const o = v.getElement(i2);
|
|
75917
|
-
o.visible = true;
|
|
75897
|
+
o.visible = o.isRoom ? rooms : true;
|
|
75918
75898
|
}
|
|
75919
75899
|
}
|
|
75920
75900
|
},
|
|
@@ -75922,29 +75902,30 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75922
75902
|
for (let i2 of instances) {
|
|
75923
75903
|
for (let v of viewer.vims) {
|
|
75924
75904
|
const o = v.getElement(i2);
|
|
75925
|
-
o.visible = false;
|
|
75905
|
+
o.visible = o.isRoom ? rooms : false;
|
|
75926
75906
|
}
|
|
75927
75907
|
}
|
|
75928
75908
|
},
|
|
75909
|
+
enableTransparency: (enable) => {
|
|
75910
|
+
if (transparency !== enable) {
|
|
75911
|
+
transparency = enable;
|
|
75912
|
+
updateMaterials();
|
|
75913
|
+
}
|
|
75914
|
+
},
|
|
75929
75915
|
showGhost: (show) => {
|
|
75930
|
-
|
|
75916
|
+
ghost2 = show;
|
|
75917
|
+
updateMaterials();
|
|
75931
75918
|
},
|
|
75932
75919
|
getGhostOpacity: () => viewer.materials.ghostOpacity,
|
|
75933
75920
|
setGhostOpacity: (opacity) => viewer.materials.ghostOpacity = opacity,
|
|
75934
|
-
getShowRooms: () =>
|
|
75921
|
+
getShowRooms: () => rooms,
|
|
75935
75922
|
setShowRooms: (show) => {
|
|
75936
|
-
|
|
75937
|
-
|
|
75938
|
-
|
|
75939
|
-
}
|
|
75940
|
-
function updateAllVisibility(viewer, predicate) {
|
|
75941
|
-
for (let v of viewer.vims) {
|
|
75942
|
-
for (let o of v.getAllElements()) {
|
|
75943
|
-
if (o.type === "Element3D") {
|
|
75944
|
-
o.visible = predicate(o);
|
|
75923
|
+
if (rooms !== show) {
|
|
75924
|
+
rooms = show;
|
|
75925
|
+
updateVisibility("all", (o) => o.visible);
|
|
75945
75926
|
}
|
|
75946
75927
|
}
|
|
75947
|
-
}
|
|
75928
|
+
};
|
|
75948
75929
|
}
|
|
75949
75930
|
function getVisibilityState$1(viewer) {
|
|
75950
75931
|
let all = true;
|
|
@@ -75970,6 +75951,572 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75970
75951
|
if (onlySelectionFlag) return "onlySelection";
|
|
75971
75952
|
return "some";
|
|
75972
75953
|
}
|
|
75954
|
+
function getDefaultSettings() {
|
|
75955
|
+
return {
|
|
75956
|
+
capacity: {
|
|
75957
|
+
canFollowUrl: true,
|
|
75958
|
+
canGoFullScreen: true,
|
|
75959
|
+
canDownload: true,
|
|
75960
|
+
canReadLocalStorage: true
|
|
75961
|
+
},
|
|
75962
|
+
ui: {
|
|
75963
|
+
panelLogo: true,
|
|
75964
|
+
panelPerformance: false,
|
|
75965
|
+
panelBimTree: true,
|
|
75966
|
+
panelBimInfo: true,
|
|
75967
|
+
panelAxes: true,
|
|
75968
|
+
panelControlBar: true,
|
|
75969
|
+
axesOrthographic: true,
|
|
75970
|
+
axesHome: true,
|
|
75971
|
+
// Control bar - cursors
|
|
75972
|
+
cursorOrbit: true,
|
|
75973
|
+
cursorLookAround: true,
|
|
75974
|
+
cursorPan: true,
|
|
75975
|
+
cursorZoom: true,
|
|
75976
|
+
// Control bar - camera
|
|
75977
|
+
cameraAuto: true,
|
|
75978
|
+
cameraFrameScene: true,
|
|
75979
|
+
cameraFrameSelection: true,
|
|
75980
|
+
// Control bar - tools
|
|
75981
|
+
sectioningEnable: true,
|
|
75982
|
+
sectioningFitToSelection: true,
|
|
75983
|
+
sectioningReset: true,
|
|
75984
|
+
sectioningShow: true,
|
|
75985
|
+
sectioningAuto: true,
|
|
75986
|
+
sectioningSettings: true,
|
|
75987
|
+
measureEnable: true,
|
|
75988
|
+
// Control bar - Visibility
|
|
75989
|
+
visibilityClearSelection: true,
|
|
75990
|
+
visibilityShowAll: true,
|
|
75991
|
+
visibilityToggle: true,
|
|
75992
|
+
visibilityIsolate: true,
|
|
75993
|
+
visibilityAutoIsolate: true,
|
|
75994
|
+
visibilitySettings: true,
|
|
75995
|
+
// Control bar - settings
|
|
75996
|
+
miscProjectInspector: true,
|
|
75997
|
+
miscSettings: true,
|
|
75998
|
+
miscHelp: true,
|
|
75999
|
+
miscMaximise: true
|
|
76000
|
+
}
|
|
76001
|
+
};
|
|
76002
|
+
}
|
|
76003
|
+
function renderSettingsInputBox(settings2, item) {
|
|
76004
|
+
const ref = React2.useRef(null);
|
|
76005
|
+
React2.useEffect(() => {
|
|
76006
|
+
var _a3;
|
|
76007
|
+
ref.current.value = (_a3 = item.getter(settings2.value)) == null ? void 0 : _a3.toString();
|
|
76008
|
+
}, []);
|
|
76009
|
+
const update = (event) => {
|
|
76010
|
+
const str = event.target.value;
|
|
76011
|
+
const n = Number.parseFloat(str);
|
|
76012
|
+
if (Number.isNaN(n)) {
|
|
76013
|
+
event.target.value = item.getter(settings2.value).toString();
|
|
76014
|
+
} else {
|
|
76015
|
+
const value = item.transform(n);
|
|
76016
|
+
event.target.value = value.toString();
|
|
76017
|
+
settings2.update((s) => item.setter(s, value));
|
|
76018
|
+
}
|
|
76019
|
+
};
|
|
76020
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "vc-box-input vc-my-1 ", children: [
|
|
76021
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("label", { htmlFor: "textbox", className: "vc-w-3 vc-h-2", children: [
|
|
76022
|
+
item.label,
|
|
76023
|
+
":"
|
|
76024
|
+
] }),
|
|
76025
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
76026
|
+
"input",
|
|
76027
|
+
{
|
|
76028
|
+
ref,
|
|
76029
|
+
type: "text",
|
|
76030
|
+
className: "vim-settings-textbox vc-border vc-rounded-sm vc-border-gray vc-w-14 vc-ml-1 vc-p-1",
|
|
76031
|
+
onBlur: update
|
|
76032
|
+
}
|
|
76033
|
+
),
|
|
76034
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { htmlFor: "textbox", className: "vc-w-3 vc-h-2 vc-text-gray vc-ml-1", children: item.info })
|
|
76035
|
+
] });
|
|
76036
|
+
}
|
|
76037
|
+
function renderSettingsToggle(settings2, item) {
|
|
76038
|
+
const value = item.getter(settings2.value);
|
|
76039
|
+
if (value === "AlwaysTrue" || value === "AlwaysFalse") return null;
|
|
76040
|
+
const handleChange = () => {
|
|
76041
|
+
const current = item.getter(settings2.value);
|
|
76042
|
+
settings2.update((s) => item.setter(s, !current));
|
|
76043
|
+
};
|
|
76044
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "vc-m-1 vc-block vc-select-none vc-items-center vc-py-1 vc-text-gray-warm", children: [
|
|
76045
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
76046
|
+
"input",
|
|
76047
|
+
{
|
|
76048
|
+
type: "checkbox",
|
|
76049
|
+
checked: value,
|
|
76050
|
+
onChange: handleChange,
|
|
76051
|
+
className: "vim-settings-checkbox vc-checked:bg-primary-royal vc-mr-2 vc-rounded vc-border vc-border-gray-medium"
|
|
76052
|
+
}
|
|
76053
|
+
),
|
|
76054
|
+
" ",
|
|
76055
|
+
item.label
|
|
76056
|
+
] });
|
|
76057
|
+
}
|
|
76058
|
+
function renderSettingsSubtitle(item) {
|
|
76059
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "vc-subtitle", children: item.title });
|
|
76060
|
+
}
|
|
76061
|
+
function SettingsPanel(props) {
|
|
76062
|
+
if (!props.visible) return null;
|
|
76063
|
+
function renderItem(settings2, item) {
|
|
76064
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(React2.Fragment, { children: (() => {
|
|
76065
|
+
switch (item.type) {
|
|
76066
|
+
case "subtitle":
|
|
76067
|
+
return renderSettingsSubtitle(item);
|
|
76068
|
+
case "toggle":
|
|
76069
|
+
return renderSettingsToggle(settings2, item);
|
|
76070
|
+
case "box":
|
|
76071
|
+
return renderSettingsInputBox(settings2, item);
|
|
76072
|
+
case "element":
|
|
76073
|
+
return item.element;
|
|
76074
|
+
default:
|
|
76075
|
+
return null;
|
|
76076
|
+
}
|
|
76077
|
+
})() }, item.key);
|
|
76078
|
+
}
|
|
76079
|
+
const customizer = props.settings.customizer.get();
|
|
76080
|
+
const content2 = customizer ? customizer(props.content) : props.content;
|
|
76081
|
+
const sections = buildSections(content2);
|
|
76082
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "vc-absolute vc-inset-0", children: [
|
|
76083
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "vc-title vc-mb-2", children: "Settings" }),
|
|
76084
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "\r\n vim-settings\r\n vc-absolute vc-top-8 vc-left-0 vc-right-0 vc-bottom-0\r\n vc-overflow-y-auto\r\n vc-pr-2\r\n vc-space-y-2\r\n vc-box-border\r\n ", children: sections.map((section) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
76085
|
+
"details",
|
|
76086
|
+
{
|
|
76087
|
+
open: true,
|
|
76088
|
+
className: "\r\n vim-settings-section\r\n vc-bg-white\r\n vc-rounded-md\r\n vc-shadow-sm\r\n vc-border\r\n vc-border-slate-200\r\n vc-p-2\r\n vc-space-y-2\r\n ",
|
|
76089
|
+
children: [
|
|
76090
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("summary", { className: "vim-settings-section-title vc-font-medium vc-text-sm vc-cursor-pointer", children: section.title }),
|
|
76091
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vim-settings-section-content vc-mt-2 vc-space-y-2", children: section.items.map(
|
|
76092
|
+
(item) => renderItem(props.settings, item)
|
|
76093
|
+
) })
|
|
76094
|
+
]
|
|
76095
|
+
},
|
|
76096
|
+
section.key
|
|
76097
|
+
)) })
|
|
76098
|
+
] });
|
|
76099
|
+
}
|
|
76100
|
+
function buildSections(items) {
|
|
76101
|
+
const sections = [];
|
|
76102
|
+
let current = null;
|
|
76103
|
+
for (const item of items) {
|
|
76104
|
+
if (item.type === "subtitle") {
|
|
76105
|
+
current = {
|
|
76106
|
+
key: item.key,
|
|
76107
|
+
title: item.title,
|
|
76108
|
+
items: []
|
|
76109
|
+
};
|
|
76110
|
+
sections.push(current);
|
|
76111
|
+
} else {
|
|
76112
|
+
if (!current) {
|
|
76113
|
+
current = {
|
|
76114
|
+
key: "default",
|
|
76115
|
+
title: "",
|
|
76116
|
+
items: []
|
|
76117
|
+
};
|
|
76118
|
+
sections.push(current);
|
|
76119
|
+
}
|
|
76120
|
+
current.items.push(item);
|
|
76121
|
+
}
|
|
76122
|
+
}
|
|
76123
|
+
return sections;
|
|
76124
|
+
}
|
|
76125
|
+
class SettingsPanelKeys {
|
|
76126
|
+
}
|
|
76127
|
+
// === Inputs ===
|
|
76128
|
+
__publicField(SettingsPanelKeys, "InputsSubtitle", "inputs");
|
|
76129
|
+
__publicField(SettingsPanelKeys, "InputsScrollSpeedBox", "scrollSpeed");
|
|
76130
|
+
// === Panels ===
|
|
76131
|
+
__publicField(SettingsPanelKeys, "PanelsSubtitle", "panels");
|
|
76132
|
+
__publicField(SettingsPanelKeys, "PanelsShowLogoToggle", "logo");
|
|
76133
|
+
__publicField(SettingsPanelKeys, "PanelsShowBimTreeToggle", "bimTree");
|
|
76134
|
+
__publicField(SettingsPanelKeys, "PanelsShowBimInfoToggle", "bimInfo");
|
|
76135
|
+
__publicField(SettingsPanelKeys, "PanelsShowAxesPanelToggle", "axesPanel");
|
|
76136
|
+
__publicField(SettingsPanelKeys, "PanelsShowPerformancePanelToggle", "performance");
|
|
76137
|
+
// === Axes ===
|
|
76138
|
+
__publicField(SettingsPanelKeys, "AxesSubtitle", "axes");
|
|
76139
|
+
__publicField(SettingsPanelKeys, "AxesShowOrthographicButtonToggle", "orthographic");
|
|
76140
|
+
__publicField(SettingsPanelKeys, "AxesShowResetCameraButtonToggle", "resetCamera");
|
|
76141
|
+
// === Control Bar ===
|
|
76142
|
+
__publicField(SettingsPanelKeys, "ControlBarSubtitle", "controlBar");
|
|
76143
|
+
__publicField(SettingsPanelKeys, "ControlBarShowControlBarToggle", "controlBarVisible");
|
|
76144
|
+
// --- Control Bar - Cursors ---
|
|
76145
|
+
__publicField(SettingsPanelKeys, "ControlBarCursorsSubtitle", "controlBarCursors");
|
|
76146
|
+
__publicField(SettingsPanelKeys, "ControlBarCursorsShowOrbitButtonToggle", "orbit");
|
|
76147
|
+
__publicField(SettingsPanelKeys, "ControlBarCursorsShowLookAroundButtonToggle", "lookAround");
|
|
76148
|
+
__publicField(SettingsPanelKeys, "ControlBarCursorsShowPanButtonToggle", "pan");
|
|
76149
|
+
__publicField(SettingsPanelKeys, "ControlBarCursorsShowZoomButtonToggle", "zoom");
|
|
76150
|
+
__publicField(SettingsPanelKeys, "ControlBarCursorsShowZoomWindowButtonToggle", "zoomWindow");
|
|
76151
|
+
// --- Control Bar - Tools ---
|
|
76152
|
+
__publicField(SettingsPanelKeys, "ControlBarToolsSubtitle", "controlBarTools");
|
|
76153
|
+
__publicField(SettingsPanelKeys, "ControlBarToolsShowMeasuringModeButtonToggle", "measuringMode");
|
|
76154
|
+
// --- Control Bar Camera ---
|
|
76155
|
+
__publicField(SettingsPanelKeys, "ControlBarCameraSubtitle", "settingsPanel.controlBar.Camera");
|
|
76156
|
+
__publicField(SettingsPanelKeys, "ControlBarAutoCamera", "settingsPanel.controlBar.autoCamera");
|
|
76157
|
+
__publicField(SettingsPanelKeys, "ControlBarFrameSelection", "settingsPanel.controlBar.frameSelection");
|
|
76158
|
+
__publicField(SettingsPanelKeys, "ControlBarFrameAll", "settingsPanel.controlBar.frameAll");
|
|
76159
|
+
// --- Control Bar - Sectioning ---
|
|
76160
|
+
__publicField(SettingsPanelKeys, "ControlBarSectioningSubtitle", "settingsPanel.controlBar.sectioning");
|
|
76161
|
+
__publicField(SettingsPanelKeys, "ControlBarSectioningEnable", "settingsPanel.controlBar.enableSectioning");
|
|
76162
|
+
__publicField(SettingsPanelKeys, "ControlBarSectioningFitToSelection", "settingsPanel.controlBar.fitToSelection");
|
|
76163
|
+
__publicField(SettingsPanelKeys, "ControlBarSectioningReset", "settingsPanel.controlBar.reset");
|
|
76164
|
+
__publicField(SettingsPanelKeys, "ControlBarSectioningShow", "settingsPanel.controlBar.show");
|
|
76165
|
+
__publicField(SettingsPanelKeys, "ControlBarSectioningAuto", "settingsPanel.controlBar.auto");
|
|
76166
|
+
__publicField(SettingsPanelKeys, "ControlBarSectioningSettings", "settingsPanel.controlBar.settings");
|
|
76167
|
+
// --- Control Bar - Visibility ---
|
|
76168
|
+
__publicField(SettingsPanelKeys, "ControlBarVisibilitySubtitle", "controlBar.visibility.subtitle");
|
|
76169
|
+
__publicField(SettingsPanelKeys, "ControlBarVisibilityClearSelection", "controlBar.visibility.clearSelection");
|
|
76170
|
+
__publicField(SettingsPanelKeys, "ControlBarVisibilityShowAll", "controlBar.visibility.showAll");
|
|
76171
|
+
__publicField(SettingsPanelKeys, "ControlBarVisibilityToggle", "controlBar.visibility.toggle");
|
|
76172
|
+
__publicField(SettingsPanelKeys, "ControlBarVisibilityIsolate", "controlBar.visibility.isolate");
|
|
76173
|
+
__publicField(SettingsPanelKeys, "ControlBarVisibilityAutoIsolate", "controlBar.visibility.autoIsolate");
|
|
76174
|
+
__publicField(SettingsPanelKeys, "ControlBarVisibilitySettings", "controlBar.visibility.settings");
|
|
76175
|
+
// --- Control Bar - Settings ---
|
|
76176
|
+
__publicField(SettingsPanelKeys, "ControlBarMiscSubtitle", "controlBarSettings");
|
|
76177
|
+
__publicField(SettingsPanelKeys, "ControlBarMiscShowProjectInspectorButtonToggle", "projectInspector");
|
|
76178
|
+
__publicField(SettingsPanelKeys, "ControlBarMiscShowSettingsButtonToggle", "settingsButton");
|
|
76179
|
+
__publicField(SettingsPanelKeys, "ControlBarMiscShowHelpButtonToggle", "help");
|
|
76180
|
+
__publicField(SettingsPanelKeys, "ControlBarMiscShowMaximiseButtonToggle", "maximise");
|
|
76181
|
+
function getControlBarCursorSettings() {
|
|
76182
|
+
return [
|
|
76183
|
+
{
|
|
76184
|
+
type: "subtitle",
|
|
76185
|
+
key: SettingsPanelKeys.ControlBarCursorsSubtitle,
|
|
76186
|
+
title: "Control Bar - Cursors"
|
|
76187
|
+
},
|
|
76188
|
+
{
|
|
76189
|
+
type: "toggle",
|
|
76190
|
+
key: SettingsPanelKeys.ControlBarCursorsShowOrbitButtonToggle,
|
|
76191
|
+
label: "Orbit",
|
|
76192
|
+
getter: (s) => s.ui.cursorOrbit,
|
|
76193
|
+
setter: (s, v) => s.ui.cursorOrbit = v
|
|
76194
|
+
},
|
|
76195
|
+
{
|
|
76196
|
+
type: "toggle",
|
|
76197
|
+
key: SettingsPanelKeys.ControlBarCursorsShowLookAroundButtonToggle,
|
|
76198
|
+
label: "Look Around",
|
|
76199
|
+
getter: (s) => s.ui.cursorLookAround,
|
|
76200
|
+
setter: (s, v) => s.ui.cursorLookAround = v
|
|
76201
|
+
},
|
|
76202
|
+
{
|
|
76203
|
+
type: "toggle",
|
|
76204
|
+
key: SettingsPanelKeys.ControlBarCursorsShowPanButtonToggle,
|
|
76205
|
+
label: "Pan",
|
|
76206
|
+
getter: (s) => s.ui.cursorPan,
|
|
76207
|
+
setter: (s, v) => s.ui.cursorPan = v
|
|
76208
|
+
},
|
|
76209
|
+
{
|
|
76210
|
+
type: "toggle",
|
|
76211
|
+
key: SettingsPanelKeys.ControlBarCursorsShowZoomButtonToggle,
|
|
76212
|
+
label: "Zoom",
|
|
76213
|
+
getter: (s) => s.ui.cursorZoom,
|
|
76214
|
+
setter: (s, v) => s.ui.cursorZoom = v
|
|
76215
|
+
}
|
|
76216
|
+
];
|
|
76217
|
+
}
|
|
76218
|
+
function getControlBarCameraSettings() {
|
|
76219
|
+
return [
|
|
76220
|
+
{
|
|
76221
|
+
type: "subtitle",
|
|
76222
|
+
key: SettingsPanelKeys.ControlBarCameraSubtitle,
|
|
76223
|
+
title: "Control Bar - Camera"
|
|
76224
|
+
},
|
|
76225
|
+
{
|
|
76226
|
+
type: "toggle",
|
|
76227
|
+
key: SettingsPanelKeys.ControlBarAutoCamera,
|
|
76228
|
+
label: "Auto Camera",
|
|
76229
|
+
getter: (s) => s.ui.cameraAuto,
|
|
76230
|
+
setter: (s, v) => s.ui.cameraAuto = v
|
|
76231
|
+
},
|
|
76232
|
+
{
|
|
76233
|
+
type: "toggle",
|
|
76234
|
+
key: SettingsPanelKeys.ControlBarFrameSelection,
|
|
76235
|
+
label: "Frame Selection",
|
|
76236
|
+
getter: (s) => s.ui.cameraFrameSelection,
|
|
76237
|
+
setter: (s, v) => s.ui.cameraFrameSelection = v
|
|
76238
|
+
},
|
|
76239
|
+
{
|
|
76240
|
+
type: "toggle",
|
|
76241
|
+
key: SettingsPanelKeys.ControlBarFrameAll,
|
|
76242
|
+
label: "Frame All",
|
|
76243
|
+
getter: (s) => s.ui.cameraFrameScene,
|
|
76244
|
+
setter: (s, v) => s.ui.cameraFrameScene = v
|
|
76245
|
+
}
|
|
76246
|
+
];
|
|
76247
|
+
}
|
|
76248
|
+
function getControlBarSectionBoxSettings() {
|
|
76249
|
+
return [
|
|
76250
|
+
{
|
|
76251
|
+
type: "subtitle",
|
|
76252
|
+
key: SettingsPanelKeys.ControlBarSectioningSubtitle,
|
|
76253
|
+
title: "Control Bar - Sectioning"
|
|
76254
|
+
},
|
|
76255
|
+
{
|
|
76256
|
+
type: "toggle",
|
|
76257
|
+
key: SettingsPanelKeys.ControlBarSectioningEnable,
|
|
76258
|
+
label: "Enable Sectioning",
|
|
76259
|
+
getter: (s) => s.ui.sectioningEnable,
|
|
76260
|
+
setter: (s, v) => s.ui.sectioningEnable = v
|
|
76261
|
+
},
|
|
76262
|
+
{
|
|
76263
|
+
type: "toggle",
|
|
76264
|
+
key: SettingsPanelKeys.ControlBarSectioningFitToSelection,
|
|
76265
|
+
label: "Fit To Selection",
|
|
76266
|
+
getter: (s) => s.ui.sectioningFitToSelection,
|
|
76267
|
+
setter: (s, v) => s.ui.sectioningFitToSelection = v
|
|
76268
|
+
},
|
|
76269
|
+
{
|
|
76270
|
+
type: "toggle",
|
|
76271
|
+
key: SettingsPanelKeys.ControlBarSectioningReset,
|
|
76272
|
+
label: "Reset",
|
|
76273
|
+
getter: (s) => s.ui.sectioningReset,
|
|
76274
|
+
setter: (s, v) => s.ui.sectioningReset = v
|
|
76275
|
+
},
|
|
76276
|
+
{
|
|
76277
|
+
type: "toggle",
|
|
76278
|
+
key: SettingsPanelKeys.ControlBarSectioningShow,
|
|
76279
|
+
label: "Show",
|
|
76280
|
+
getter: (s) => s.ui.sectioningShow,
|
|
76281
|
+
setter: (s, v) => s.ui.sectioningShow = v
|
|
76282
|
+
},
|
|
76283
|
+
{
|
|
76284
|
+
type: "toggle",
|
|
76285
|
+
key: SettingsPanelKeys.ControlBarSectioningAuto,
|
|
76286
|
+
label: "Auto",
|
|
76287
|
+
getter: (s) => s.ui.sectioningAuto,
|
|
76288
|
+
setter: (s, v) => s.ui.sectioningAuto = v
|
|
76289
|
+
},
|
|
76290
|
+
{
|
|
76291
|
+
type: "toggle",
|
|
76292
|
+
key: SettingsPanelKeys.ControlBarSectioningSettings,
|
|
76293
|
+
label: "Settings",
|
|
76294
|
+
getter: (s) => s.ui.sectioningSettings,
|
|
76295
|
+
setter: (s, v) => s.ui.sectioningSettings = v
|
|
76296
|
+
}
|
|
76297
|
+
];
|
|
76298
|
+
}
|
|
76299
|
+
function getControlBarVisibilitySettings() {
|
|
76300
|
+
return [
|
|
76301
|
+
{
|
|
76302
|
+
type: "subtitle",
|
|
76303
|
+
key: SettingsPanelKeys.ControlBarVisibilitySubtitle,
|
|
76304
|
+
title: "Control Bar - Visibility"
|
|
76305
|
+
},
|
|
76306
|
+
{
|
|
76307
|
+
type: "toggle",
|
|
76308
|
+
key: SettingsPanelKeys.ControlBarVisibilityClearSelection,
|
|
76309
|
+
label: "Clear Selection",
|
|
76310
|
+
getter: (s) => s.ui.visibilityClearSelection,
|
|
76311
|
+
setter: (s, v) => s.ui.visibilityClearSelection = v
|
|
76312
|
+
},
|
|
76313
|
+
{
|
|
76314
|
+
type: "toggle",
|
|
76315
|
+
key: SettingsPanelKeys.ControlBarVisibilityShowAll,
|
|
76316
|
+
label: "Show All",
|
|
76317
|
+
getter: (s) => s.ui.visibilityShowAll,
|
|
76318
|
+
setter: (s, v) => s.ui.visibilityShowAll = v
|
|
76319
|
+
},
|
|
76320
|
+
{
|
|
76321
|
+
type: "toggle",
|
|
76322
|
+
key: SettingsPanelKeys.ControlBarVisibilityToggle,
|
|
76323
|
+
label: "Toggle",
|
|
76324
|
+
getter: (s) => s.ui.visibilityToggle,
|
|
76325
|
+
setter: (s, v) => s.ui.visibilityToggle = v
|
|
76326
|
+
},
|
|
76327
|
+
{
|
|
76328
|
+
type: "toggle",
|
|
76329
|
+
key: SettingsPanelKeys.ControlBarVisibilityIsolate,
|
|
76330
|
+
label: "Isolate",
|
|
76331
|
+
getter: (s) => s.ui.visibilityIsolate,
|
|
76332
|
+
setter: (s, v) => s.ui.visibilityIsolate = v
|
|
76333
|
+
},
|
|
76334
|
+
{
|
|
76335
|
+
type: "toggle",
|
|
76336
|
+
key: SettingsPanelKeys.ControlBarVisibilityAutoIsolate,
|
|
76337
|
+
label: "Auto Isolate",
|
|
76338
|
+
getter: (s) => s.ui.visibilityAutoIsolate,
|
|
76339
|
+
setter: (s, v) => s.ui.visibilityAutoIsolate = v
|
|
76340
|
+
},
|
|
76341
|
+
{
|
|
76342
|
+
type: "toggle",
|
|
76343
|
+
key: SettingsPanelKeys.ControlBarVisibilitySettings,
|
|
76344
|
+
label: "Settings",
|
|
76345
|
+
getter: (s) => s.ui.visibilitySettings,
|
|
76346
|
+
setter: (s, v) => s.ui.visibilitySettings = v
|
|
76347
|
+
}
|
|
76348
|
+
];
|
|
76349
|
+
}
|
|
76350
|
+
function getControlBarVariousSettings() {
|
|
76351
|
+
return [
|
|
76352
|
+
{
|
|
76353
|
+
type: "subtitle",
|
|
76354
|
+
key: SettingsPanelKeys.ControlBarMiscSubtitle,
|
|
76355
|
+
title: "Control Bar - Settings"
|
|
76356
|
+
},
|
|
76357
|
+
{
|
|
76358
|
+
type: "toggle",
|
|
76359
|
+
key: SettingsPanelKeys.ControlBarMiscShowProjectInspectorButtonToggle,
|
|
76360
|
+
label: "Project Inspector",
|
|
76361
|
+
getter: (s) => s.ui.miscProjectInspector,
|
|
76362
|
+
setter: (s, v) => s.ui.miscProjectInspector = v
|
|
76363
|
+
},
|
|
76364
|
+
{
|
|
76365
|
+
type: "toggle",
|
|
76366
|
+
key: SettingsPanelKeys.ControlBarMiscShowSettingsButtonToggle,
|
|
76367
|
+
label: "Settings",
|
|
76368
|
+
getter: (s) => s.ui.miscSettings,
|
|
76369
|
+
setter: (s, v) => s.ui.miscSettings = v
|
|
76370
|
+
},
|
|
76371
|
+
{
|
|
76372
|
+
type: "toggle",
|
|
76373
|
+
key: SettingsPanelKeys.ControlBarMiscShowHelpButtonToggle,
|
|
76374
|
+
label: "Help",
|
|
76375
|
+
getter: (s) => s.ui.miscHelp,
|
|
76376
|
+
setter: (s, v) => s.ui.miscHelp = v
|
|
76377
|
+
},
|
|
76378
|
+
{
|
|
76379
|
+
type: "toggle",
|
|
76380
|
+
key: SettingsPanelKeys.ControlBarMiscShowMaximiseButtonToggle,
|
|
76381
|
+
label: "Maximise",
|
|
76382
|
+
getter: (s) => s.ui.miscMaximise,
|
|
76383
|
+
setter: (s, v) => s.ui.miscMaximise = v
|
|
76384
|
+
}
|
|
76385
|
+
];
|
|
76386
|
+
}
|
|
76387
|
+
function getPanelsVisibilitySettings() {
|
|
76388
|
+
return [
|
|
76389
|
+
{
|
|
76390
|
+
type: "subtitle",
|
|
76391
|
+
key: SettingsPanelKeys.PanelsSubtitle,
|
|
76392
|
+
title: "Panels Visibility"
|
|
76393
|
+
},
|
|
76394
|
+
{
|
|
76395
|
+
type: "toggle",
|
|
76396
|
+
key: SettingsPanelKeys.PanelsShowLogoToggle,
|
|
76397
|
+
label: "Logo",
|
|
76398
|
+
getter: (s) => s.ui.panelLogo,
|
|
76399
|
+
setter: (s, v) => s.ui.panelLogo = v
|
|
76400
|
+
},
|
|
76401
|
+
{
|
|
76402
|
+
type: "toggle",
|
|
76403
|
+
key: SettingsPanelKeys.PanelsShowBimTreeToggle,
|
|
76404
|
+
label: "Bim Tree",
|
|
76405
|
+
getter: (s) => s.ui.panelBimTree,
|
|
76406
|
+
setter: (s, v) => s.ui.panelBimTree = v
|
|
76407
|
+
},
|
|
76408
|
+
{
|
|
76409
|
+
type: "toggle",
|
|
76410
|
+
key: SettingsPanelKeys.PanelsShowBimInfoToggle,
|
|
76411
|
+
label: "Bim Info",
|
|
76412
|
+
getter: (s) => s.ui.panelBimInfo,
|
|
76413
|
+
setter: (s, v) => s.ui.panelBimInfo = v
|
|
76414
|
+
},
|
|
76415
|
+
{
|
|
76416
|
+
type: "toggle",
|
|
76417
|
+
key: SettingsPanelKeys.PanelsShowAxesPanelToggle,
|
|
76418
|
+
label: "Axes",
|
|
76419
|
+
getter: (s) => s.ui.panelAxes,
|
|
76420
|
+
setter: (s, v) => s.ui.panelAxes = v
|
|
76421
|
+
},
|
|
76422
|
+
{
|
|
76423
|
+
type: "toggle",
|
|
76424
|
+
key: SettingsPanelKeys.PanelsShowPerformancePanelToggle,
|
|
76425
|
+
label: "Performance",
|
|
76426
|
+
getter: (s) => s.ui.panelPerformance,
|
|
76427
|
+
setter: (s, v) => s.ui.panelPerformance = v
|
|
76428
|
+
},
|
|
76429
|
+
{
|
|
76430
|
+
type: "toggle",
|
|
76431
|
+
key: SettingsPanelKeys.ControlBarShowControlBarToggle,
|
|
76432
|
+
label: "Control Bar",
|
|
76433
|
+
getter: (s) => s.ui.panelControlBar,
|
|
76434
|
+
setter: (s, v) => s.ui.panelControlBar = v
|
|
76435
|
+
}
|
|
76436
|
+
];
|
|
76437
|
+
}
|
|
76438
|
+
function getInputsSettings(viewer) {
|
|
76439
|
+
return [
|
|
76440
|
+
{
|
|
76441
|
+
type: "subtitle",
|
|
76442
|
+
key: SettingsPanelKeys.InputsSubtitle,
|
|
76443
|
+
title: "Inputs"
|
|
76444
|
+
},
|
|
76445
|
+
{
|
|
76446
|
+
type: "box",
|
|
76447
|
+
key: SettingsPanelKeys.InputsScrollSpeedBox,
|
|
76448
|
+
label: "Scroll Speed",
|
|
76449
|
+
info: "[0.1,10]",
|
|
76450
|
+
transform: (n) => MathUtils.clamp(n, 0.1, 10),
|
|
76451
|
+
getter: (_s) => viewer.inputs.scrollSpeed,
|
|
76452
|
+
setter: (_s, v) => {
|
|
76453
|
+
viewer.inputs.scrollSpeed = v;
|
|
76454
|
+
}
|
|
76455
|
+
}
|
|
76456
|
+
];
|
|
76457
|
+
}
|
|
76458
|
+
function getAxesPanelSettings() {
|
|
76459
|
+
return [
|
|
76460
|
+
{
|
|
76461
|
+
type: "subtitle",
|
|
76462
|
+
key: SettingsPanelKeys.AxesSubtitle,
|
|
76463
|
+
title: "Axes Panel"
|
|
76464
|
+
},
|
|
76465
|
+
{
|
|
76466
|
+
type: "toggle",
|
|
76467
|
+
key: SettingsPanelKeys.AxesShowOrthographicButtonToggle,
|
|
76468
|
+
label: "Orthographic Camera",
|
|
76469
|
+
getter: (s) => s.ui.axesOrthographic,
|
|
76470
|
+
setter: (s, v) => s.ui.axesOrthographic = v
|
|
76471
|
+
},
|
|
76472
|
+
{
|
|
76473
|
+
type: "toggle",
|
|
76474
|
+
key: SettingsPanelKeys.AxesShowResetCameraButtonToggle,
|
|
76475
|
+
label: "Reset Camera",
|
|
76476
|
+
getter: (s) => s.ui.axesHome,
|
|
76477
|
+
setter: (s, v) => s.ui.axesHome = v
|
|
76478
|
+
}
|
|
76479
|
+
];
|
|
76480
|
+
}
|
|
76481
|
+
function getControlBarMeasureSettings() {
|
|
76482
|
+
return [
|
|
76483
|
+
{
|
|
76484
|
+
type: "subtitle",
|
|
76485
|
+
key: SettingsPanelKeys.ControlBarToolsSubtitle,
|
|
76486
|
+
title: "Control Bar - Measurement"
|
|
76487
|
+
},
|
|
76488
|
+
{
|
|
76489
|
+
type: "toggle",
|
|
76490
|
+
key: SettingsPanelKeys.ControlBarToolsShowMeasuringModeButtonToggle,
|
|
76491
|
+
label: "Enable",
|
|
76492
|
+
getter: (s) => s.ui.measureEnable,
|
|
76493
|
+
setter: (s, v) => s.ui.measureEnable = v
|
|
76494
|
+
}
|
|
76495
|
+
];
|
|
76496
|
+
}
|
|
76497
|
+
function getWebglSettingsContent(viewer) {
|
|
76498
|
+
return [
|
|
76499
|
+
...getInputsSettings(viewer),
|
|
76500
|
+
...getPanelsVisibilitySettings(),
|
|
76501
|
+
...getAxesPanelSettings(),
|
|
76502
|
+
...getControlBarCursorSettings(),
|
|
76503
|
+
...getControlBarCameraSettings(),
|
|
76504
|
+
...getControlBarVisibilitySettings(),
|
|
76505
|
+
...getControlBarMeasureSettings(),
|
|
76506
|
+
...getControlBarSectionBoxSettings(),
|
|
76507
|
+
...getControlBarVariousSettings()
|
|
76508
|
+
];
|
|
76509
|
+
}
|
|
76510
|
+
function applyWebglSettings(settings2) {
|
|
76511
|
+
const performance2 = document.getElementsByClassName("vim-performance-div")[0];
|
|
76512
|
+
if (performance2) {
|
|
76513
|
+
if (isTrue(settings2.ui.panelPerformance)) {
|
|
76514
|
+
performance2.classList.remove("vc-hidden");
|
|
76515
|
+
} else {
|
|
76516
|
+
performance2.classList.add("vc-hidden");
|
|
76517
|
+
}
|
|
76518
|
+
}
|
|
76519
|
+
}
|
|
75973
76520
|
function createViewer$1(container, settings2 = {}, coreSettings = {}) {
|
|
75974
76521
|
const controllablePromise = new ControllablePromise();
|
|
75975
76522
|
const cmpContainer = container instanceof HTMLElement ? createContainer(container) : container ?? createContainer();
|
|
@@ -76000,7 +76547,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76000
76547
|
return controllablePromise.promise;
|
|
76001
76548
|
}
|
|
76002
76549
|
function Viewer$1(props) {
|
|
76003
|
-
const settings2 = useSettings(props.
|
|
76550
|
+
const settings2 = useSettings(props.settings ?? {}, getDefaultSettings(), (s) => applyWebglSettings(s));
|
|
76004
76551
|
const modal = React2.useRef(null);
|
|
76005
76552
|
const sectionBoxRef = useWebglSectionBox(props.viewer);
|
|
76006
76553
|
const isolationPanelHandle = React2.useRef(null);
|
|
@@ -76010,7 +76557,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76010
76557
|
const loader = React2.useRef(new ComponentLoader(props.viewer, modal, settings2.value));
|
|
76011
76558
|
useViewerInput(props.viewer.inputs, camera2);
|
|
76012
76559
|
const side = useSideState(
|
|
76013
|
-
isTrue(settings2.value.ui.
|
|
76560
|
+
isTrue(settings2.value.ui.panelBimTree) || isTrue(settings2.value.ui.panelBimInfo),
|
|
76014
76561
|
Math.min(props.container.root.clientWidth * 0.25, 340)
|
|
76015
76562
|
);
|
|
76016
76563
|
const [contextMenu2, setcontextMenu] = React2.useState();
|
|
@@ -76026,6 +76573,16 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76026
76573
|
side.setHasBim(((_a3 = viewerState.vim.get()) == null ? void 0 : _a3.bim) !== void 0);
|
|
76027
76574
|
});
|
|
76028
76575
|
React2.useEffect(() => {
|
|
76576
|
+
sectionBoxRef.showOffsetPanel.onChange.subscribe((show) => {
|
|
76577
|
+
if (show) {
|
|
76578
|
+
isolationRef.showPanel.set(false);
|
|
76579
|
+
}
|
|
76580
|
+
});
|
|
76581
|
+
isolationRef.showPanel.onChange.subscribe((show) => {
|
|
76582
|
+
if (show) {
|
|
76583
|
+
sectionBoxRef.showOffsetPanel.set(false);
|
|
76584
|
+
}
|
|
76585
|
+
});
|
|
76029
76586
|
if (performanceRef.current) {
|
|
76030
76587
|
addPerformanceCounter(performanceRef.current);
|
|
76031
76588
|
}
|
|
@@ -76039,7 +76596,11 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76039
76596
|
loader: loader.current,
|
|
76040
76597
|
isolation: isolationRef,
|
|
76041
76598
|
camera: camera2,
|
|
76042
|
-
settings:
|
|
76599
|
+
settings: {
|
|
76600
|
+
update: settings2.update,
|
|
76601
|
+
register: settings2.register,
|
|
76602
|
+
customize: (c) => settings2.customizer.set(c)
|
|
76603
|
+
},
|
|
76043
76604
|
get isolationPanel() {
|
|
76044
76605
|
return isolationPanelHandle.current;
|
|
76045
76606
|
},
|
|
@@ -76085,7 +76646,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76085
76646
|
SettingsPanel,
|
|
76086
76647
|
{
|
|
76087
76648
|
visible: side.getContent() === "settings",
|
|
76088
|
-
|
|
76649
|
+
content: getWebglSettingsContent(props.viewer),
|
|
76089
76650
|
settings: settings2
|
|
76090
76651
|
}
|
|
76091
76652
|
)
|
|
@@ -76105,16 +76666,16 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76105
76666
|
/* @__PURE__ */ jsxRuntimeExports.jsx(RestOfScreen, { side, content: () => {
|
|
76106
76667
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
76107
76668
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Overlay, { canvas: props.viewer.viewport.canvas }),
|
|
76108
|
-
whenTrue(settings2.value.ui.
|
|
76669
|
+
whenTrue(settings2.value.ui.panelLogo, /* @__PURE__ */ jsxRuntimeExports.jsx(LogoMemo, {})),
|
|
76109
76670
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
76110
76671
|
ControlBar,
|
|
76111
76672
|
{
|
|
76112
76673
|
content: controlBar,
|
|
76113
|
-
show: isTrue(settings2.value.ui.
|
|
76674
|
+
show: isTrue(settings2.value.ui.panelControlBar)
|
|
76114
76675
|
}
|
|
76115
76676
|
),
|
|
76116
76677
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionBoxPanel$1, { ref: sectionBoxPanelHandle, state: sectionBoxRef }),
|
|
76117
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(IsolationPanel$1, { ref: isolationPanelHandle, state: isolationRef }),
|
|
76678
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(IsolationPanel$1, { ref: isolationPanelHandle, state: isolationRef, transparency: true }),
|
|
76118
76679
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
76119
76680
|
AxesPanelMemo,
|
|
76120
76681
|
{
|
|
@@ -76153,7 +76714,8 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76153
76714
|
const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
76154
76715
|
__proto__: null,
|
|
76155
76716
|
Viewer: Viewer$1,
|
|
76156
|
-
createViewer: createViewer$1
|
|
76717
|
+
createViewer: createViewer$1,
|
|
76718
|
+
getDefaultSettings
|
|
76157
76719
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
76158
76720
|
function getErrorMessage(state) {
|
|
76159
76721
|
if (state.status !== "error") return void 0;
|
|
@@ -76219,11 +76781,13 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76219
76781
|
};
|
|
76220
76782
|
return useSectionBox(ultraAdapter);
|
|
76221
76783
|
}
|
|
76222
|
-
function useUltraControlBar(viewer, section, isolation, camera2, customization) {
|
|
76223
|
-
|
|
76224
|
-
|
|
76225
|
-
|
|
76226
|
-
|
|
76784
|
+
function useUltraControlBar(viewer, section, isolation, camera2, settings2, side, modal, customization) {
|
|
76785
|
+
let bar = [
|
|
76786
|
+
controlBarCamera(camera2, settings2.ui),
|
|
76787
|
+
controlBarVisibility(isolation, settings2.ui),
|
|
76788
|
+
controlBarSectionBox(section, viewer.selection.any(), settings2.ui),
|
|
76789
|
+
controlBarMiscUltra(modal, side, settings2)
|
|
76790
|
+
];
|
|
76227
76791
|
bar = (customization == null ? void 0 : customization(bar)) ?? bar;
|
|
76228
76792
|
return bar;
|
|
76229
76793
|
}
|
|
@@ -76327,6 +76891,9 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76327
76891
|
}
|
|
76328
76892
|
}
|
|
76329
76893
|
},
|
|
76894
|
+
enableTransparency: (enable) => {
|
|
76895
|
+
console.log("enableTransparency not implemented");
|
|
76896
|
+
},
|
|
76330
76897
|
getGhostOpacity: () => viewer.renderer.ghostOpacity,
|
|
76331
76898
|
setGhostOpacity: (opacity) => {
|
|
76332
76899
|
viewer.renderer.ghostOpacity = opacity;
|
|
@@ -76368,7 +76935,73 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76368
76935
|
function allButSelection(viewer, vim) {
|
|
76369
76936
|
return false;
|
|
76370
76937
|
}
|
|
76371
|
-
function
|
|
76938
|
+
function getDefaultUltraSettings() {
|
|
76939
|
+
return {
|
|
76940
|
+
ui: {
|
|
76941
|
+
// panels
|
|
76942
|
+
panelLogo: true,
|
|
76943
|
+
panelControlBar: true,
|
|
76944
|
+
// Control bar - cursors
|
|
76945
|
+
cursorOrbit: true,
|
|
76946
|
+
cursorLookAround: true,
|
|
76947
|
+
cursorPan: true,
|
|
76948
|
+
cursorZoom: true,
|
|
76949
|
+
// Control bar - camera
|
|
76950
|
+
cameraAuto: true,
|
|
76951
|
+
cameraFrameScene: true,
|
|
76952
|
+
cameraFrameSelection: true,
|
|
76953
|
+
// Control bar - tools
|
|
76954
|
+
sectioningEnable: true,
|
|
76955
|
+
sectioningFitToSelection: true,
|
|
76956
|
+
sectioningReset: true,
|
|
76957
|
+
sectioningShow: true,
|
|
76958
|
+
sectioningAuto: true,
|
|
76959
|
+
sectioningSettings: true,
|
|
76960
|
+
// Control bar - Visibility
|
|
76961
|
+
visibilityClearSelection: true,
|
|
76962
|
+
visibilityShowAll: true,
|
|
76963
|
+
visibilityToggle: true,
|
|
76964
|
+
visibilityIsolate: true,
|
|
76965
|
+
visibilityAutoIsolate: true,
|
|
76966
|
+
visibilitySettings: true,
|
|
76967
|
+
// Control bar - misc
|
|
76968
|
+
miscSettings: true,
|
|
76969
|
+
miscHelp: true
|
|
76970
|
+
}
|
|
76971
|
+
};
|
|
76972
|
+
}
|
|
76973
|
+
function getControlBarUltraSettings() {
|
|
76974
|
+
return [
|
|
76975
|
+
{
|
|
76976
|
+
type: "subtitle",
|
|
76977
|
+
key: SettingsPanelKeys.ControlBarMiscSubtitle,
|
|
76978
|
+
title: "Control Bar - Settings"
|
|
76979
|
+
},
|
|
76980
|
+
{
|
|
76981
|
+
type: "toggle",
|
|
76982
|
+
key: SettingsPanelKeys.ControlBarMiscShowSettingsButtonToggle,
|
|
76983
|
+
label: "Settings",
|
|
76984
|
+
getter: (s) => s.ui.miscSettings,
|
|
76985
|
+
setter: (s, v) => s.ui.miscSettings = v
|
|
76986
|
+
},
|
|
76987
|
+
{
|
|
76988
|
+
type: "toggle",
|
|
76989
|
+
key: SettingsPanelKeys.ControlBarMiscShowHelpButtonToggle,
|
|
76990
|
+
label: "Help",
|
|
76991
|
+
getter: (s) => s.ui.miscHelp,
|
|
76992
|
+
setter: (s, v) => s.ui.miscHelp = v
|
|
76993
|
+
}
|
|
76994
|
+
];
|
|
76995
|
+
}
|
|
76996
|
+
function getUltraSettingsContent(viewer) {
|
|
76997
|
+
return [
|
|
76998
|
+
...getControlBarCameraSettings(),
|
|
76999
|
+
...getControlBarVisibilitySettings(),
|
|
77000
|
+
...getControlBarSectionBoxSettings(),
|
|
77001
|
+
...getControlBarUltraSettings()
|
|
77002
|
+
];
|
|
77003
|
+
}
|
|
77004
|
+
function createViewer(container, settings2) {
|
|
76372
77005
|
const controllablePromise = new ControllablePromise();
|
|
76373
77006
|
const cmpContainer = container instanceof HTMLElement ? createContainer(container) : container ?? createContainer();
|
|
76374
77007
|
const core = Viewer$2.createWithCanvas(cmpContainer.gfx);
|
|
@@ -76387,6 +77020,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76387
77020
|
{
|
|
76388
77021
|
container: cmpContainer,
|
|
76389
77022
|
core,
|
|
77023
|
+
settings: settings2,
|
|
76390
77024
|
onMount: (cmp) => controllablePromise.resolve(attachDispose(cmp))
|
|
76391
77025
|
}
|
|
76392
77026
|
)
|
|
@@ -76394,18 +77028,38 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76394
77028
|
return controllablePromise.promise;
|
|
76395
77029
|
}
|
|
76396
77030
|
function Viewer(props) {
|
|
76397
|
-
const
|
|
76398
|
-
const
|
|
77031
|
+
const settings2 = useSettings(props.settings ?? {}, getDefaultUltraSettings());
|
|
77032
|
+
const sectionBoxRef = useUltraSectionBox(props.core);
|
|
77033
|
+
const camera2 = useUltraCamera(props.core, sectionBoxRef);
|
|
76399
77034
|
const isolationPanelHandle = React2.useRef(null);
|
|
76400
77035
|
const sectionBoxPanelHandle = React2.useRef(null);
|
|
76401
77036
|
const modalHandle = React2.useRef(null);
|
|
76402
77037
|
const side = useSideState(true, 400);
|
|
76403
77038
|
const [_, setSelectState] = React2.useState(0);
|
|
76404
77039
|
const [controlBarCustom, setControlBarCustom] = React2.useState(() => (c) => c);
|
|
76405
|
-
const
|
|
76406
|
-
const controlBar = useUltraControlBar(
|
|
77040
|
+
const isolationRef = useUltraIsolation(props.core);
|
|
77041
|
+
const controlBar = useUltraControlBar(
|
|
77042
|
+
props.core,
|
|
77043
|
+
sectionBoxRef,
|
|
77044
|
+
isolationRef,
|
|
77045
|
+
camera2,
|
|
77046
|
+
settings2.value,
|
|
77047
|
+
side,
|
|
77048
|
+
modalHandle.current,
|
|
77049
|
+
(_2) => _2
|
|
77050
|
+
);
|
|
76407
77051
|
useViewerInput(props.core.inputs, camera2);
|
|
76408
77052
|
React2.useEffect(() => {
|
|
77053
|
+
sectionBoxRef.showOffsetPanel.onChange.subscribe((show) => {
|
|
77054
|
+
if (show) {
|
|
77055
|
+
isolationRef.showPanel.set(false);
|
|
77056
|
+
}
|
|
77057
|
+
});
|
|
77058
|
+
isolationRef.showPanel.onChange.subscribe((show) => {
|
|
77059
|
+
if (show) {
|
|
77060
|
+
sectionBoxRef.showOffsetPanel.set(false);
|
|
77061
|
+
}
|
|
77062
|
+
});
|
|
76409
77063
|
props.core.onStateChanged.subscribe((state) => updateModal(modalHandle, state));
|
|
76410
77064
|
props.core.selection.onSelectionChanged.subscribe(() => {
|
|
76411
77065
|
setSelectState((i2) => (i2 + 1) % 2);
|
|
@@ -76415,9 +77069,14 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76415
77069
|
get modal() {
|
|
76416
77070
|
return modalHandle.current;
|
|
76417
77071
|
},
|
|
76418
|
-
isolation,
|
|
76419
|
-
sectionBox:
|
|
77072
|
+
isolation: isolationRef,
|
|
77073
|
+
sectionBox: sectionBoxRef,
|
|
76420
77074
|
camera: camera2,
|
|
77075
|
+
settings: {
|
|
77076
|
+
update: settings2.update,
|
|
77077
|
+
register: settings2.register,
|
|
77078
|
+
customize: (c) => settings2.customizer.set(c)
|
|
77079
|
+
},
|
|
76421
77080
|
get isolationPanel() {
|
|
76422
77081
|
return isolationPanelHandle.current;
|
|
76423
77082
|
},
|
|
@@ -76432,20 +77091,37 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76432
77091
|
load: patchLoad(props.core, modalHandle)
|
|
76433
77092
|
});
|
|
76434
77093
|
}, []);
|
|
77094
|
+
const sidePanel = () => /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
77095
|
+
SettingsPanel,
|
|
77096
|
+
{
|
|
77097
|
+
visible: side.getContent() === "settings",
|
|
77098
|
+
content: getUltraSettingsContent(props.core),
|
|
77099
|
+
settings: settings2
|
|
77100
|
+
}
|
|
77101
|
+
) });
|
|
76435
77102
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
77103
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
77104
|
+
SidePanelMemo,
|
|
77105
|
+
{
|
|
77106
|
+
container: props.container,
|
|
77107
|
+
viewer: props.core,
|
|
77108
|
+
side,
|
|
77109
|
+
content: sidePanel
|
|
77110
|
+
}
|
|
77111
|
+
),
|
|
76436
77112
|
/* @__PURE__ */ jsxRuntimeExports.jsx(RestOfScreen, { side, content: () => {
|
|
76437
77113
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
76438
|
-
whenTrue(
|
|
77114
|
+
whenTrue(settings2.value.ui.panelLogo, /* @__PURE__ */ jsxRuntimeExports.jsx(LogoMemo, {})),
|
|
76439
77115
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Overlay, { canvas: props.core.viewport.canvas }),
|
|
76440
77116
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
76441
77117
|
ControlBar,
|
|
76442
77118
|
{
|
|
76443
77119
|
content: controlBarCustom(controlBar),
|
|
76444
|
-
show:
|
|
77120
|
+
show: isTrue(settings2.value.ui.panelControlBar)
|
|
76445
77121
|
}
|
|
76446
77122
|
),
|
|
76447
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionBoxPanel$1, { ref: sectionBoxPanelHandle, state:
|
|
76448
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(IsolationPanel$1, { ref: isolationPanelHandle, state:
|
|
77123
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionBoxPanel$1, { ref: sectionBoxPanelHandle, state: sectionBoxRef }),
|
|
77124
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(IsolationPanel$1, { ref: isolationPanelHandle, state: isolationRef, transparency: false })
|
|
76449
77125
|
] });
|
|
76450
77126
|
} }),
|
|
76451
77127
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Modal, { ref: modalHandle, canFollowLinks: true }),
|
|
@@ -76483,7 +77159,15 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76483
77159
|
const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
76484
77160
|
__proto__: null,
|
|
76485
77161
|
Viewer,
|
|
76486
|
-
createViewer
|
|
77162
|
+
createViewer,
|
|
77163
|
+
getDefaultUltraSettings
|
|
77164
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
77165
|
+
const supportUltra = "https://docs.vimaec.com/docs/vim-for-windows/configuring-vim-ultra";
|
|
77166
|
+
const supportControls = "https://docs.vimaec.com/docs/vim-cloud/webgl-navigation-and-controls-guide";
|
|
77167
|
+
const urls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
77168
|
+
__proto__: null,
|
|
77169
|
+
supportControls,
|
|
77170
|
+
supportUltra
|
|
76487
77171
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
76488
77172
|
const SectionBoxPanel = {
|
|
76489
77173
|
Ids
|