@bimdata/viewer 2.0.0-beta.14 → 2.0.0-beta.16

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@bimdata/viewer",
3
3
  "type": "module",
4
- "version": "2.0.0-beta.14",
4
+ "version": "2.0.0-beta.16",
5
5
  "description": "A customizable BIM viewer.",
6
6
  "keywords": [
7
7
  "bim",
@@ -68,7 +68,7 @@
68
68
  "@semantic-release/release-notes-generator": "^11.0.1",
69
69
  "@vitejs/plugin-vue": "4.2.3",
70
70
  "@vue/vue3-jest": "29.2.4",
71
- "@xeokit/xeokit-sdk": "git+https://git@github.com/Amoki/xeokit-sdk.git#7d1a4afb04b1394f33573ac16f719bc3d8d5acb4",
71
+ "@xeokit/xeokit-sdk": "git+https://git@github.com/Amoki/xeokit-sdk.git#5b4200d43f0b9380ae2428f0ac6600ef114b8de0",
72
72
  "async": "^3.2.4",
73
73
  "autoprefixer": "^10.4.14",
74
74
  "babel-core": "^7.0.0-bridge.0",
package/types/api.d.ts CHANGED
@@ -57,7 +57,7 @@ declare namespace BDV {
57
57
  model: StateModel;
58
58
  parent: StateObject;
59
59
  children: ApiObject[];
60
-
60
+
61
61
  /** @deprecated use `model` instead */
62
62
  ifc: StateModel;
63
63
  }
@@ -77,25 +77,25 @@ declare namespace BDV {
77
77
  }
78
78
 
79
79
  interface Permissions {
80
- hasAdminPermission: boolean,
81
- hasBcfReadPermission: boolean,
82
- hasBcfWritePermission: boolean,
83
- hasDocReadPermission: boolean,
84
- hasDocWritePermission: boolean,
85
- hasModelReadPermission: boolean,
86
- hasModelWritePermission: boolean,
87
- hasReadPermission: boolean,
88
- hasWritePermission: boolean,
89
- userRole: string,
80
+ hasAdminPermission: boolean;
81
+ hasBcfReadPermission: boolean;
82
+ hasBcfWritePermission: boolean;
83
+ hasDocReadPermission: boolean;
84
+ hasDocWritePermission: boolean;
85
+ hasModelReadPermission: boolean;
86
+ hasModelWritePermission: boolean;
87
+ hasReadPermission: boolean;
88
+ hasWritePermission: boolean;
89
+ userRole: string;
90
90
  tokenScopes: {
91
- bcf?: string[],
92
- model?: string[],
93
- document?: string[],
94
- }
91
+ bcf?: string[];
92
+ model?: string[];
93
+ document?: string[];
94
+ };
95
95
  usableScopes: {
96
- bcf?: string[],
97
- model?: string[],
98
- document?: string[],
99
- }
96
+ bcf?: string[];
97
+ model?: string[];
98
+ document?: string[];
99
+ };
100
100
  }
101
101
  }
@@ -2,17 +2,31 @@ declare namespace BDV {
2
2
  interface LocalContext {
3
3
  hub: EventHandler<LocalContextEvents>;
4
4
 
5
- area: any;
5
+ id: number;
6
6
  el: Element;
7
7
  width: number;
8
8
  height: number;
9
+ resolution: number;
9
10
 
11
+ // Local state
12
+ loadedModels: StateModel[];
13
+ loadedModelIds: number[];
14
+ loadingModelIds: number[];
15
+ modelTypes: string[];
16
+ multiModel: boolean;
17
+ loadModels(ids: number[]): Promise<boolean>;
18
+ unloadModels(ids: number[]): boolean;
19
+ toggleModel(id: number): Promise<boolean>;
20
+
21
+ // Window
22
+ loadWindow(windowName: string): void;
23
+ window: Window;
24
+
25
+ // Plugin
10
26
  /** @deprecated */
11
27
  getPlugin(name: string): Plugin;
12
28
  plugins: Map<string, Plugin>;
13
29
 
14
- // ---
15
-
16
30
  loading: boolean;
17
31
  loadingProcessStart(): void;
18
32
  loadingProcessEnd(): void;
@@ -27,6 +41,9 @@ declare namespace BDV {
27
41
  }
28
42
 
29
43
  type LocalContextEvents = {
44
+ "models-loaded": { models: StateModel[] };
45
+ "models-unloaded": { models: StateModel[] };
46
+ "models-loading": { ids: number[] };
30
47
  "3d-model-loaded": {
31
48
  model: StateModel;
32
49
  plugin: ViewerIfc3D.Plugin;