bimplus-renderer 1.8.20-glb-gltf-obj-support-05 → 1.8.20-glb-gltf-obj-support-07
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/README.md +124 -124
- package/bin/README.emcc.md +41 -41
- package/bin/processPartitionVertices.js +4 -4
- package/dist/bimplus-renderer.js +1 -1
- package/eslint.config.mjs +38 -38
- package/karma-files-config.js +159 -158
- package/karma-modelviewer-ddt.conf.js +66 -66
- package/karma-shared-config.js +91 -91
- package/openAllFiles.ps1 +16 -16
- package/package.json +162 -162
- package/types/bimplus-renderer.d.ts +350 -350
|
@@ -1,351 +1,351 @@
|
|
|
1
|
-
declare module 'bimplus-renderer' {
|
|
2
|
-
|
|
3
|
-
import * as WebSdk from 'bimplus-websdk';
|
|
4
|
-
import * as THREE from 'three';
|
|
5
|
-
|
|
6
|
-
export type Radian = number;
|
|
7
|
-
export type HexColor = string;
|
|
8
|
-
|
|
9
|
-
export class Background {
|
|
10
|
-
static BackgroundType_None: number; // = 0
|
|
11
|
-
static BackgroundType_Color: number; // = 1
|
|
12
|
-
static BackgroundType_LinearGradient: number; // = 2
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface ColorStop {
|
|
16
|
-
offset: number;
|
|
17
|
-
color: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface BackgroundParams {
|
|
21
|
-
alpha: number;
|
|
22
|
-
colorStops: ColorStop[];
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export class Diagnostics {
|
|
26
|
-
|
|
27
|
-
dumpObjects(longInfo: boolean): void;
|
|
28
|
-
dumpObjectSets(longInfo: boolean): void;
|
|
29
|
-
dumpScene(): void;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export class MeasurementUnits {
|
|
33
|
-
weight?: Measurement;
|
|
34
|
-
length?: Measurement;
|
|
35
|
-
width?: Measurement;
|
|
36
|
-
height?: Measurement;
|
|
37
|
-
area?: Measurement;
|
|
38
|
-
volume?: Measurement;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export class Measurement {
|
|
42
|
-
multiplicator: number;
|
|
43
|
-
precision: number;
|
|
44
|
-
unit: string;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export class ModelViewStateLayer {
|
|
48
|
-
id: WebSdk.LayerId;
|
|
49
|
-
background: boolean;
|
|
50
|
-
visible: boolean;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export class ModelViewState {
|
|
54
|
-
layers: Array<ModelViewStateLayer>;
|
|
55
|
-
setLayersVisible(visible: boolean): void;
|
|
56
|
-
setLeafNodesVisible(visible: boolean): void;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface Attribute {
|
|
60
|
-
id: string,
|
|
61
|
-
}
|
|
62
|
-
export interface StringAttribute extends Attribute {
|
|
63
|
-
value: string,
|
|
64
|
-
}
|
|
65
|
-
export interface NumberAttribute extends Attribute {
|
|
66
|
-
value: number,
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export class ObjectSets {
|
|
70
|
-
// An array of selected object references
|
|
71
|
-
selectedObjects: VisualObject[];
|
|
72
|
-
|
|
73
|
-
// An array of hidden object references
|
|
74
|
-
hiddenObjects: VisualObject[];
|
|
75
|
-
|
|
76
|
-
// An array of object references on isolated set
|
|
77
|
-
workingObjects: VisualObject[];
|
|
78
|
-
|
|
79
|
-
// An array of colored object references
|
|
80
|
-
coloredObjects: VisualObject[];
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export class ProjectContent {
|
|
84
|
-
id: string | null;
|
|
85
|
-
forEachModel(func: (model: ProjectModel) => void): void;
|
|
86
|
-
getModels(): ProjectModel[];
|
|
87
|
-
getModel(id: string): ProjectModel | null;
|
|
88
|
-
getObjectsContainer(): ObjectsContainer | null;
|
|
89
|
-
unloadModel(model: ProjectModel, revisionNumber: number, onlyObjects: boolean): void;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export class ProjectLayer {
|
|
93
|
-
id: WebSdk.LayerId;
|
|
94
|
-
name: string;
|
|
95
|
-
currentRevision: number;
|
|
96
|
-
parentModel?: ProjectModel;
|
|
97
|
-
opacity: number;
|
|
98
|
-
userColor: THREE.Color | null;
|
|
99
|
-
userOpacity: number | null;
|
|
100
|
-
|
|
101
|
-
isExternal(): boolean;
|
|
102
|
-
isInternal(): boolean;
|
|
103
|
-
|
|
104
|
-
setVisible(value: boolean): void;
|
|
105
|
-
isVisible(): boolean;
|
|
106
|
-
|
|
107
|
-
setBackground(value: boolean): void;
|
|
108
|
-
isBackground(): boolean;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export class ProjectTopologyNode {
|
|
112
|
-
id: WebSdk.Guid;
|
|
113
|
-
divisionTopologyId: WebSdk.DivisionTopologyId;
|
|
114
|
-
isVisible(): boolean;
|
|
115
|
-
getRevision(): number;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export class ProjectModel {
|
|
119
|
-
|
|
120
|
-
constructor(id: WebSdk.ModelId, visible: boolean);
|
|
121
|
-
|
|
122
|
-
id: WebSdk.ModelId;
|
|
123
|
-
name: string;
|
|
124
|
-
visible: boolean;
|
|
125
|
-
divisionTopologyId: WebSdk.DivisionTopologyId;
|
|
126
|
-
layers: Array<ProjectLayer> | null;
|
|
127
|
-
|
|
128
|
-
revisions: Array<number>;
|
|
129
|
-
releasedRevisions: Array<number>;
|
|
130
|
-
currentRevision: number;
|
|
131
|
-
parentProject?: ProjectContent;
|
|
132
|
-
objectsLoaded: boolean;
|
|
133
|
-
|
|
134
|
-
// Define other properties and methods of the ProjectModel class here if needed
|
|
135
|
-
setCurrentRevision(rev: number): void;
|
|
136
|
-
getCurrentRevision(): number;
|
|
137
|
-
getLatestRevision(): number;
|
|
138
|
-
|
|
139
|
-
forEachLayer(func: (layer: ProjectLayer) => void): void;
|
|
140
|
-
getLayerArray(): ProjectLayer[];
|
|
141
|
-
|
|
142
|
-
setVisible(isVisible: boolean) : void;
|
|
143
|
-
isVisible(): boolean;
|
|
144
|
-
forEachTopologyLeafNode(func: (node: ProjectTopologyNode) => void): void;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export class ContentLoader {
|
|
148
|
-
constructor(api: WebSdk.Api, viewport?: Viewport3D);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export class IfcContentLoader extends ContentLoader {
|
|
152
|
-
constructor(api: WebSdk.Api, viewport?: Viewport3D);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export class BimplusContentLoader extends ContentLoader {
|
|
156
|
-
constructor(api: WebSdk.Api, viewport?: Viewport3D);
|
|
157
|
-
loadObject(objectId: string, revNr: number | undefined, projectContent: any): Promise<any>
|
|
158
|
-
checkAndRefreshProject(project: ProjectContent, models: ProjectModel[]): Promise<boolean>;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export interface ProjectLoaderSettings {
|
|
162
|
-
onlyModelsFromOwnGroups?: boolean,
|
|
163
|
-
modelsFor?: string[],
|
|
164
|
-
filterPrivateDisciplines?: boolean
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
export class ProjectViewer {
|
|
168
|
-
constructor(api: WebSdk.Api, viewport?: Viewport3D, concurrentModelLoadingLimit?: number, includeIfcLoader?: boolean);
|
|
169
|
-
|
|
170
|
-
loadProject(projectId: WebSdk.ProjectId, settings: ProjectLoaderSettings | undefined): Promise<ProjectContent | null>;
|
|
171
|
-
reloadProjectDetails(): Promise<boolean>;
|
|
172
|
-
checkModelModified(modelId: WebSdk.ModelId, clearResponseStore: boolean, clearNodeStore: boolean): Promise<boolean>;
|
|
173
|
-
getProject(): ProjectContent;
|
|
174
|
-
getContentLoader(): BimplusContentLoader;
|
|
175
|
-
getIfcContentLoader(): IfcContentLoader;
|
|
176
|
-
loadModelStructure(model: ProjectModel): Promise<void>;
|
|
177
|
-
reloadModelGeometry(modelId: WebSdk.ModelId): Promise<void>;
|
|
178
|
-
getModelViewState(modelId: WebSdk.ModelId): ModelViewState;
|
|
179
|
-
setModelViewState(modelState: ModelViewState | undefined, viewStateStructureChangedCallback?: () => void) : Promise<void>;
|
|
180
|
-
draw(): void;
|
|
181
|
-
_mainViewport?: Viewport3D;
|
|
182
|
-
_viewports: Array<Viewport3D>;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
export class AmbientOcclusionSettings {
|
|
186
|
-
usage: boolean;
|
|
187
|
-
usageForInteraction: boolean;
|
|
188
|
-
useShadows: boolean;
|
|
189
|
-
useShadowsForInteraction: boolean;
|
|
190
|
-
lightColor: THREE.Color;
|
|
191
|
-
ambientLightColor: THREE.Color;
|
|
192
|
-
lightRotation: Radian;
|
|
193
|
-
lightElevation: Radian;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
export interface ColorizeObject {
|
|
197
|
-
id: WebSdk.VisualObjectId,
|
|
198
|
-
color: HexColor,
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export class ViewportContent {
|
|
202
|
-
getClashes(): Clashes;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
export class Clashes {
|
|
206
|
-
getClashElement(id: string): ClashElement;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
export class ClashElement {
|
|
210
|
-
id?: string;
|
|
211
|
-
node?: string;
|
|
212
|
-
revision?: number;
|
|
213
|
-
[key: string]: unknown;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
export interface Layers {
|
|
217
|
-
revision?: number;
|
|
218
|
-
id: string;
|
|
219
|
-
name?: string;
|
|
220
|
-
divisionId?: string;
|
|
221
|
-
divisionName?: string;
|
|
222
|
-
visible?: boolean;
|
|
223
|
-
opaque?: boolean;
|
|
224
|
-
opacity?: number;
|
|
225
|
-
valid?: boolean;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
export interface SelectedObject {
|
|
229
|
-
id: string;
|
|
230
|
-
revision: number;
|
|
231
|
-
node: unknown;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
export interface SelectedClashElement {
|
|
235
|
-
id: string;
|
|
236
|
-
revision: number;
|
|
237
|
-
node: unknown;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
export interface Camera {
|
|
241
|
-
[key: string]: unknown;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
export interface CommandPolicy {
|
|
245
|
-
noBubble: boolean;
|
|
246
|
-
noTraverse: boolean;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
export interface CommandPolicies {
|
|
250
|
-
CommandSelect: CommandPolicy;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
export class OverlayLoadingResult {
|
|
254
|
-
[key: string]: unknown;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
export class Viewport3D {
|
|
258
|
-
constructor(options: {
|
|
259
|
-
settings: ViewportSettings;
|
|
260
|
-
units: MeasurementUnits;
|
|
261
|
-
domElementId: string;
|
|
262
|
-
GPUPick: boolean;
|
|
263
|
-
api: WebSdk.Api;
|
|
264
|
-
name: string;
|
|
265
|
-
lookupTextureSize?: number;
|
|
266
|
-
ssaoSupported?: boolean;
|
|
267
|
-
shadowsSupported?: boolean;
|
|
268
|
-
panningScaleFactor?: number;
|
|
269
|
-
commandPolicies?: CommandPolicies;
|
|
270
|
-
});
|
|
271
|
-
|
|
272
|
-
domElement: HTMLElement;
|
|
273
|
-
objectSets: ObjectSets;
|
|
274
|
-
diagnostics: Diagnostics;
|
|
275
|
-
camera: Camera | null;
|
|
276
|
-
|
|
277
|
-
// Define other properties and methods of the Viewport3D class here
|
|
278
|
-
setViewportSize(width?: number, height?: number): void;
|
|
279
|
-
|
|
280
|
-
// Define functions for setting up the viewport renderer
|
|
281
|
-
setAmbientOcclusionOptions(settings: AmbientOcclusionSettings) : void;
|
|
282
|
-
setBackground(type: Background, params: BackgroundParams) : void;
|
|
283
|
-
setUseHoverEffect(useHoverEffect: boolean) : void;
|
|
284
|
-
|
|
285
|
-
restoreViewbox(): Promise<void>;
|
|
286
|
-
resetClashScene(): void;
|
|
287
|
-
setRotationCenter(c: THREE.Vector3 | null): void;
|
|
288
|
-
setCameraResetAxis(a: string, fly?: boolean): void;
|
|
289
|
-
setSectionAxis(a?: string): void;
|
|
290
|
-
resetViewport(): void;
|
|
291
|
-
draw(): void;
|
|
292
|
-
dispose(): void;
|
|
293
|
-
setSelectionMode(mode: string): void;
|
|
294
|
-
checkSelectionMode(mode: string): boolean;
|
|
295
|
-
resetSelectionMode(): void;
|
|
296
|
-
setShowHiddenObjectsTransparent(showTransparent: boolean): void;
|
|
297
|
-
resetSelectedObjects(): void;
|
|
298
|
-
resetHiddenObjects(): void;
|
|
299
|
-
resetWorkingObjects(): void;
|
|
300
|
-
resetColoredObjects(): void;
|
|
301
|
-
resetAllObjectSets(): void;
|
|
302
|
-
makeColoredSet(objects: Array<ColorizeObject>): void;
|
|
303
|
-
zoomToObjects(objectIdList: string[]): void;
|
|
304
|
-
subscribeToSelectionModeChanges(handler: (selectionMode: string) => void): void;
|
|
305
|
-
subscribeToConnectionElementSelected(handler: (
|
|
306
|
-
object: VisualObject | null,
|
|
307
|
-
mousePos: THREE.Vector2 | null,
|
|
308
|
-
attributes: Record<string, Attribute> | null,
|
|
309
|
-
) => void): void;
|
|
310
|
-
highlightObjects(ids: string[], multiselect: boolean, skipBubbleUp: boolean): void;
|
|
311
|
-
hoverObject(id: string): void;
|
|
312
|
-
resetHoveredObject(): void;
|
|
313
|
-
setupProjectView(): void;
|
|
314
|
-
toggleProjectionMode(viewport: Viewport3D): void;
|
|
315
|
-
isPerspectiveCamera(): boolean;
|
|
316
|
-
isOrthographicCamera(): boolean;
|
|
317
|
-
getSlideParams(): WebSdk.Scene;
|
|
318
|
-
getObject(id: string): SelectedObject;
|
|
319
|
-
getContent(): ViewportContent;
|
|
320
|
-
toggleObjectNode({id:string,visible:boolean}): void;
|
|
321
|
-
toggleObjectNodeOpacity({id:string,opacity:boolean}): void;
|
|
322
|
-
setSlideScene(scene: WebSdk.Scene, restoreRotationCenter?: boolean, overlayLoadingResult?: OverlayLoadingResult): void;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
export class ViewportSettings {
|
|
326
|
-
defaultOpacity: number;
|
|
327
|
-
disciplineOpacity: number;
|
|
328
|
-
pinSizeScaleFactor: number;
|
|
329
|
-
maxWebGLBufferSize: number;
|
|
330
|
-
mixedModelMode: boolean;
|
|
331
|
-
useFrameSelection: boolean;
|
|
332
|
-
pinFlyToDistance: number;
|
|
333
|
-
nearClippingPlane: number;
|
|
334
|
-
slideThmbSize: number[]; // [number, number];
|
|
335
|
-
units: {
|
|
336
|
-
mm?: MeasurementUnits;
|
|
337
|
-
inch?: MeasurementUnits;
|
|
338
|
-
};
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
export class VisualObject {
|
|
342
|
-
id: WebSdk.VisualObjectId;
|
|
343
|
-
name: string;
|
|
344
|
-
revision?: number;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
export class ObjectsContainer {
|
|
348
|
-
getObjects(ids: string[]): VisualObject[];
|
|
349
|
-
getObjectsArray(): VisualObject[];
|
|
350
|
-
}
|
|
1
|
+
declare module 'bimplus-renderer' {
|
|
2
|
+
|
|
3
|
+
import * as WebSdk from 'bimplus-websdk';
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
|
|
6
|
+
export type Radian = number;
|
|
7
|
+
export type HexColor = string;
|
|
8
|
+
|
|
9
|
+
export class Background {
|
|
10
|
+
static BackgroundType_None: number; // = 0
|
|
11
|
+
static BackgroundType_Color: number; // = 1
|
|
12
|
+
static BackgroundType_LinearGradient: number; // = 2
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface ColorStop {
|
|
16
|
+
offset: number;
|
|
17
|
+
color: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface BackgroundParams {
|
|
21
|
+
alpha: number;
|
|
22
|
+
colorStops: ColorStop[];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export class Diagnostics {
|
|
26
|
+
|
|
27
|
+
dumpObjects(longInfo: boolean): void;
|
|
28
|
+
dumpObjectSets(longInfo: boolean): void;
|
|
29
|
+
dumpScene(): void;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export class MeasurementUnits {
|
|
33
|
+
weight?: Measurement;
|
|
34
|
+
length?: Measurement;
|
|
35
|
+
width?: Measurement;
|
|
36
|
+
height?: Measurement;
|
|
37
|
+
area?: Measurement;
|
|
38
|
+
volume?: Measurement;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export class Measurement {
|
|
42
|
+
multiplicator: number;
|
|
43
|
+
precision: number;
|
|
44
|
+
unit: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export class ModelViewStateLayer {
|
|
48
|
+
id: WebSdk.LayerId;
|
|
49
|
+
background: boolean;
|
|
50
|
+
visible: boolean;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export class ModelViewState {
|
|
54
|
+
layers: Array<ModelViewStateLayer>;
|
|
55
|
+
setLayersVisible(visible: boolean): void;
|
|
56
|
+
setLeafNodesVisible(visible: boolean): void;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface Attribute {
|
|
60
|
+
id: string,
|
|
61
|
+
}
|
|
62
|
+
export interface StringAttribute extends Attribute {
|
|
63
|
+
value: string,
|
|
64
|
+
}
|
|
65
|
+
export interface NumberAttribute extends Attribute {
|
|
66
|
+
value: number,
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export class ObjectSets {
|
|
70
|
+
// An array of selected object references
|
|
71
|
+
selectedObjects: VisualObject[];
|
|
72
|
+
|
|
73
|
+
// An array of hidden object references
|
|
74
|
+
hiddenObjects: VisualObject[];
|
|
75
|
+
|
|
76
|
+
// An array of object references on isolated set
|
|
77
|
+
workingObjects: VisualObject[];
|
|
78
|
+
|
|
79
|
+
// An array of colored object references
|
|
80
|
+
coloredObjects: VisualObject[];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export class ProjectContent {
|
|
84
|
+
id: string | null;
|
|
85
|
+
forEachModel(func: (model: ProjectModel) => void): void;
|
|
86
|
+
getModels(): ProjectModel[];
|
|
87
|
+
getModel(id: string): ProjectModel | null;
|
|
88
|
+
getObjectsContainer(): ObjectsContainer | null;
|
|
89
|
+
unloadModel(model: ProjectModel, revisionNumber: number, onlyObjects: boolean): void;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export class ProjectLayer {
|
|
93
|
+
id: WebSdk.LayerId;
|
|
94
|
+
name: string;
|
|
95
|
+
currentRevision: number;
|
|
96
|
+
parentModel?: ProjectModel;
|
|
97
|
+
opacity: number;
|
|
98
|
+
userColor: THREE.Color | null;
|
|
99
|
+
userOpacity: number | null;
|
|
100
|
+
|
|
101
|
+
isExternal(): boolean;
|
|
102
|
+
isInternal(): boolean;
|
|
103
|
+
|
|
104
|
+
setVisible(value: boolean): void;
|
|
105
|
+
isVisible(): boolean;
|
|
106
|
+
|
|
107
|
+
setBackground(value: boolean): void;
|
|
108
|
+
isBackground(): boolean;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export class ProjectTopologyNode {
|
|
112
|
+
id: WebSdk.Guid;
|
|
113
|
+
divisionTopologyId: WebSdk.DivisionTopologyId;
|
|
114
|
+
isVisible(): boolean;
|
|
115
|
+
getRevision(): number;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export class ProjectModel {
|
|
119
|
+
|
|
120
|
+
constructor(id: WebSdk.ModelId, visible: boolean);
|
|
121
|
+
|
|
122
|
+
id: WebSdk.ModelId;
|
|
123
|
+
name: string;
|
|
124
|
+
visible: boolean;
|
|
125
|
+
divisionTopologyId: WebSdk.DivisionTopologyId;
|
|
126
|
+
layers: Array<ProjectLayer> | null;
|
|
127
|
+
|
|
128
|
+
revisions: Array<number>;
|
|
129
|
+
releasedRevisions: Array<number>;
|
|
130
|
+
currentRevision: number;
|
|
131
|
+
parentProject?: ProjectContent;
|
|
132
|
+
objectsLoaded: boolean;
|
|
133
|
+
|
|
134
|
+
// Define other properties and methods of the ProjectModel class here if needed
|
|
135
|
+
setCurrentRevision(rev: number): void;
|
|
136
|
+
getCurrentRevision(): number;
|
|
137
|
+
getLatestRevision(): number;
|
|
138
|
+
|
|
139
|
+
forEachLayer(func: (layer: ProjectLayer) => void): void;
|
|
140
|
+
getLayerArray(): ProjectLayer[];
|
|
141
|
+
|
|
142
|
+
setVisible(isVisible: boolean) : void;
|
|
143
|
+
isVisible(): boolean;
|
|
144
|
+
forEachTopologyLeafNode(func: (node: ProjectTopologyNode) => void): void;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export class ContentLoader {
|
|
148
|
+
constructor(api: WebSdk.Api, viewport?: Viewport3D);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export class IfcContentLoader extends ContentLoader {
|
|
152
|
+
constructor(api: WebSdk.Api, viewport?: Viewport3D);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export class BimplusContentLoader extends ContentLoader {
|
|
156
|
+
constructor(api: WebSdk.Api, viewport?: Viewport3D);
|
|
157
|
+
loadObject(objectId: string, revNr: number | undefined, projectContent: any): Promise<any>
|
|
158
|
+
checkAndRefreshProject(project: ProjectContent, models: ProjectModel[]): Promise<boolean>;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export interface ProjectLoaderSettings {
|
|
162
|
+
onlyModelsFromOwnGroups?: boolean,
|
|
163
|
+
modelsFor?: string[],
|
|
164
|
+
filterPrivateDisciplines?: boolean
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export class ProjectViewer {
|
|
168
|
+
constructor(api: WebSdk.Api, viewport?: Viewport3D, concurrentModelLoadingLimit?: number, includeIfcLoader?: boolean);
|
|
169
|
+
|
|
170
|
+
loadProject(projectId: WebSdk.ProjectId, settings: ProjectLoaderSettings | undefined): Promise<ProjectContent | null>;
|
|
171
|
+
reloadProjectDetails(): Promise<boolean>;
|
|
172
|
+
checkModelModified(modelId: WebSdk.ModelId, clearResponseStore: boolean, clearNodeStore: boolean): Promise<boolean>;
|
|
173
|
+
getProject(): ProjectContent;
|
|
174
|
+
getContentLoader(): BimplusContentLoader;
|
|
175
|
+
getIfcContentLoader(): IfcContentLoader;
|
|
176
|
+
loadModelStructure(model: ProjectModel): Promise<void>;
|
|
177
|
+
reloadModelGeometry(modelId: WebSdk.ModelId): Promise<void>;
|
|
178
|
+
getModelViewState(modelId: WebSdk.ModelId): ModelViewState;
|
|
179
|
+
setModelViewState(modelState: ModelViewState | undefined, viewStateStructureChangedCallback?: () => void) : Promise<void>;
|
|
180
|
+
draw(): void;
|
|
181
|
+
_mainViewport?: Viewport3D;
|
|
182
|
+
_viewports: Array<Viewport3D>;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export class AmbientOcclusionSettings {
|
|
186
|
+
usage: boolean;
|
|
187
|
+
usageForInteraction: boolean;
|
|
188
|
+
useShadows: boolean;
|
|
189
|
+
useShadowsForInteraction: boolean;
|
|
190
|
+
lightColor: THREE.Color;
|
|
191
|
+
ambientLightColor: THREE.Color;
|
|
192
|
+
lightRotation: Radian;
|
|
193
|
+
lightElevation: Radian;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export interface ColorizeObject {
|
|
197
|
+
id: WebSdk.VisualObjectId,
|
|
198
|
+
color: HexColor,
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export class ViewportContent {
|
|
202
|
+
getClashes(): Clashes;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export class Clashes {
|
|
206
|
+
getClashElement(id: string): ClashElement;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export class ClashElement {
|
|
210
|
+
id?: string;
|
|
211
|
+
node?: string;
|
|
212
|
+
revision?: number;
|
|
213
|
+
[key: string]: unknown;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export interface Layers {
|
|
217
|
+
revision?: number;
|
|
218
|
+
id: string;
|
|
219
|
+
name?: string;
|
|
220
|
+
divisionId?: string;
|
|
221
|
+
divisionName?: string;
|
|
222
|
+
visible?: boolean;
|
|
223
|
+
opaque?: boolean;
|
|
224
|
+
opacity?: number;
|
|
225
|
+
valid?: boolean;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export interface SelectedObject {
|
|
229
|
+
id: string;
|
|
230
|
+
revision: number;
|
|
231
|
+
node: unknown;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export interface SelectedClashElement {
|
|
235
|
+
id: string;
|
|
236
|
+
revision: number;
|
|
237
|
+
node: unknown;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export interface Camera {
|
|
241
|
+
[key: string]: unknown;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export interface CommandPolicy {
|
|
245
|
+
noBubble: boolean;
|
|
246
|
+
noTraverse: boolean;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export interface CommandPolicies {
|
|
250
|
+
CommandSelect: CommandPolicy;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export class OverlayLoadingResult {
|
|
254
|
+
[key: string]: unknown;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export class Viewport3D {
|
|
258
|
+
constructor(options: {
|
|
259
|
+
settings: ViewportSettings;
|
|
260
|
+
units: MeasurementUnits;
|
|
261
|
+
domElementId: string;
|
|
262
|
+
GPUPick: boolean;
|
|
263
|
+
api: WebSdk.Api;
|
|
264
|
+
name: string;
|
|
265
|
+
lookupTextureSize?: number;
|
|
266
|
+
ssaoSupported?: boolean;
|
|
267
|
+
shadowsSupported?: boolean;
|
|
268
|
+
panningScaleFactor?: number;
|
|
269
|
+
commandPolicies?: CommandPolicies;
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
domElement: HTMLElement;
|
|
273
|
+
objectSets: ObjectSets;
|
|
274
|
+
diagnostics: Diagnostics;
|
|
275
|
+
camera: Camera | null;
|
|
276
|
+
|
|
277
|
+
// Define other properties and methods of the Viewport3D class here
|
|
278
|
+
setViewportSize(width?: number, height?: number): void;
|
|
279
|
+
|
|
280
|
+
// Define functions for setting up the viewport renderer
|
|
281
|
+
setAmbientOcclusionOptions(settings: AmbientOcclusionSettings) : void;
|
|
282
|
+
setBackground(type: Background, params: BackgroundParams) : void;
|
|
283
|
+
setUseHoverEffect(useHoverEffect: boolean) : void;
|
|
284
|
+
|
|
285
|
+
restoreViewbox(): Promise<void>;
|
|
286
|
+
resetClashScene(): void;
|
|
287
|
+
setRotationCenter(c: THREE.Vector3 | null): void;
|
|
288
|
+
setCameraResetAxis(a: string, fly?: boolean): void;
|
|
289
|
+
setSectionAxis(a?: string): void;
|
|
290
|
+
resetViewport(): void;
|
|
291
|
+
draw(): void;
|
|
292
|
+
dispose(): void;
|
|
293
|
+
setSelectionMode(mode: string): void;
|
|
294
|
+
checkSelectionMode(mode: string): boolean;
|
|
295
|
+
resetSelectionMode(): void;
|
|
296
|
+
setShowHiddenObjectsTransparent(showTransparent: boolean): void;
|
|
297
|
+
resetSelectedObjects(): void;
|
|
298
|
+
resetHiddenObjects(): void;
|
|
299
|
+
resetWorkingObjects(): void;
|
|
300
|
+
resetColoredObjects(): void;
|
|
301
|
+
resetAllObjectSets(): void;
|
|
302
|
+
makeColoredSet(objects: Array<ColorizeObject>): void;
|
|
303
|
+
zoomToObjects(objectIdList: string[]): void;
|
|
304
|
+
subscribeToSelectionModeChanges(handler: (selectionMode: string) => void): void;
|
|
305
|
+
subscribeToConnectionElementSelected(handler: (
|
|
306
|
+
object: VisualObject | null,
|
|
307
|
+
mousePos: THREE.Vector2 | null,
|
|
308
|
+
attributes: Record<string, Attribute> | null,
|
|
309
|
+
) => void): void;
|
|
310
|
+
highlightObjects(ids: string[], multiselect: boolean, skipBubbleUp: boolean): void;
|
|
311
|
+
hoverObject(id: string): void;
|
|
312
|
+
resetHoveredObject(): void;
|
|
313
|
+
setupProjectView(): void;
|
|
314
|
+
toggleProjectionMode(viewport: Viewport3D): void;
|
|
315
|
+
isPerspectiveCamera(): boolean;
|
|
316
|
+
isOrthographicCamera(): boolean;
|
|
317
|
+
getSlideParams(): WebSdk.Scene;
|
|
318
|
+
getObject(id: string): SelectedObject;
|
|
319
|
+
getContent(): ViewportContent;
|
|
320
|
+
toggleObjectNode({id:string,visible:boolean}): void;
|
|
321
|
+
toggleObjectNodeOpacity({id:string,opacity:boolean}): void;
|
|
322
|
+
setSlideScene(scene: WebSdk.Scene, restoreRotationCenter?: boolean, overlayLoadingResult?: OverlayLoadingResult): void;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export class ViewportSettings {
|
|
326
|
+
defaultOpacity: number;
|
|
327
|
+
disciplineOpacity: number;
|
|
328
|
+
pinSizeScaleFactor: number;
|
|
329
|
+
maxWebGLBufferSize: number;
|
|
330
|
+
mixedModelMode: boolean;
|
|
331
|
+
useFrameSelection: boolean;
|
|
332
|
+
pinFlyToDistance: number;
|
|
333
|
+
nearClippingPlane: number;
|
|
334
|
+
slideThmbSize: number[]; // [number, number];
|
|
335
|
+
units: {
|
|
336
|
+
mm?: MeasurementUnits;
|
|
337
|
+
inch?: MeasurementUnits;
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export class VisualObject {
|
|
342
|
+
id: WebSdk.VisualObjectId;
|
|
343
|
+
name: string;
|
|
344
|
+
revision?: number;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
export class ObjectsContainer {
|
|
348
|
+
getObjects(ids: string[]): VisualObject[];
|
|
349
|
+
getObjectsArray(): VisualObject[];
|
|
350
|
+
}
|
|
351
351
|
}
|