vim-web 0.4.1-dev.1 → 0.4.1-dev.3
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.
|
@@ -37,7 +37,8 @@ export declare class Element3D implements IVimElement {
|
|
|
37
37
|
set color(color: RGBA32 | undefined);
|
|
38
38
|
/**
|
|
39
39
|
* Computes and returns the bounding box of the element.
|
|
40
|
+
* Returns undefined if the element is abstract.
|
|
40
41
|
* @returns A promise resolving to the element's bounding box.
|
|
41
42
|
*/
|
|
42
|
-
getBoundingBox(): Promise<Box3>;
|
|
43
|
+
getBoundingBox(): Promise<Box3 | undefined>;
|
|
43
44
|
}
|
|
@@ -7,7 +7,7 @@ import { IElement, VimHelpers } from 'vim-format';
|
|
|
7
7
|
import { Submesh } from './mesh';
|
|
8
8
|
import { IVimElement } from '../../shared/vim';
|
|
9
9
|
/**
|
|
10
|
-
* High level api to interact with the loaded vim
|
|
10
|
+
* High level api to interact with the loaded vim ometry and data.
|
|
11
11
|
*/
|
|
12
12
|
export declare class Element3D implements IVimElement {
|
|
13
13
|
private _color;
|
|
@@ -87,7 +87,7 @@ export declare class Element3D implements IVimElement {
|
|
|
87
87
|
getBimParameters(): Promise<VimHelpers.ElementParameter[]>;
|
|
88
88
|
/**
|
|
89
89
|
* Retrieves the bounding box of the object from cache or computes it if needed.
|
|
90
|
-
* Returns undefined if the
|
|
90
|
+
* Returns undefined if the element is abstract.
|
|
91
91
|
* @returns {THREE.Box3 | undefined} The bounding box of the object, or undefined if the object has no geometry.
|
|
92
92
|
*/
|
|
93
93
|
getBoundingBox(): Promise<THREE.Box3>;
|
package/dist/vim-web.iife.js
CHANGED
|
@@ -45597,7 +45597,7 @@ void main() {
|
|
|
45597
45597
|
}
|
|
45598
45598
|
/**
|
|
45599
45599
|
* Retrieves the bounding box of the object from cache or computes it if needed.
|
|
45600
|
-
* Returns undefined if the
|
|
45600
|
+
* Returns undefined if the element is abstract.
|
|
45601
45601
|
* @returns {THREE.Box3 | undefined} The bounding box of the object, or undefined if the object has no geometry.
|
|
45602
45602
|
*/
|
|
45603
45603
|
async getBoundingBox() {
|
|
@@ -50306,7 +50306,7 @@ void main() {
|
|
|
50306
50306
|
* Resets the camera to its last saved position and orientation.
|
|
50307
50307
|
*/
|
|
50308
50308
|
reset() {
|
|
50309
|
-
this.set(this.
|
|
50309
|
+
this.set(this._savedState.position, this._savedState.target);
|
|
50310
50310
|
}
|
|
50311
50311
|
/**
|
|
50312
50312
|
* Sets the camera's orientation and position to focus on the specified target.
|
|
@@ -61008,6 +61008,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61008
61008
|
}
|
|
61009
61009
|
/**
|
|
61010
61010
|
* Computes and returns the bounding box of the element.
|
|
61011
|
+
* Returns undefined if the element is abstract.
|
|
61011
61012
|
* @returns A promise resolving to the element's bounding box.
|
|
61012
61013
|
*/
|
|
61013
61014
|
async getBoundingBox() {
|
|
@@ -75789,6 +75790,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75789
75790
|
const topOffset = useStateRef(1);
|
|
75790
75791
|
const sideOffset = useStateRef(1);
|
|
75791
75792
|
const bottomOffset = useStateRef(1);
|
|
75793
|
+
const requestId = React2.useRef(0);
|
|
75792
75794
|
const boxRef = React2.useRef(adapter.getBox());
|
|
75793
75795
|
const getSelectionBox = useAsyncFuncRef(adapter.getSelectionBox);
|
|
75794
75796
|
const getSceneBox = useAsyncFuncRef(adapter.getSceneBox);
|
|
@@ -75818,18 +75820,23 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75818
75820
|
if (v) sectionSelection2.call();
|
|
75819
75821
|
});
|
|
75820
75822
|
visible2.useOnChange((v) => adapter.setVisible(v));
|
|
75821
|
-
const sectionBox2 = useArgActionRef((
|
|
75822
|
-
if (
|
|
75823
|
-
|
|
75824
|
-
|
|
75823
|
+
const sectionBox2 = useArgActionRef((box) => {
|
|
75824
|
+
if (box === void 0) return;
|
|
75825
|
+
requestId.current++;
|
|
75826
|
+
boxRef.current = box;
|
|
75827
|
+
const newBox = addBox(box, offsetsToBox3_(topOffset.get(), sideOffset.get(), bottomOffset.get()));
|
|
75825
75828
|
adapter.setBox(newBox);
|
|
75826
75829
|
});
|
|
75827
75830
|
const sectionSelection2 = useFuncRef(async () => {
|
|
75831
|
+
const id2 = requestId.current;
|
|
75828
75832
|
const box = await getSelectionBox.call() ?? await getSceneBox.call();
|
|
75833
|
+
if (requestId.current !== id2) return;
|
|
75829
75834
|
sectionBox2.call(box);
|
|
75830
75835
|
});
|
|
75831
75836
|
const sectionScene = useFuncRef(async () => {
|
|
75837
|
+
const id2 = requestId.current;
|
|
75832
75838
|
const box = await getSceneBox.call();
|
|
75839
|
+
if (requestId.current !== id2) return;
|
|
75833
75840
|
sectionBox2.call(box);
|
|
75834
75841
|
});
|
|
75835
75842
|
return {
|