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

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.
@@ -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 geometry and data.
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;
@@ -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._camera.position, this._camera.target);
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.
@@ -75790,6 +75790,7 @@ Averrage Date/Second ${avgDataRatePS} kb
75790
75790
  const topOffset = useStateRef(1);
75791
75791
  const sideOffset = useStateRef(1);
75792
75792
  const bottomOffset = useStateRef(1);
75793
+ const requestId = React2.useRef(0);
75793
75794
  const boxRef = React2.useRef(adapter.getBox());
75794
75795
  const getSelectionBox = useAsyncFuncRef(adapter.getSelectionBox);
75795
75796
  const getSceneBox = useAsyncFuncRef(adapter.getSceneBox);
@@ -75819,22 +75820,23 @@ Averrage Date/Second ${avgDataRatePS} kb
75819
75820
  if (v) sectionSelection2.call();
75820
75821
  });
75821
75822
  visible2.useOnChange((v) => adapter.setVisible(v));
75822
- const sectionBox2 = useArgActionRef((baseBox) => {
75823
- if (baseBox === void 0) return;
75824
- boxRef.current = baseBox;
75825
- const newBox = addBox(baseBox, offsetsToBox3_(topOffset.get(), sideOffset.get(), bottomOffset.get()));
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()));
75826
75828
  adapter.setBox(newBox);
75827
75829
  });
75828
75830
  const sectionSelection2 = useFuncRef(async () => {
75829
- const currentBox = boxRef.current.clone();
75831
+ const id2 = requestId.current;
75830
75832
  const box = await getSelectionBox.call() ?? await getSceneBox.call();
75831
- if (!currentBox.equals(boxRef.current)) return;
75833
+ if (requestId.current !== id2) return;
75832
75834
  sectionBox2.call(box);
75833
75835
  });
75834
75836
  const sectionScene = useFuncRef(async () => {
75835
- const currentBox = boxRef.current.clone();
75837
+ const id2 = requestId.current;
75836
75838
  const box = await getSceneBox.call();
75837
- if (!currentBox.equals(boxRef.current)) return;
75839
+ if (requestId.current !== id2) return;
75838
75840
  sectionBox2.call(box);
75839
75841
  });
75840
75842
  return {
@@ -76120,7 +76122,9 @@ Averrage Date/Second ${avgDataRatePS} kb
76120
76122
  cmp.dispose = () => {
76121
76123
  viewer.dispose();
76122
76124
  cmpContainer.dispose();
76123
- reactRoot.unmount();
76125
+ queueMicrotask(() => {
76126
+ reactRoot.unmount();
76127
+ });
76124
76128
  };
76125
76129
  return cmp;
76126
76130
  };