@netless/window-manager 1.0.0-canary.41 → 1.0.0-canary.42

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.
@@ -232,9 +232,9 @@ export declare class WindowManager extends InvisiblePlugin<WindowMangerAttribute
232
232
  * 关闭 APP
233
233
  */
234
234
  closeApp(appId: string): Promise<void>;
235
- moveCamera: import("lodash").DebouncedFuncLeading<(camera: Partial<Camera> & {
235
+ moveCamera: (camera: Partial<Camera> & {
236
236
  animationMode?: AnimationMode;
237
- }) => void>;
237
+ }) => void;
238
238
  convertToPointInWorld(point: Point): Point;
239
239
  setCameraBound(cameraBound: CameraBound): void;
240
240
  onDestroy(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/window-manager",
3
- "version": "1.0.0-canary.41",
3
+ "version": "1.0.0-canary.42",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
package/src/index.ts CHANGED
@@ -10,7 +10,7 @@ import { emitter } from "./InternalEmitter";
10
10
  import { Fields } from "./AttributesDelegate";
11
11
  import { initDb } from "./Register/storage";
12
12
  import { AnimationMode, InvisiblePlugin, isPlayer, isRoom, RoomPhase, ViewMode } from "white-web-sdk";
13
- import { isEqual, isNull, isObject, isNumber, debounce } from "lodash";
13
+ import { isEqual, isNull, isObject, isNumber } from "lodash";
14
14
  import { log } from "./Utils/log";
15
15
  import { PageStateImpl } from "./PageState";
16
16
  import { ReconnectRefresher } from "./ReconnectRefresher";
@@ -807,8 +807,7 @@ export class WindowManager extends InvisiblePlugin<WindowMangerAttributes> imple
807
807
  return this.appManager?.closeApp(appId);
808
808
  }
809
809
 
810
- public moveCamera = debounce((camera: Partial<Camera> & { animationMode?: AnimationMode } ): void => {
811
- console.log("moveCamera", performance.now());
810
+ public moveCamera = (camera: Partial<Camera> & { animationMode?: AnimationMode } ): void => {
812
811
  const mainViewCamera = { ...this.mainView.camera };
813
812
  const nextCamera = { ...mainViewCamera, ...camera };
814
813
  if (isEqual(nextCamera, mainViewCamera)) return;
@@ -853,7 +852,7 @@ export class WindowManager extends InvisiblePlugin<WindowMangerAttributes> imple
853
852
  this.mainView.callbacks.on("onCameraUpdated", onCameraUpdated);
854
853
 
855
854
  }
856
- }, 400, { leading: true });
855
+ };
857
856
 
858
857
  public convertToPointInWorld(point: Point): Point {
859
858
  return this.mainView.convertToPointInWorld(point);