vim-web 0.3.44-dev.23 → 0.3.44-dev.25

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.
@@ -9,6 +9,7 @@ export interface IViewerSelection {
9
9
  add(vim: Vim, node: number | number[]): void;
10
10
  remove(vim: Vim, node: number | number[]): void;
11
11
  clear(vim?: Vim): void;
12
+ get(): ReadonlyMap<Vim, ReadonlySet<number>>;
12
13
  }
13
14
  /**
14
15
  * Represents the result of a hit test operation.
@@ -32,6 +33,7 @@ export declare class ViewerSelection implements IViewerSelection {
32
33
  private _selectedNodes;
33
34
  private _onValueChanged;
34
35
  get onValueChanged(): import("ste-signals").ISignal;
36
+ get(): ReadonlyMap<Vim, ReadonlySet<number>>;
35
37
  /**
36
38
  * Creates a new ViewerSelection instance.
37
39
  * @param rpc - RPC client for communication with the viewer.
@@ -20,6 +20,7 @@ export interface SectionBoxRef {
20
20
  bottomOffset: StateRef<string>;
21
21
  }
22
22
  export interface SectionBoxAdapter {
23
+ setClip: (b: boolean) => void;
23
24
  setVisible: (visible: boolean) => void;
24
25
  getBox: () => THREE.Box3;
25
26
  fitBox: (box: THREE.Box3) => void;
@@ -61354,6 +61354,9 @@ Averrage Date/Second ${avgDataRatePS} kb
61354
61354
  get onValueChanged() {
61355
61355
  return this._onValueChanged.asEvent();
61356
61356
  }
61357
+ get() {
61358
+ return this._selectedNodes;
61359
+ }
61357
61360
  /**
61358
61361
  * Gets the total number of selected nodes across all VIMs.
61359
61362
  * @returns The total count of selected nodes.
@@ -75864,6 +75867,13 @@ Averrage Date/Second ${avgDataRatePS} kb
75864
75867
  const sideOffset = useStateRef("1");
75865
75868
  const bottomOffset = useStateRef("1");
75866
75869
  const boxRef = React2.useRef(adapter.getBox());
75870
+ React2.useEffect(() => {
75871
+ adapter.setClip(true);
75872
+ adapter.setVisible(false);
75873
+ return adapter.onSelectionChanged.sub(() => {
75874
+ if (auto.get() && enable.get()) sectionSelection.call();
75875
+ });
75876
+ }, []);
75867
75877
  enable.useOnChange((v) => {
75868
75878
  visible2.set(v);
75869
75879
  showOffsetPanel.set(false);
@@ -75885,12 +75895,6 @@ Averrage Date/Second ${avgDataRatePS} kb
75885
75895
  if (v) sectionSelection.call();
75886
75896
  });
75887
75897
  visible2.useOnChange((v) => adapter.setVisible(v));
75888
- React2.useEffect(() => {
75889
- adapter.setVisible(false);
75890
- return adapter.onSelectionChanged.sub(() => {
75891
- if (auto.get() && enable.get()) sectionSelection.call();
75892
- });
75893
- }, []);
75894
75898
  const section = useArgActionRef((baseBox) => {
75895
75899
  boxRef.current = baseBox;
75896
75900
  const newBox = addBox(baseBox, offsetsToBox3(topOffset.get(), sideOffset.get(), bottomOffset.get()));
@@ -75943,10 +75947,12 @@ Averrage Date/Second ${avgDataRatePS} kb
75943
75947
  }
75944
75948
  function useWebglSectionBox(viewer) {
75945
75949
  const vimAdapter = {
75950
+ setClip: (b) => {
75951
+ viewer.gizmos.sectionBox.clip = b;
75952
+ },
75946
75953
  setVisible: (b) => {
75947
75954
  viewer.gizmos.sectionBox.visible = b;
75948
75955
  viewer.gizmos.sectionBox.interactive = b;
75949
- viewer.gizmos.sectionBox.clip = b;
75950
75956
  },
75951
75957
  getBox: () => viewer.gizmos.sectionBox.box.clone(),
75952
75958
  fitBox: (box) => viewer.gizmos.sectionBox.fitBox(box),
@@ -76492,11 +76498,12 @@ Averrage Date/Second ${avgDataRatePS} kb
76492
76498
  }
76493
76499
  function useUltraSectionBox(viewer) {
76494
76500
  const ultraAdapter = {
76501
+ setClip: (b) => {
76502
+ viewer.sectionBox.clip = b;
76503
+ },
76495
76504
  setVisible: (b) => {
76496
- console.log("SetVisible!", b);
76497
76505
  viewer.sectionBox.visible = b;
76498
76506
  viewer.sectionBox.interactive = b;
76499
- viewer.sectionBox.clip = b;
76500
76507
  },
76501
76508
  getBox: () => viewer.sectionBox.getBox().clone(),
76502
76509
  fitBox: (box) => viewer.sectionBox.fitBox(box),