vim-web 0.3.44-dev.37 → 0.3.44-dev.39
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/ultra/viewer/sectionBox.d.ts +1 -1
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBox.d.ts +4 -5
- package/dist/types/react-viewers/state/sectionBoxState.d.ts +1 -1
- package/dist/vim-web.iife.js +22 -16
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +22 -16
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
|
@@ -57,11 +57,10 @@ export declare class SectionBox {
|
|
|
57
57
|
*/
|
|
58
58
|
constructor(viewer: Viewer);
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* To programmatically update the box, see {@link fitBox}.
|
|
60
|
+
* Returns a copy of the current section box.
|
|
61
|
+
* To programmatically update the box, see {@link setBox}.
|
|
63
62
|
*/
|
|
64
|
-
|
|
63
|
+
getBox(): THREE.Box3;
|
|
65
64
|
/**
|
|
66
65
|
* Determines whether the section gizmo applies clipping planes to the model.
|
|
67
66
|
*
|
|
@@ -88,7 +87,7 @@ export declare class SectionBox {
|
|
|
88
87
|
* @param box - The bounding box to match (required).
|
|
89
88
|
* @param padding - The scalar amount by which to expand the bounding box. Default is `1`.
|
|
90
89
|
*/
|
|
91
|
-
|
|
90
|
+
setBox(box: THREE.Box3): void;
|
|
92
91
|
/**
|
|
93
92
|
* Updates the section box to match the current size of `this.section.box`.
|
|
94
93
|
*
|
|
@@ -24,7 +24,7 @@ export interface SectionBoxAdapter {
|
|
|
24
24
|
setClip: (b: boolean) => void;
|
|
25
25
|
setVisible: (visible: boolean) => void;
|
|
26
26
|
getBox: () => THREE.Box3;
|
|
27
|
-
|
|
27
|
+
setBox: (box: THREE.Box3) => void;
|
|
28
28
|
getSelectionBox: () => Promise<THREE.Box3 | undefined>;
|
|
29
29
|
getRendererBox: () => Promise<THREE.Box3>;
|
|
30
30
|
onSelectionChanged: ISignal;
|
package/dist/vim-web.iife.js
CHANGED
|
@@ -55733,12 +55733,12 @@ void main() {
|
|
|
55733
55733
|
// Public Properties
|
|
55734
55734
|
// -------------------------------------------------------------------------
|
|
55735
55735
|
/**
|
|
55736
|
-
*
|
|
55737
|
-
*
|
|
55738
|
-
* To programmatically update the box, see {@link fitBox}.
|
|
55736
|
+
* Returns a copy of the current section box.
|
|
55737
|
+
* To programmatically update the box, see {@link setBox}.
|
|
55739
55738
|
*/
|
|
55740
|
-
|
|
55741
|
-
|
|
55739
|
+
getBox() {
|
|
55740
|
+
var _a2;
|
|
55741
|
+
return (_a2 = this.section.box) == null ? void 0 : _a2.clone();
|
|
55742
55742
|
}
|
|
55743
55743
|
/**
|
|
55744
55744
|
* Determines whether the section gizmo applies clipping planes to the model.
|
|
@@ -55800,12 +55800,12 @@ void main() {
|
|
|
55800
55800
|
* @param box - The bounding box to match (required).
|
|
55801
55801
|
* @param padding - The scalar amount by which to expand the bounding box. Default is `1`.
|
|
55802
55802
|
*/
|
|
55803
|
-
|
|
55803
|
+
setBox(box) {
|
|
55804
55804
|
if (!box) return;
|
|
55805
55805
|
box = safeBox(box);
|
|
55806
55806
|
this._gizmos.fitBox(box);
|
|
55807
55807
|
this.renderer.section.fitBox(box);
|
|
55808
|
-
this._onBoxConfirm.dispatch(
|
|
55808
|
+
this._onBoxConfirm.dispatch(box);
|
|
55809
55809
|
this.renderer.needsUpdate = true;
|
|
55810
55810
|
}
|
|
55811
55811
|
/**
|
|
@@ -55814,7 +55814,7 @@ void main() {
|
|
|
55814
55814
|
* Call this if the renderer's section box is changed by code outside this class.
|
|
55815
55815
|
*/
|
|
55816
55816
|
update() {
|
|
55817
|
-
this.
|
|
55817
|
+
this.setBox(this.section.box);
|
|
55818
55818
|
this.renderer.needsUpdate = true;
|
|
55819
55819
|
}
|
|
55820
55820
|
/**
|
|
@@ -59215,7 +59215,12 @@ void main() {
|
|
|
59215
59215
|
this.rpc.RPCEnableSectionBox(enable);
|
|
59216
59216
|
}
|
|
59217
59217
|
RPCSetSectionBox(state) {
|
|
59218
|
-
this.rpc.RPCSetSectionBox(
|
|
59218
|
+
this.rpc.RPCSetSectionBox(
|
|
59219
|
+
{
|
|
59220
|
+
...state,
|
|
59221
|
+
box: state.box ?? new Box3(new Vector3(), new Vector3())
|
|
59222
|
+
}
|
|
59223
|
+
);
|
|
59219
59224
|
}
|
|
59220
59225
|
async RPCGetSectionBox() {
|
|
59221
59226
|
return await this.safeCall(
|
|
@@ -61837,7 +61842,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61837
61842
|
__publicField(this, "_visible", false);
|
|
61838
61843
|
__publicField(this, "_interactible", false);
|
|
61839
61844
|
__publicField(this, "_clip", false);
|
|
61840
|
-
__publicField(this, "_box"
|
|
61845
|
+
__publicField(this, "_box");
|
|
61841
61846
|
__publicField(this, "_rpc");
|
|
61842
61847
|
__publicField(this, "_interval");
|
|
61843
61848
|
__publicField(this, "_animationFrame");
|
|
@@ -61921,7 +61926,8 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61921
61926
|
this.scheduleUpdate();
|
|
61922
61927
|
}
|
|
61923
61928
|
getBox() {
|
|
61924
|
-
|
|
61929
|
+
var _a2;
|
|
61930
|
+
return (_a2 = this._box) == null ? void 0 : _a2.clone();
|
|
61925
61931
|
}
|
|
61926
61932
|
dispose() {
|
|
61927
61933
|
clearInterval(this._interval);
|
|
@@ -75933,7 +75939,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75933
75939
|
if (baseBox === void 0) return;
|
|
75934
75940
|
boxRef.current = baseBox;
|
|
75935
75941
|
const newBox = addBox(baseBox, offsetsToBox3(topOffset.get(), sideOffset.get(), bottomOffset.get()));
|
|
75936
|
-
adapter.
|
|
75942
|
+
adapter.setBox(newBox);
|
|
75937
75943
|
});
|
|
75938
75944
|
const sectionSelection = useFuncRef(async () => {
|
|
75939
75945
|
try {
|
|
@@ -75990,8 +75996,8 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75990
75996
|
viewer.gizmos.sectionBox.visible = b;
|
|
75991
75997
|
viewer.gizmos.sectionBox.interactive = b;
|
|
75992
75998
|
},
|
|
75993
|
-
getBox: () => viewer.gizmos.sectionBox.
|
|
75994
|
-
|
|
75999
|
+
getBox: () => viewer.gizmos.sectionBox.getBox(),
|
|
76000
|
+
setBox: (box) => viewer.gizmos.sectionBox.setBox(box),
|
|
75995
76001
|
getSelectionBox: () => Promise.resolve(viewer.selection.getBoundingBox()),
|
|
75996
76002
|
getRendererBox: () => Promise.resolve(viewer.renderer.getBoundingBox()),
|
|
75997
76003
|
onSelectionChanged: viewer.selection.onValueChanged
|
|
@@ -76551,8 +76557,8 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76551
76557
|
viewer.sectionBox.visible = b;
|
|
76552
76558
|
viewer.sectionBox.interactive = b;
|
|
76553
76559
|
},
|
|
76554
|
-
getBox: () => viewer.sectionBox.getBox()
|
|
76555
|
-
|
|
76560
|
+
getBox: () => viewer.sectionBox.getBox(),
|
|
76561
|
+
setBox: (box) => viewer.sectionBox.fitBox(box),
|
|
76556
76562
|
getSelectionBox: () => viewer.selection.getBoundingBox(),
|
|
76557
76563
|
getRendererBox: () => viewer.renderer.getBoundingBox(),
|
|
76558
76564
|
onSelectionChanged: viewer.selection.onValueChanged
|