vim-web 0.4.1-dev.1 → 0.4.1-dev.2

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
  }
@@ -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 object has no geometry.
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>;
@@ -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 object has no geometry.
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() {
@@ -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() {
@@ -75825,11 +75826,15 @@ Averrage Date/Second ${avgDataRatePS} kb
75825
75826
  adapter.setBox(newBox);
75826
75827
  });
75827
75828
  const sectionSelection2 = useFuncRef(async () => {
75829
+ const currentBox = boxRef.current.clone();
75828
75830
  const box = await getSelectionBox.call() ?? await getSceneBox.call();
75831
+ if (!currentBox.equals(boxRef.current)) return;
75829
75832
  sectionBox2.call(box);
75830
75833
  });
75831
75834
  const sectionScene = useFuncRef(async () => {
75835
+ const currentBox = boxRef.current.clone();
75832
75836
  const box = await getSceneBox.call();
75837
+ if (!currentBox.equals(boxRef.current)) return;
75833
75838
  sectionBox2.call(box);
75834
75839
  });
75835
75840
  return {