vim-web 0.3.44-dev.26 → 0.3.44-dev.27

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.
@@ -3,7 +3,7 @@ import { RpcSafeClient } from "../rpcSafeClient";
3
3
  import { ViewerSelection } from "../selection";
4
4
  import { InputHandler } from "./inputHandler";
5
5
  import { Inputs } from "./inputs";
6
- export declare class InputKeyboard extends InputHandler {
6
+ export declare class KeyboardHandler extends InputHandler {
7
7
  private readonly _rpc;
8
8
  private readonly _selection;
9
9
  private _camera;
@@ -2,7 +2,7 @@ import { InputHandler } from "./inputHandler";
2
2
  import { RpcSafeClient } from "../rpcSafeClient";
3
3
  import { ViewerSelection } from "../selection";
4
4
  import { ICamera } from "../camera";
5
- export declare class InputMouse extends InputHandler {
5
+ export declare class MouseHandler extends InputHandler {
6
6
  private readonly _rpc;
7
7
  private readonly _canvas;
8
8
  private _lastMouseDownPosition;
@@ -1,6 +1,6 @@
1
1
  import { InputHandler } from "./inputHandler";
2
2
  import { RpcSafeClient } from "../rpcSafeClient";
3
- export declare class InputTouch extends InputHandler {
3
+ export declare class TouchHandler extends InputHandler {
4
4
  private readonly _rpc;
5
5
  private readonly _canvas;
6
6
  private _lastTouchStartPosition;
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import { Viewer } from '../viewer';
5
5
  /**
6
+ * TODO: Use the same code for ULTRA and webgl.
6
7
  * Base class for various input handlers.
7
8
  * It provides convenience to register to and unregister from events.
8
9
  */
@@ -51298,7 +51298,7 @@ void main() {
51298
51298
  KEY_Z: 90
51299
51299
  };
51300
51300
  const KeySet = new Set(Object.values(KEYS));
51301
- class KeyboardHandler extends InputHandler$1 {
51301
+ let KeyboardHandler$1 = class KeyboardHandler extends InputHandler$1 {
51302
51302
  constructor() {
51303
51303
  super(...arguments);
51304
51304
  // Settings
@@ -51404,7 +51404,7 @@ void main() {
51404
51404
  this.camera.localVelocity = move;
51405
51405
  }
51406
51406
  }
51407
- }
51407
+ };
51408
51408
  class SimpleInstanceSubmesh {
51409
51409
  constructor(mesh, index2) {
51410
51410
  __publicField(this, "mesh");
@@ -51653,7 +51653,7 @@ void main() {
51653
51653
  return this.raycast.object;
51654
51654
  }
51655
51655
  }
51656
- class TouchHandler extends InputHandler$1 {
51656
+ let TouchHandler$1 = class TouchHandler extends InputHandler$1 {
51657
51657
  constructor(viewer) {
51658
51658
  super(viewer);
51659
51659
  __publicField(this, "TAP_DURATION_MS", 500);
@@ -51806,8 +51806,8 @@ void main() {
51806
51806
  average(p1, p2) {
51807
51807
  return p1.clone().lerp(p2, 0.5);
51808
51808
  }
51809
- }
51810
- class MouseHandler extends InputHandler$1 {
51809
+ };
51810
+ let MouseHandler$1 = class MouseHandler extends InputHandler$1 {
51811
51811
  constructor(viewer) {
51812
51812
  super(viewer);
51813
51813
  __publicField(this, "_idleDelayMs", 150);
@@ -51907,7 +51907,6 @@ void main() {
51907
51907
  this.inputs.pointerOverride = void 0;
51908
51908
  });
51909
51909
  __publicField(this, "onDoubleClick", (event) => {
51910
- console.log("Double click");
51911
51910
  event.stopImmediatePropagation();
51912
51911
  this.onMouseClick(
51913
51912
  new Vector2(event.offsetX, event.offsetY),
@@ -52060,7 +52059,7 @@ void main() {
52060
52059
  this.gizmoRect.setCorners(this._downPosition, this._lastPosition);
52061
52060
  }
52062
52061
  }
52063
- }
52062
+ };
52064
52063
  var dist = {};
52065
52064
  var SimpleEventDispatcher = {};
52066
52065
  var hasRequiredSimpleEventDispatcher;
@@ -52330,9 +52329,9 @@ void main() {
52330
52329
  this.touch.unregister();
52331
52330
  });
52332
52331
  this._viewer = viewer;
52333
- this.keyboard = new KeyboardHandler(viewer);
52334
- this.mouse = new MouseHandler(viewer);
52335
- this.touch = new TouchHandler(viewer);
52332
+ this.keyboard = new KeyboardHandler$1(viewer);
52333
+ this.mouse = new MouseHandler$1(viewer);
52334
+ this.touch = new TouchHandler$1(viewer);
52336
52335
  this._scheme = new DefaultInputScheme(viewer);
52337
52336
  this.pointerActive = viewer.settings.camera.controls.orbit ? "orbit" : "look";
52338
52337
  this._pointerFallback = viewer.settings.camera.controls.orbit ? "look" : "orbit";
@@ -54898,7 +54897,6 @@ void main() {
54898
54897
  * Disposes all resources.
54899
54898
  */
54900
54899
  dispose() {
54901
- console.log("dispose");
54902
54900
  if (this._animId !== void 0) cancelAnimationFrame(this._animId);
54903
54901
  this._html.div.remove();
54904
54902
  this._viewer.renderer.remove(this._group);
@@ -57663,7 +57661,7 @@ void main() {
57663
57661
  }
57664
57662
  }
57665
57663
  }
57666
- class InputMouse extends InputHandler {
57664
+ class MouseHandler extends InputHandler {
57667
57665
  constructor(canvas, rpc, selection, camera2) {
57668
57666
  super();
57669
57667
  __publicField(this, "_rpc");
@@ -57760,7 +57758,7 @@ void main() {
57760
57758
  );
57761
57759
  }
57762
57760
  }
57763
- class InputTouch extends InputHandler {
57761
+ class TouchHandler extends InputHandler {
57764
57762
  constructor(canvas, rpc) {
57765
57763
  super();
57766
57764
  __publicField(this, "_rpc");
@@ -59689,7 +59687,7 @@ void main() {
59689
59687
  "Control",
59690
59688
  "Shift"
59691
59689
  ]);
59692
- class InputKeyboard extends InputHandler {
59690
+ class KeyboardHandler extends InputHandler {
59693
59691
  constructor(rpc, selection, camera2, inputs) {
59694
59692
  super();
59695
59693
  __publicField(this, "_rpc");
@@ -59771,9 +59769,9 @@ void main() {
59771
59769
  this._canvas = canvas;
59772
59770
  this._rpc = rpc;
59773
59771
  this._renderer = renderer;
59774
- this._inputsMouse = new InputMouse(this._canvas, this._rpc, selection, camera2);
59775
- this._inputsTouch = new InputTouch(this._canvas, this._rpc);
59776
- this._keyboard = new InputKeyboard(this._rpc, selection, camera2, this);
59772
+ this._inputsMouse = new MouseHandler(this._canvas, this._rpc, selection, camera2);
59773
+ this._inputsTouch = new TouchHandler(this._canvas, this._rpc);
59774
+ this._keyboard = new KeyboardHandler(this._rpc, selection, camera2, this);
59777
59775
  }
59778
59776
  onConnect() {
59779
59777
  this.register();
@@ -61028,7 +61026,6 @@ Averrage Date/Second ${avgDataRatePS} kb
61028
61026
  * Cleans up resources by removing resize observer and clearing timeouts
61029
61027
  */
61030
61028
  dispose() {
61031
- console.log("Disposing Viewport");
61032
61029
  this._clearTimeout();
61033
61030
  this._observer.disconnect();
61034
61031
  }
@@ -61311,7 +61308,6 @@ Averrage Date/Second ${avgDataRatePS} kb
61311
61308
  * @returns Promise that resolves when the framing animation is complete
61312
61309
  */
61313
61310
  async frameAll(blendTime = this._defaultBlendTime) {
61314
- console.log("Camera.frameAll");
61315
61311
  const segment = await this._rpc.RPCFrameAll(blendTime);
61316
61312
  this._savedPosition = this._savedPosition ?? segment;
61317
61313
  return segment;
@@ -61322,7 +61318,6 @@ Averrage Date/Second ${avgDataRatePS} kb
61322
61318
  * @param blendTime - Duration of the camera animation in seconds (defaults to 0.5)
61323
61319
  */
61324
61320
  async frameBox(box, blendTime = this._defaultBlendTime) {
61325
- console.log("Camera.frameAll");
61326
61321
  const segment = await this._rpc.RPCFrameBox(box, blendTime);
61327
61322
  this._savedPosition = this._savedPosition ?? segment;
61328
61323
  return segment;
@@ -75987,7 +75982,6 @@ Averrage Date/Second ${avgDataRatePS} kb
75987
75982
  }, []);
75988
75983
  const reset = useActionRef(() => adapter.resetCamera(1));
75989
75984
  const frameSelection2 = useAsyncFuncRef(async () => {
75990
- console.log("frameSelection");
75991
75985
  if (!adapter.hasSelection()) {
75992
75986
  frameScene.call();
75993
75987
  return;