@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.
- package/dist/index.cjs.js +7 -7
- package/dist/index.es.js +3 -4
- package/dist/index.umd.js +1 -1
- package/dist/src/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/index.ts +3 -4
package/dist/src/index.d.ts
CHANGED
@@ -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:
|
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
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
|
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 =
|
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
|
-
}
|
855
|
+
};
|
857
856
|
|
858
857
|
public convertToPointInWorld(point: Point): Point {
|
859
858
|
return this.mainView.convertToPointInWorld(point);
|