@netless/window-manager 0.4.0-canary.25 → 0.4.0-canary.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/window-manager",
3
- "version": "0.4.0-canary.25",
3
+ "version": "0.4.0-canary.26",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "module": "dist/index.es.js",
@@ -1,12 +1,11 @@
1
1
  import { appRegister } from "../Register";
2
- import { debounce, memoize } from "lodash";
2
+ import { debounce } from "lodash";
3
3
  import { emitter } from "../index";
4
4
  import { ScenePathType } from "white-web-sdk";
5
5
  import { v4 } from "uuid";
6
6
  import type { PublicEvent } from "../index";
7
7
  import type { Displayer, ViewVisionMode, Room, View } from "white-web-sdk";
8
8
  import type Emittery from "emittery";
9
- import { log } from "./log";
10
9
  import { ROOT_DIR } from "../constants";
11
10
 
12
11
  export const genAppId = async (kind: string) => {
@@ -101,15 +100,9 @@ export const makeValidScenePath = (displayer: Displayer, scenePath: string, inde
101
100
  };
102
101
 
103
102
  export const entireScenes = (displayer: Displayer) => {
104
- // 缓存 entireScenes 结果, 避免频繁调用
105
- const cacheKey = Math.round(Date.now() / 1000);
106
- return invokeEntireScenes(cacheKey, displayer);
103
+ return displayer.entireScenes();
107
104
  };
108
105
 
109
- const invokeEntireScenes = memoize((cacheKey: number, displayer: Displayer) => {
110
- log("invokeEntireScenes", cacheKey);
111
- return displayer.entireScenes();
112
- });
113
106
 
114
107
  export const isValidScenePath = (scenePath: string) => {
115
108
  return scenePath.startsWith("/");