vim-web 0.3.42-dev.9 → 0.3.43
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/types/core-viewers/webgl/viewer/rendering/renderScene.d.ts +1 -0
- package/dist/types/core-viewers/webgl/viewer/rendering/renderer.d.ts +2 -0
- package/dist/types/react-viewers/settings/settings.d.ts +1 -0
- package/dist/vim-web.iife.js +24 -3
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +24 -3
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
package/dist/vim-web.js
CHANGED
|
@@ -45701,9 +45701,15 @@ class Object3D2 {
|
|
|
45701
45701
|
return this._visibleAttribute.value;
|
|
45702
45702
|
}
|
|
45703
45703
|
set visible(value) {
|
|
45704
|
+
var _a2;
|
|
45704
45705
|
if (this._visibleAttribute.apply(value)) {
|
|
45705
45706
|
this.vim.scene.setDirty();
|
|
45706
45707
|
}
|
|
45708
|
+
if (value) {
|
|
45709
|
+
(_a2 = this._meshes) == null ? void 0 : _a2.forEach((m) => {
|
|
45710
|
+
m.mesh.mesh.visible = true;
|
|
45711
|
+
});
|
|
45712
|
+
}
|
|
45707
45713
|
}
|
|
45708
45714
|
/**
|
|
45709
45715
|
* Gets or sets the display color of this object.
|
|
@@ -52764,6 +52770,8 @@ class RenderScene {
|
|
|
52764
52770
|
__publicField(this, "scene");
|
|
52765
52771
|
// state
|
|
52766
52772
|
__publicField(this, "boxUpdated", false);
|
|
52773
|
+
// public value
|
|
52774
|
+
__publicField(this, "smallGhostThreshold", 10);
|
|
52767
52775
|
__publicField(this, "_vimScenes", []);
|
|
52768
52776
|
__publicField(this, "_boundingBox");
|
|
52769
52777
|
__publicField(this, "_memory", 0);
|
|
@@ -52818,6 +52826,7 @@ class RenderScene {
|
|
|
52818
52826
|
add(target) {
|
|
52819
52827
|
if (target instanceof Scene2) {
|
|
52820
52828
|
this.addScene(target);
|
|
52829
|
+
target.material = this._modelMaterial;
|
|
52821
52830
|
return;
|
|
52822
52831
|
}
|
|
52823
52832
|
this._2dCount += this.count2dObjects(target);
|
|
@@ -52882,10 +52891,14 @@ class RenderScene {
|
|
|
52882
52891
|
const hide = ((_b2 = (_a2 = this._modelMaterial) == null ? void 0 : _a2[1]) == null ? void 0 : _b2.userData.isGhost) === true;
|
|
52883
52892
|
for (const mesh of this.meshes) {
|
|
52884
52893
|
if (mesh instanceof InstancedMesh2) {
|
|
52894
|
+
if (this.smallGhostThreshold <= 0) {
|
|
52895
|
+
mesh.mesh.visible = true;
|
|
52896
|
+
continue;
|
|
52897
|
+
}
|
|
52885
52898
|
const visible2 = mesh.getSubmeshes().some(
|
|
52886
52899
|
(m) => m.object.visible
|
|
52887
52900
|
);
|
|
52888
|
-
mesh.mesh.visible = !(hide && !visible2 && mesh.size <
|
|
52901
|
+
mesh.mesh.visible = !(hide && !visible2 && mesh.size < this.smallGhostThreshold);
|
|
52889
52902
|
}
|
|
52890
52903
|
}
|
|
52891
52904
|
}
|
|
@@ -56562,6 +56575,12 @@ let Renderer$1 = class Renderer {
|
|
|
56562
56575
|
this._renderText = value;
|
|
56563
56576
|
this.textRenderer.domElement.style.display = value ? "block" : "none";
|
|
56564
56577
|
}
|
|
56578
|
+
get smallGhostThreshold() {
|
|
56579
|
+
return this._scene.smallGhostThreshold;
|
|
56580
|
+
}
|
|
56581
|
+
set smallGhostThreshold(value) {
|
|
56582
|
+
this._scene.smallGhostThreshold = value;
|
|
56583
|
+
}
|
|
56565
56584
|
/**
|
|
56566
56585
|
* Returns the bounding box encompassing all rendered objects.
|
|
56567
56586
|
* @param target - Box in which to copy the result. A new instance is created if undefined.
|
|
@@ -66850,7 +66869,8 @@ function anyUiSettingButton(settings2) {
|
|
|
66850
66869
|
const defaultSettings = {
|
|
66851
66870
|
materials: {
|
|
66852
66871
|
useFastMaterial: false,
|
|
66853
|
-
useGhostMaterial: true
|
|
66872
|
+
useGhostMaterial: true,
|
|
66873
|
+
smallGhostThreshold: 10
|
|
66854
66874
|
},
|
|
66855
66875
|
isolation: {
|
|
66856
66876
|
enable: true
|
|
@@ -74312,6 +74332,7 @@ function applySettings(viewer, settings2) {
|
|
|
74312
74332
|
performance2.classList.add("vc-hidden");
|
|
74313
74333
|
}
|
|
74314
74334
|
}
|
|
74335
|
+
viewer.renderer.smallGhostThreshold = settings2.materials.smallGhostThreshold;
|
|
74315
74336
|
}
|
|
74316
74337
|
class Isolation {
|
|
74317
74338
|
/**
|
|
@@ -75682,7 +75703,7 @@ function updateModal(modal, state) {
|
|
|
75682
75703
|
}
|
|
75683
75704
|
if (state.status === "connecting") {
|
|
75684
75705
|
if (modal.current === void 0 || modal.current.type === "loading") {
|
|
75685
|
-
modal.loading({ message: "
|
|
75706
|
+
modal.loading({ message: "Initializing..." });
|
|
75686
75707
|
}
|
|
75687
75708
|
}
|
|
75688
75709
|
if (state.status === "error") {
|