@netless/window-manager 0.4.9-canary.0 → 0.4.9
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/CHANGELOG.md +5 -0
- package/dist/AppProxy.d.ts +1 -1
- package/dist/callback.d.ts +2 -1
- package/dist/index.es.js +2 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/docs/api.md +1 -0
- package/package.json +1 -1
- package/src/AppManager.ts +1 -0
- package/src/AppProxy.ts +2 -1
- package/src/callback.ts +2 -1
- package/src/index.ts +2 -3
package/docs/api.md
CHANGED
@@ -252,6 +252,7 @@ manager.callbacks.on(events, listener)
|
|
252
252
|
| canUndoStepsChange | number | | 当前 focus 的 view 可撤销步数改变 |
|
253
253
|
| loadApp | LoadAppEvent | | 加载远程APP 事件 |
|
254
254
|
| ready | undefined | | 当所有 APP 创建完毕时触发 |
|
255
|
+
| sceneStateChange | SceneState | | 当 sceneState 修改时触发 |
|
255
256
|
|
256
257
|
```ts
|
257
258
|
type LoadAppEvent = {
|
package/package.json
CHANGED
package/src/AppManager.ts
CHANGED
package/src/AppProxy.ts
CHANGED
@@ -92,7 +92,7 @@ export class AppProxy {
|
|
92
92
|
|
93
93
|
public getFullScenePath(): string | undefined {
|
94
94
|
if (this.scenePath) {
|
95
|
-
return get(this.appAttributes, [Fields.FullPath]
|
95
|
+
return get(this.appAttributes, [Fields.FullPath]) || this.getFullScenePathFromScenes();
|
96
96
|
}
|
97
97
|
}
|
98
98
|
|
@@ -347,6 +347,7 @@ export class AppProxy {
|
|
347
347
|
if (fullPath && this.view) {
|
348
348
|
setViewFocusScenePath(this.view, fullPath);
|
349
349
|
}
|
350
|
+
return fullPath;
|
350
351
|
}
|
351
352
|
|
352
353
|
private async createView(): Promise<View> {
|
package/src/callback.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import Emittery from "emittery";
|
2
2
|
import type { TeleBoxColorScheme, TELE_BOX_STATE } from "@netless/telebox-insider";
|
3
|
-
import type { CameraState, ViewVisionMode } from "white-web-sdk";
|
3
|
+
import type { CameraState, SceneState, ViewVisionMode } from "white-web-sdk";
|
4
4
|
import type { LoadAppEvent } from "./Register";
|
5
5
|
|
6
6
|
export type PublicEvent = {
|
@@ -17,6 +17,7 @@ export type PublicEvent = {
|
|
17
17
|
canUndoStepsChange: number;
|
18
18
|
loadApp: LoadAppEvent;
|
19
19
|
ready: undefined; // 所有 APP 创建完毕时触发
|
20
|
+
sceneStateChange: SceneState;
|
20
21
|
};
|
21
22
|
|
22
23
|
export type CallbacksType = Emittery<PublicEvent>;
|
package/src/index.ts
CHANGED
@@ -849,12 +849,11 @@ export class WindowManager extends InvisiblePlugin<WindowMangerAttributes> {
|
|
849
849
|
if (!this.attributes[Fields.Cursors]) {
|
850
850
|
this.safeSetAttributes({ [Fields.Cursors]: {} });
|
851
851
|
}
|
852
|
-
const sceneState = this.displayer.state.sceneState;
|
853
852
|
if (!this.attributes["_mainScenePath"]) {
|
854
|
-
this.safeSetAttributes({ _mainScenePath:
|
853
|
+
this.safeSetAttributes({ _mainScenePath: ROOT_DIR });
|
855
854
|
}
|
856
855
|
if (!this.attributes["_mainSceneIndex"]) {
|
857
|
-
this.safeSetAttributes({ _mainSceneIndex:
|
856
|
+
this.safeSetAttributes({ _mainSceneIndex: 0 });
|
858
857
|
}
|
859
858
|
}
|
860
859
|
}
|