vim-web 0.5.0-dev.20 → 0.5.0-dev.21
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/vim-web.js
CHANGED
|
@@ -67314,7 +67314,7 @@ function whenSomeTrue(value, element) {
|
|
|
67314
67314
|
return value.some(isTrue) ? element : null;
|
|
67315
67315
|
}
|
|
67316
67316
|
function anyUiAxesButton(settings2) {
|
|
67317
|
-
return settings2.ui.
|
|
67317
|
+
return settings2.ui.axesOrthographic || settings2.ui.axesHome;
|
|
67318
67318
|
}
|
|
67319
67319
|
const AxesPanelMemo = React__default.memo(AxesPanel);
|
|
67320
67320
|
function AxesPanel(props) {
|
|
@@ -67374,15 +67374,15 @@ function AxesPanel(props) {
|
|
|
67374
67374
|
children: ortho ? /* @__PURE__ */ jsxRuntimeExports.jsx(orthographic, { height: 20, width: 20, fill: "currentColor" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(perspective, { height: 20, width: 20, fill: "currentColor" })
|
|
67375
67375
|
}
|
|
67376
67376
|
);
|
|
67377
|
-
const hidden2 = isTrue(props.settings.value.ui.
|
|
67377
|
+
const hidden2 = isTrue(props.settings.value.ui.panelAxes) ? "" : " vc-hidden";
|
|
67378
67378
|
const empty2 = !anyUiAxesButton(props.settings.value);
|
|
67379
67379
|
const createBar = () => {
|
|
67380
67380
|
if (empty2) return null;
|
|
67381
67381
|
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: [
|
|
67382
67382
|
whenAllTrue([
|
|
67383
|
-
props.settings.value.ui.
|
|
67383
|
+
props.settings.value.ui.axesOrthographic
|
|
67384
67384
|
], btnOrtho),
|
|
67385
|
-
whenTrue(props.settings.value.ui.
|
|
67385
|
+
whenTrue(props.settings.value.ui.axesHome, btnHome)
|
|
67386
67386
|
] }) });
|
|
67387
67387
|
};
|
|
67388
67388
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -67762,7 +67762,7 @@ function controlBarSettings(modal, side, settings$1) {
|
|
|
67762
67762
|
buttons: [
|
|
67763
67763
|
{
|
|
67764
67764
|
id: Ids$2.buttonProjectInspector,
|
|
67765
|
-
enabled: () => isTrue(settings$1.ui.miscProjectInspector) && (isTrue(settings$1.ui.
|
|
67765
|
+
enabled: () => isTrue(settings$1.ui.miscProjectInspector) && (isTrue(settings$1.ui.panelBimTree) || isTrue(settings$1.ui.panelBimInfo)),
|
|
67766
67766
|
tip: "Project Inspector",
|
|
67767
67767
|
action: () => side.toggleContent("bim"),
|
|
67768
67768
|
icon: treeView,
|
|
@@ -73026,8 +73026,8 @@ function range(size, startAt = 0) {
|
|
|
73026
73026
|
function OptionalBimPanel(props) {
|
|
73027
73027
|
return whenSomeTrue(
|
|
73028
73028
|
[
|
|
73029
|
-
props.settings.ui.
|
|
73030
|
-
props.settings.ui.
|
|
73029
|
+
props.settings.ui.panelBimTree,
|
|
73030
|
+
props.settings.ui.panelBimInfo
|
|
73031
73031
|
],
|
|
73032
73032
|
React__default.createElement(BimPanel, props)
|
|
73033
73033
|
);
|
|
@@ -73040,11 +73040,11 @@ function BimPanel(props) {
|
|
|
73040
73040
|
}, [props.viewerState.vim.get(), props.viewerState.elements.get()]);
|
|
73041
73041
|
const selection = props.viewerState.selection.get();
|
|
73042
73042
|
const last = selection[selection.length - 1];
|
|
73043
|
-
const fullTree = isFalse(props.settings.ui.
|
|
73044
|
-
const fullInfo = isFalse(props.settings.ui.
|
|
73043
|
+
const fullTree = isFalse(props.settings.ui.panelBimInfo);
|
|
73044
|
+
const fullInfo = isFalse(props.settings.ui.panelBimTree);
|
|
73045
73045
|
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: [
|
|
73046
73046
|
whenTrue(
|
|
73047
|
-
props.settings.ui.
|
|
73047
|
+
props.settings.ui.panelBimTree,
|
|
73048
73048
|
/* @__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: [
|
|
73049
73049
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
73050
73050
|
"h2",
|
|
@@ -73078,21 +73078,21 @@ function BimPanel(props) {
|
|
|
73078
73078
|
// Divider if needed.
|
|
73079
73079
|
whenAllTrue(
|
|
73080
73080
|
[
|
|
73081
|
-
props.settings.ui.
|
|
73082
|
-
props.settings.ui.
|
|
73081
|
+
props.settings.ui.panelBimTree,
|
|
73082
|
+
props.settings.ui.panelBimInfo,
|
|
73083
73083
|
((_b2 = props.viewerState.elements.get()) == null ? void 0 : _b2.length) > 0
|
|
73084
73084
|
],
|
|
73085
73085
|
divider$1()
|
|
73086
73086
|
),
|
|
73087
73087
|
whenTrue(
|
|
73088
|
-
props.settings.ui.
|
|
73088
|
+
props.settings.ui.panelBimInfo,
|
|
73089
73089
|
/* @__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(
|
|
73090
73090
|
BimInfoPanel,
|
|
73091
73091
|
{
|
|
73092
73092
|
object: last,
|
|
73093
73093
|
vim: props.viewerState.vim.get(),
|
|
73094
73094
|
elements: props.viewerState.elements.get(),
|
|
73095
|
-
full: isFalse(props.settings.ui.
|
|
73095
|
+
full: isFalse(props.settings.ui.panelBimTree),
|
|
73096
73096
|
bimInfoRef: props.bimInfoRef
|
|
73097
73097
|
}
|
|
73098
73098
|
) })
|
|
@@ -75951,16 +75951,14 @@ function getDefaultSettings() {
|
|
|
75951
75951
|
canReadLocalStorage: true
|
|
75952
75952
|
},
|
|
75953
75953
|
ui: {
|
|
75954
|
-
|
|
75955
|
-
|
|
75956
|
-
|
|
75957
|
-
|
|
75958
|
-
|
|
75959
|
-
|
|
75960
|
-
|
|
75961
|
-
|
|
75962
|
-
// Control bar
|
|
75963
|
-
controlBar: true,
|
|
75954
|
+
panelLogo: true,
|
|
75955
|
+
panelPerformance: false,
|
|
75956
|
+
panelBimTree: true,
|
|
75957
|
+
panelBimInfo: true,
|
|
75958
|
+
panelAxes: true,
|
|
75959
|
+
panelControlBar: true,
|
|
75960
|
+
axesOrthographic: true,
|
|
75961
|
+
axesHome: true,
|
|
75964
75962
|
// Control bar - cursors
|
|
75965
75963
|
cursorOrbit: true,
|
|
75966
75964
|
cursorLookAround: true,
|
|
@@ -76388,43 +76386,43 @@ function getPanelsVisibilitySettings() {
|
|
|
76388
76386
|
type: "toggle",
|
|
76389
76387
|
key: SettingsPanelKeys.PanelsShowLogoToggle,
|
|
76390
76388
|
label: "Logo",
|
|
76391
|
-
getter: (s) => s.ui.
|
|
76392
|
-
setter: (s, v) => s.ui.
|
|
76389
|
+
getter: (s) => s.ui.panelLogo,
|
|
76390
|
+
setter: (s, v) => s.ui.panelLogo = v
|
|
76393
76391
|
},
|
|
76394
76392
|
{
|
|
76395
76393
|
type: "toggle",
|
|
76396
76394
|
key: SettingsPanelKeys.PanelsShowBimTreeToggle,
|
|
76397
76395
|
label: "Bim Tree",
|
|
76398
|
-
getter: (s) => s.ui.
|
|
76399
|
-
setter: (s, v) => s.ui.
|
|
76396
|
+
getter: (s) => s.ui.panelBimTree,
|
|
76397
|
+
setter: (s, v) => s.ui.panelBimTree = v
|
|
76400
76398
|
},
|
|
76401
76399
|
{
|
|
76402
76400
|
type: "toggle",
|
|
76403
76401
|
key: SettingsPanelKeys.PanelsShowBimInfoToggle,
|
|
76404
76402
|
label: "Bim Info",
|
|
76405
|
-
getter: (s) => s.ui.
|
|
76406
|
-
setter: (s, v) => s.ui.
|
|
76403
|
+
getter: (s) => s.ui.panelBimInfo,
|
|
76404
|
+
setter: (s, v) => s.ui.panelBimInfo = v
|
|
76407
76405
|
},
|
|
76408
76406
|
{
|
|
76409
76407
|
type: "toggle",
|
|
76410
76408
|
key: SettingsPanelKeys.PanelsShowAxesPanelToggle,
|
|
76411
76409
|
label: "Axes",
|
|
76412
|
-
getter: (s) => s.ui.
|
|
76413
|
-
setter: (s, v) => s.ui.
|
|
76410
|
+
getter: (s) => s.ui.panelAxes,
|
|
76411
|
+
setter: (s, v) => s.ui.panelAxes = v
|
|
76414
76412
|
},
|
|
76415
76413
|
{
|
|
76416
76414
|
type: "toggle",
|
|
76417
76415
|
key: SettingsPanelKeys.PanelsShowPerformancePanelToggle,
|
|
76418
76416
|
label: "Performance",
|
|
76419
|
-
getter: (s) => s.ui.
|
|
76420
|
-
setter: (s, v) => s.ui.
|
|
76417
|
+
getter: (s) => s.ui.panelPerformance,
|
|
76418
|
+
setter: (s, v) => s.ui.panelPerformance = v
|
|
76421
76419
|
},
|
|
76422
76420
|
{
|
|
76423
76421
|
type: "toggle",
|
|
76424
76422
|
key: SettingsPanelKeys.ControlBarShowControlBarToggle,
|
|
76425
76423
|
label: "Control Bar",
|
|
76426
|
-
getter: (s) => s.ui.
|
|
76427
|
-
setter: (s, v) => s.ui.
|
|
76424
|
+
getter: (s) => s.ui.panelControlBar,
|
|
76425
|
+
setter: (s, v) => s.ui.panelControlBar = v
|
|
76428
76426
|
}
|
|
76429
76427
|
];
|
|
76430
76428
|
}
|
|
@@ -76459,15 +76457,15 @@ function getAxesPanelSettings() {
|
|
|
76459
76457
|
type: "toggle",
|
|
76460
76458
|
key: SettingsPanelKeys.AxesShowOrthographicButtonToggle,
|
|
76461
76459
|
label: "Orthographic Camera",
|
|
76462
|
-
getter: (s) => s.ui.
|
|
76463
|
-
setter: (s, v) => s.ui.
|
|
76460
|
+
getter: (s) => s.ui.axesOrthographic,
|
|
76461
|
+
setter: (s, v) => s.ui.axesOrthographic = v
|
|
76464
76462
|
},
|
|
76465
76463
|
{
|
|
76466
76464
|
type: "toggle",
|
|
76467
76465
|
key: SettingsPanelKeys.AxesShowResetCameraButtonToggle,
|
|
76468
76466
|
label: "Reset Camera",
|
|
76469
|
-
getter: (s) => s.ui.
|
|
76470
|
-
setter: (s, v) => s.ui.
|
|
76467
|
+
getter: (s) => s.ui.axesHome,
|
|
76468
|
+
setter: (s, v) => s.ui.axesHome = v
|
|
76471
76469
|
}
|
|
76472
76470
|
];
|
|
76473
76471
|
}
|
|
@@ -76503,7 +76501,7 @@ function getWebglSettingsContent(viewer) {
|
|
|
76503
76501
|
function applyWebglSettings(settings2) {
|
|
76504
76502
|
const performance2 = document.getElementsByClassName("vim-performance-div")[0];
|
|
76505
76503
|
if (performance2) {
|
|
76506
|
-
if (isTrue(settings2.ui.
|
|
76504
|
+
if (isTrue(settings2.ui.panelPerformance)) {
|
|
76507
76505
|
performance2.classList.remove("vc-hidden");
|
|
76508
76506
|
} else {
|
|
76509
76507
|
performance2.classList.add("vc-hidden");
|
|
@@ -76550,7 +76548,7 @@ function Viewer$1(props) {
|
|
|
76550
76548
|
const loader = useRef(new ComponentLoader(props.viewer, modal, settings2.value));
|
|
76551
76549
|
useViewerInput(props.viewer.inputs, camera2);
|
|
76552
76550
|
const side = useSideState(
|
|
76553
|
-
isTrue(settings2.value.ui.
|
|
76551
|
+
isTrue(settings2.value.ui.panelBimTree) || isTrue(settings2.value.ui.panelBimInfo),
|
|
76554
76552
|
Math.min(props.container.root.clientWidth * 0.25, 340)
|
|
76555
76553
|
);
|
|
76556
76554
|
const [contextMenu2, setcontextMenu] = useState();
|
|
@@ -76659,12 +76657,12 @@ function Viewer$1(props) {
|
|
|
76659
76657
|
/* @__PURE__ */ jsxRuntimeExports.jsx(RestOfScreen, { side, content: () => {
|
|
76660
76658
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
76661
76659
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Overlay, { canvas: props.viewer.viewport.canvas }),
|
|
76662
|
-
whenTrue(settings2.value.ui.
|
|
76660
|
+
whenTrue(settings2.value.ui.panelLogo, /* @__PURE__ */ jsxRuntimeExports.jsx(LogoMemo, {})),
|
|
76663
76661
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
76664
76662
|
ControlBar,
|
|
76665
76663
|
{
|
|
76666
76664
|
content: controlBar,
|
|
76667
|
-
show: isTrue(settings2.value.ui.
|
|
76665
|
+
show: isTrue(settings2.value.ui.panelControlBar)
|
|
76668
76666
|
}
|
|
76669
76667
|
),
|
|
76670
76668
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionBoxPanel$1, { ref: sectionBoxPanelHandle, state: sectionBoxRef }),
|