@thatopen/components 2.0.0-alpha.8 → 2.0.0-alpha.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/dist/fragments/{FragmentBoundingBox → BoundingBoxes}/index.d.ts +2 -2
- package/dist/fragments/FragmentClassifier/index.d.ts +1 -1
- package/dist/fragments/index.d.ts +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +79 -70
- package/dist/namespace.d.ts +919 -919
- package/package.json +3 -3
package/dist/namespace.d.ts
CHANGED
|
@@ -1,4 +1,168 @@
|
|
|
1
1
|
declare namespace OBC {
|
|
2
|
+
import * as WEBIFC from "web-ifc";
|
|
3
|
+
import { FragmentsGroup } from "@thatopen/fragments";
|
|
4
|
+
import { Disposable, Event, Component, Components } from "../../core";
|
|
5
|
+
import { RelationsMap, ModelsRelationMap, InverseAttributes, InverseAttribute } from "./src/types";
|
|
6
|
+
/**
|
|
7
|
+
* Indexer for IFC entities, facilitating the indexing and retrieval of IFC entity relationships.
|
|
8
|
+
* It is designed to process models properties by indexing their IFC entities' relations based on predefined inverse attributes, and provides methods to query these relations.
|
|
9
|
+
*/
|
|
10
|
+
export declare class IfcRelationsIndexer extends Component implements Disposable {
|
|
11
|
+
static readonly uuid: "23a889ab-83b3-44a4-8bee-ead83438370b";
|
|
12
|
+
/** {@link Disposable.onDisposed} */
|
|
13
|
+
readonly onDisposed: Event<string>;
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
readonly onRelationsIndexed: Event<{
|
|
16
|
+
modelID: string;
|
|
17
|
+
relationsMap: RelationsMap;
|
|
18
|
+
}>;
|
|
19
|
+
private _relToAttributesMap;
|
|
20
|
+
/**
|
|
21
|
+
* Array of inverse attribute names.
|
|
22
|
+
* This array is used to define the inverse attributes that the indexer will process and index.
|
|
23
|
+
*/
|
|
24
|
+
readonly inverseAttributes: InverseAttributes;
|
|
25
|
+
/**
|
|
26
|
+
* Holds the relationship mappings for each model processed by the indexer.
|
|
27
|
+
* The structure is a map where each key is a model's UUID, and the value is another map.
|
|
28
|
+
* This inner map's keys are entity expressIDs, and its values are maps where each key is an index
|
|
29
|
+
* representing a specific relation type, and the value is an array of expressIDs of entities
|
|
30
|
+
* that are related through that relation type. This structure allows for efficient querying
|
|
31
|
+
* of entity relationships within a model.
|
|
32
|
+
*/
|
|
33
|
+
readonly relationMaps: ModelsRelationMap;
|
|
34
|
+
constructor(components: Components);
|
|
35
|
+
private onFragmentsDisposed;
|
|
36
|
+
private getAttributeRels;
|
|
37
|
+
/**
|
|
38
|
+
* Adds a relation map to the model's relations map.
|
|
39
|
+
*
|
|
40
|
+
* @param model - The 'FragmentsGroup' model to which the relation map will be added.
|
|
41
|
+
* @param relationMap - The 'RelationsMap' to be added to the model's relations map.
|
|
42
|
+
*
|
|
43
|
+
* @fires onRelationsIndexed - Triggers an event with the model's UUID and the added relation map.
|
|
44
|
+
*/
|
|
45
|
+
setRelationMap(model: FragmentsGroup, relationMap: RelationsMap): void;
|
|
46
|
+
/**
|
|
47
|
+
* Processes a given model to index its IFC entities relations based on predefined inverse attributes.
|
|
48
|
+
* This method iterates through each specified inverse attribute, retrieves the corresponding relations,
|
|
49
|
+
* and maps them in a structured way to facilitate quick access to related entities.
|
|
50
|
+
*
|
|
51
|
+
* The process involves querying the model for each relation type associated with the inverse attributes
|
|
52
|
+
* and updating the internal relationMaps with the relationships found. This map is keyed by the model's UUID
|
|
53
|
+
* and contains a nested map where each key is an entity's expressID and its value is another map.
|
|
54
|
+
* This inner map's keys are the indices of the inverse attributes, and its values are arrays of expressIDs
|
|
55
|
+
* of entities that are related through that attribute.
|
|
56
|
+
*
|
|
57
|
+
* @param model The 'FragmentsGroup' model to be processed. It must have properties loaded.
|
|
58
|
+
* @returns A promise that resolves to the relations map for the processed model. This map is a detailed
|
|
59
|
+
* representation of the relations indexed by entity expressIDs and relation types.
|
|
60
|
+
* @throws An error if the model does not have properties loaded.
|
|
61
|
+
*/
|
|
62
|
+
process(model: FragmentsGroup): Promise<RelationsMap>;
|
|
63
|
+
/**
|
|
64
|
+
* Processes a given model from a WebIfc API to index its IFC entities relations based on predefined inverse attributes.
|
|
65
|
+
*
|
|
66
|
+
* @param ifcApi - The WebIfc API instance from which to retrieve the model's properties.
|
|
67
|
+
* @param modelID - The unique identifier of the model within the WebIfc API.
|
|
68
|
+
* @returns A promise that resolves to the relations map for the processed model.
|
|
69
|
+
* This map is a detailed representation of the relations indexed by entity expressIDs and relation types.
|
|
70
|
+
*/
|
|
71
|
+
processFromWebIfc(ifcApi: WEBIFC.IfcAPI, modelID: number): Promise<RelationsMap>;
|
|
72
|
+
/**
|
|
73
|
+
* Retrieves the relations of a specific entity within a model based on the given relation name.
|
|
74
|
+
* This method searches the indexed relation maps for the specified model and entity,
|
|
75
|
+
* returning the IDs of related entities if a match is found.
|
|
76
|
+
*
|
|
77
|
+
* @param model The 'FragmentsGroup' model containing the entity.
|
|
78
|
+
* @param expressID The unique identifier of the entity within the model.
|
|
79
|
+
* @param relationName The IFC schema inverse attribute of the relation to search for (e.g., "IsDefinedBy", "ContainsElements").
|
|
80
|
+
* @returns An array of express IDs representing the related entities, or 'null' if no relations are found
|
|
81
|
+
* or the specified relation name is not indexed.
|
|
82
|
+
*/
|
|
83
|
+
getEntityRelations(model: FragmentsGroup, expressID: number, relationName: InverseAttribute): number[] | null;
|
|
84
|
+
/**
|
|
85
|
+
* Serializes the relations of a given relation map into a JSON string.
|
|
86
|
+
* This method iterates through the relations in the given map, organizing them into a structured object where each key is an expressID of an entity,
|
|
87
|
+
* and its value is another object mapping relation indices to arrays of related entity expressIDs.
|
|
88
|
+
* The resulting object is then serialized into a JSON string.
|
|
89
|
+
*
|
|
90
|
+
* @param relationMap - The map of relations to be serialized. The map keys are expressIDs of entities, and the values are maps where each key is a relation type ID and its value is an array of expressIDs of entities related through that relation type.
|
|
91
|
+
* @returns A JSON string representing the serialized relations of the given relation map.
|
|
92
|
+
*/
|
|
93
|
+
serializeRelations(relationMap: RelationsMap): string;
|
|
94
|
+
/**
|
|
95
|
+
* Serializes the relations of a specific model into a JSON string.
|
|
96
|
+
* This method iterates through the relations indexed for the given model,
|
|
97
|
+
* organizing them into a structured object where each key is an expressID of an entity,
|
|
98
|
+
* and its value is another object mapping relation indices to arrays of related entity expressIDs.
|
|
99
|
+
* The resulting object is then serialized into a JSON string.
|
|
100
|
+
*
|
|
101
|
+
* @param model The 'FragmentsGroup' model whose relations are to be serialized.
|
|
102
|
+
* @returns A JSON string representing the serialized relations of the specified model.
|
|
103
|
+
* If the model has no indexed relations, 'null' is returned.
|
|
104
|
+
*/
|
|
105
|
+
serializeModelRelations(model: FragmentsGroup): string | null;
|
|
106
|
+
/**
|
|
107
|
+
* Serializes all relations of every model processed by the indexer into a JSON string.
|
|
108
|
+
* This method iterates through each model's relations indexed in 'relationMaps', organizing them
|
|
109
|
+
* into a structured JSON object. Each top-level key in this object corresponds to a model's UUID,
|
|
110
|
+
* and its value is another object mapping entity expressIDs to their related entities, categorized
|
|
111
|
+
* by relation types. The structure facilitates easy access to any entity's relations across all models.
|
|
112
|
+
*
|
|
113
|
+
* @returns A JSON string representing the serialized relations of all models processed by the indexer.
|
|
114
|
+
* If no relations have been indexed, an empty object is returned as a JSON string.
|
|
115
|
+
*/
|
|
116
|
+
serializeAllRelations(): string;
|
|
117
|
+
/**
|
|
118
|
+
* Converts a JSON string representing relations between entities into a structured map.
|
|
119
|
+
* This method parses the JSON string to reconstruct the relations map that indexes
|
|
120
|
+
* entity relations by their express IDs. The outer map keys are the express IDs of entities,
|
|
121
|
+
* and the values are maps where each key is a relation type ID and its value is an array
|
|
122
|
+
* of express IDs of entities related through that relation type.
|
|
123
|
+
*
|
|
124
|
+
* @param json The JSON string to be parsed into the relations map.
|
|
125
|
+
* @returns A 'Map' where the key is the express ID of an entity as a number, and the value
|
|
126
|
+
* is another 'Map'. This inner map's key is the relation type ID as a number, and its value
|
|
127
|
+
* is an array of express IDs (as numbers) of entities related through that relation type.
|
|
128
|
+
*/
|
|
129
|
+
getRelationsMapFromJSON(json: string): RelationsMap;
|
|
130
|
+
/**
|
|
131
|
+
* Disposes the component, cleaning up resources and detaching event listeners.
|
|
132
|
+
* This ensures that the component is properly cleaned up and does not leave behind any
|
|
133
|
+
* references that could prevent garbage collection.
|
|
134
|
+
*/
|
|
135
|
+
dispose(): void;
|
|
136
|
+
}
|
|
137
|
+
import * as WEBIFC from "web-ifc";
|
|
138
|
+
import * as FRAG from "@thatopen/fragments";
|
|
139
|
+
/**
|
|
140
|
+
* Object to export all the properties from an IFC to a JS object.
|
|
141
|
+
*/
|
|
142
|
+
export declare class IfcJsonExporter {
|
|
143
|
+
/**
|
|
144
|
+
* Exports all the properties of an IFC into an array of JS objects.
|
|
145
|
+
* @param webIfc The instance of [web-ifc]{@link https://github.com/ThatOpen/engine_web-ifc} to use.
|
|
146
|
+
* @param modelID ID of the IFC model whose properties to extract.
|
|
147
|
+
* @param indirect whether to get the indirect relationships as well.
|
|
148
|
+
* @param recursiveSpatial whether to get the properties of spatial items recursively
|
|
149
|
+
* to make the location data available (e.g. absolute position of building).
|
|
150
|
+
*/
|
|
151
|
+
export(webIfc: WEBIFC.IfcAPI, modelID: number, indirect?: boolean, recursiveSpatial?: boolean): Promise<FRAG.IfcProperties>;
|
|
152
|
+
}
|
|
153
|
+
import { Component, Disposable, World, Event } from "../Types";
|
|
154
|
+
import { SimpleRaycaster } from "./src";
|
|
155
|
+
import { Components } from "../Components";
|
|
156
|
+
export declare class Raycasters extends Component implements Disposable {
|
|
157
|
+
static readonly uuid: "d5d8bdf0-db25-4952-b951-b643af207ace";
|
|
158
|
+
enabled: boolean;
|
|
159
|
+
list: Map<string, SimpleRaycaster>;
|
|
160
|
+
onDisposed: Event<unknown>;
|
|
161
|
+
constructor(components: Components);
|
|
162
|
+
get(world: World): SimpleRaycaster;
|
|
163
|
+
delete(world: World): void;
|
|
164
|
+
dispose(): void;
|
|
165
|
+
}
|
|
2
166
|
import * as THREE from "three";
|
|
3
167
|
import { Components } from "../Components";
|
|
4
168
|
import { Component } from "../Types";
|
|
@@ -94,19 +258,6 @@ export declare class Components implements Disposable {
|
|
|
94
258
|
private update;
|
|
95
259
|
private static setupBVH;
|
|
96
260
|
}
|
|
97
|
-
import { Component, Disposable, World, Event } from "../Types";
|
|
98
|
-
import { SimpleRaycaster } from "./src";
|
|
99
|
-
import { Components } from "../Components";
|
|
100
|
-
export declare class Raycasters extends Component implements Disposable {
|
|
101
|
-
static readonly uuid: "d5d8bdf0-db25-4952-b951-b643af207ace";
|
|
102
|
-
enabled: boolean;
|
|
103
|
-
list: Map<string, SimpleRaycaster>;
|
|
104
|
-
onDisposed: Event<unknown>;
|
|
105
|
-
constructor(components: Components);
|
|
106
|
-
get(world: World): SimpleRaycaster;
|
|
107
|
-
delete(world: World): void;
|
|
108
|
-
dispose(): void;
|
|
109
|
-
}
|
|
110
261
|
import { Component, Disposable, Updateable, World, Event, BaseScene, BaseCamera, BaseRenderer } from "../Types";
|
|
111
262
|
import { Components } from "../Components";
|
|
112
263
|
import { SimpleWorld } from "./src";
|
|
@@ -123,122 +274,152 @@ export declare class Worlds extends Component implements Updateable, Disposable
|
|
|
123
274
|
dispose(): void;
|
|
124
275
|
update(delta?: number): void | Promise<void>;
|
|
125
276
|
}
|
|
126
|
-
import
|
|
127
|
-
import {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
277
|
+
import * as FRAGS from "@thatopen/fragments";
|
|
278
|
+
import { FragmentsGroup } from "@thatopen/fragments";
|
|
279
|
+
import { Disposable, Event, Component, Components } from "../../core";
|
|
280
|
+
import { QueryGroup } from "./src/types";
|
|
281
|
+
export interface QueryResult {
|
|
282
|
+
[modelID: string]: {
|
|
283
|
+
modelEntities: Set<number>;
|
|
284
|
+
otherEntities: Set<number>;
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
export interface IndexedModels {
|
|
288
|
+
[modelID: string]: {
|
|
289
|
+
[expressID: number]: Set<number>;
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
export declare class IfcPropertiesFinder extends Component implements Disposable {
|
|
293
|
+
readonly onFound: Event<FRAGS.FragmentIdMap>;
|
|
294
|
+
/** {@link Disposable.onDisposed} */
|
|
295
|
+
readonly onDisposed: Event<unknown>;
|
|
134
296
|
enabled: boolean;
|
|
135
|
-
|
|
136
|
-
|
|
297
|
+
indexedModels: IndexedModels;
|
|
298
|
+
private readonly _conditionFunctions;
|
|
299
|
+
private _noHandleAttributes;
|
|
300
|
+
constructor(components: Components);
|
|
301
|
+
private onFragmentsDisposed;
|
|
137
302
|
dispose(): void;
|
|
303
|
+
private indexEntityRelations;
|
|
304
|
+
find(groups: QueryGroup[], queryModels?: FragmentsGroup[]): Promise<FRAGS.FragmentIdMap>;
|
|
305
|
+
private toFragmentMap;
|
|
306
|
+
private simpleQuery;
|
|
307
|
+
private getMatchingEntities;
|
|
308
|
+
private combineArrays;
|
|
309
|
+
private getCommonElements;
|
|
310
|
+
private arrayIntersection;
|
|
311
|
+
private arrayUnion;
|
|
312
|
+
private getConditionFunctions;
|
|
138
313
|
}
|
|
139
|
-
import * as THREE from "three";
|
|
140
|
-
import { Component, Createable, Disposable, Event, Hideable, World } from "../Types";
|
|
141
|
-
import { SimplePlane } from "./src";
|
|
142
314
|
import { Components } from "../Components";
|
|
315
|
+
import { MeshCullerRenderer, CullerRendererSettings } from "./src";
|
|
316
|
+
import { Component, Event, Disposable, World } from "../Types";
|
|
143
317
|
/**
|
|
144
|
-
* A
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
* @param components - the instance of {@link Components} used.
|
|
148
|
-
* @param planeType - the type of plane to be used by the clipper.
|
|
149
|
-
* E.g. {@link SimplePlane}.
|
|
318
|
+
* A tool to handle big scenes efficiently by automatically hiding the objects
|
|
319
|
+
* that are not visible to the camera.
|
|
150
320
|
*/
|
|
151
|
-
export declare class
|
|
152
|
-
static readonly uuid: "
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
/** {@link Createable.onAfterDelete} */
|
|
156
|
-
readonly onAfterDelete: Event<T>;
|
|
157
|
-
/** Event that fires when the user starts dragging a clipping plane. */
|
|
158
|
-
readonly onBeforeDrag: Event<void>;
|
|
159
|
-
/** Event that fires when the user stops dragging a clipping plane. */
|
|
160
|
-
readonly onAfterDrag: Event<void>;
|
|
161
|
-
readonly onBeforeCreate: Event<unknown>;
|
|
162
|
-
readonly onBeforeCancel: Event<unknown>;
|
|
163
|
-
readonly onAfterCancel: Event<unknown>;
|
|
164
|
-
readonly onBeforeDelete: Event<unknown>;
|
|
321
|
+
export declare class Cullers extends Component implements Disposable {
|
|
322
|
+
static readonly uuid: "69f2a50d-c266-44fc-b1bd-fa4d34be89e6";
|
|
323
|
+
private _enabled;
|
|
324
|
+
list: Map<string, MeshCullerRenderer>;
|
|
165
325
|
/** {@link Disposable.onDisposed} */
|
|
166
|
-
readonly onDisposed: Event<
|
|
167
|
-
/**
|
|
168
|
-
* Whether to force the clipping plane to be orthogonal in the Y direction
|
|
169
|
-
* (up). This is desirable when clipping a building horizontally and a
|
|
170
|
-
* clipping plane is created in its roof, which might have a slight
|
|
171
|
-
* slope for draining purposes.
|
|
172
|
-
*/
|
|
173
|
-
orthogonalY: boolean;
|
|
174
|
-
/**
|
|
175
|
-
* The tolerance that determines whether an almost-horizontal clipping plane
|
|
176
|
-
* will be forced to be orthogonal to the Y direction. {@link orthogonalY}
|
|
177
|
-
* has to be 'true' for this to apply.
|
|
178
|
-
*/
|
|
179
|
-
toleranceOrthogonalY: number;
|
|
180
|
-
list: T[];
|
|
181
|
-
protected PlaneType: new (...args: any) => SimplePlane | T;
|
|
182
|
-
/** The material used in all the clipping planes. */
|
|
183
|
-
protected _material: THREE.MeshBasicMaterial;
|
|
184
|
-
private _size;
|
|
185
|
-
private _enabled;
|
|
186
|
-
private _visible;
|
|
326
|
+
readonly onDisposed: Event<unknown>;
|
|
187
327
|
/** {@link Component.enabled} */
|
|
188
328
|
get enabled(): boolean;
|
|
189
|
-
|
|
190
|
-
set enabled(state: boolean);
|
|
191
|
-
/** {@link Hideable.visible } */
|
|
192
|
-
get visible(): boolean;
|
|
193
|
-
/** {@link Hideable.visible } */
|
|
194
|
-
set visible(state: boolean);
|
|
195
|
-
/** The material of the clipping plane representation. */
|
|
196
|
-
get material(): THREE.MeshBasicMaterial;
|
|
197
|
-
/** The material of the clipping plane representation. */
|
|
198
|
-
set material(material: THREE.MeshBasicMaterial);
|
|
199
|
-
/** The size of the geometric representation of the clippings planes. */
|
|
200
|
-
get size(): number;
|
|
201
|
-
/** The size of the geometric representation of the clippings planes. */
|
|
202
|
-
set size(size: number);
|
|
329
|
+
set enabled(value: boolean);
|
|
203
330
|
constructor(components: Components);
|
|
204
|
-
|
|
205
|
-
|
|
331
|
+
create(world: World, config?: Partial<CullerRendererSettings>): MeshCullerRenderer;
|
|
332
|
+
delete(world: World): void;
|
|
206
333
|
/** {@link Disposable.dispose} */
|
|
207
334
|
dispose(): void;
|
|
208
|
-
|
|
335
|
+
}
|
|
336
|
+
import * as WEBIFC from "web-ifc";
|
|
337
|
+
import { FragmentsGroup } from "@thatopen/fragments";
|
|
338
|
+
import { Component, Disposable, Event, Components } from "../../core";
|
|
339
|
+
type BooleanPropTypes = "IfcBoolean" | "IfcLogical";
|
|
340
|
+
type StringPropTypes = "IfcText" | "IfcLabel" | "IfcIdentifier";
|
|
341
|
+
type NumericPropTypes = "IfcInteger" | "IfcReal";
|
|
342
|
+
interface ChangeMap {
|
|
343
|
+
[modelID: string]: Set<number>;
|
|
344
|
+
}
|
|
345
|
+
interface AttributeListener {
|
|
346
|
+
[modelID: string]: {
|
|
347
|
+
[expressID: number]: {
|
|
348
|
+
[attributeName: string]: Event<String | Boolean | Number>;
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
export declare class IfcPropertiesManager extends Component implements Disposable {
|
|
353
|
+
static readonly uuid: "58c2d9f0-183c-48d6-a402-dfcf5b9a34df";
|
|
354
|
+
/** {@link Disposable.onDisposed} */
|
|
355
|
+
readonly onDisposed: Event<string>;
|
|
356
|
+
readonly onRequestFile: Event<unknown>;
|
|
357
|
+
ifcToExport: ArrayBuffer | null;
|
|
358
|
+
readonly onElementToPset: Event<{
|
|
359
|
+
model: FragmentsGroup;
|
|
360
|
+
psetID: number;
|
|
361
|
+
elementID: number;
|
|
362
|
+
}>;
|
|
363
|
+
readonly onPropToPset: Event<{
|
|
364
|
+
model: FragmentsGroup;
|
|
365
|
+
psetID: number;
|
|
366
|
+
propID: number;
|
|
367
|
+
}>;
|
|
368
|
+
readonly onPsetRemoved: Event<{
|
|
369
|
+
model: FragmentsGroup;
|
|
370
|
+
psetID: number;
|
|
371
|
+
}>;
|
|
372
|
+
readonly onDataChanged: Event<{
|
|
373
|
+
model: FragmentsGroup;
|
|
374
|
+
expressID: number;
|
|
375
|
+
}>;
|
|
376
|
+
wasm: {
|
|
377
|
+
path: string;
|
|
378
|
+
absolute: boolean;
|
|
379
|
+
};
|
|
380
|
+
enabled: boolean;
|
|
381
|
+
attributeListeners: AttributeListener;
|
|
382
|
+
selectedModel?: FragmentsGroup;
|
|
383
|
+
private _changeMap;
|
|
384
|
+
constructor(components: Components);
|
|
385
|
+
get(): ChangeMap;
|
|
386
|
+
dispose(): void;
|
|
387
|
+
private increaseMaxID;
|
|
388
|
+
static getIFCSchema(model: FragmentsGroup): import("@thatopen/fragments").IfcSchema;
|
|
389
|
+
private newGUID;
|
|
390
|
+
private getOwnerHistory;
|
|
391
|
+
private registerChange;
|
|
392
|
+
setData(model: FragmentsGroup, ...dataToSave: Record<string, any>[]): Promise<void>;
|
|
393
|
+
newPset(model: FragmentsGroup, name: string, description?: string): Promise<{
|
|
394
|
+
pset: WEBIFC.IFC2X3.IfcPropertySet | WEBIFC.IFC4.IfcPropertySet | WEBIFC.IFC4X3.IfcPropertySet;
|
|
395
|
+
rel: WEBIFC.IFC4X3.IfcRelDefinesByProperties | WEBIFC.IFC4.IfcRelDefinesByProperties | WEBIFC.IFC2X3.IfcRelDefinesByProperties;
|
|
396
|
+
}>;
|
|
397
|
+
removePset(model: FragmentsGroup, ...psetID: number[]): Promise<void>;
|
|
398
|
+
private newSingleProperty;
|
|
399
|
+
newSingleStringProperty(model: FragmentsGroup, type: StringPropTypes, name: string, value: string): Promise<WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
|
|
400
|
+
newSingleNumericProperty(model: FragmentsGroup, type: NumericPropTypes, name: string, value: number): Promise<WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
|
|
401
|
+
newSingleBooleanProperty(model: FragmentsGroup, type: BooleanPropTypes, name: string, value: boolean): Promise<WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
|
|
402
|
+
removePsetProp(model: FragmentsGroup, psetID: number, propID: number): Promise<void>;
|
|
403
|
+
addElementToPset(model: FragmentsGroup, psetID: number, ...elementID: number[]): Promise<void>;
|
|
404
|
+
addPropToPset(model: FragmentsGroup, psetID: number, ...propID: number[]): Promise<void>;
|
|
405
|
+
saveToIfc(model: FragmentsGroup, ifcToSaveOn: Uint8Array): Promise<Uint8Array>;
|
|
406
|
+
setAttributeListener(model: FragmentsGroup, expressID: number, attributeName: string): Promise<Event<String | Number | Boolean>>;
|
|
407
|
+
}
|
|
408
|
+
export {};
|
|
409
|
+
import { Component, Disposable, World, Event } from "../Types";
|
|
410
|
+
import { GridConfig, SimpleGrid } from "./src";
|
|
411
|
+
export declare class Grids extends Component implements Disposable {
|
|
412
|
+
static readonly uuid: "d1e814d5-b81c-4452-87a2-f039375e0489";
|
|
413
|
+
list: Map<string, SimpleGrid>;
|
|
414
|
+
onDisposed: Event<unknown>;
|
|
415
|
+
config: Required<GridConfig>;
|
|
416
|
+
/** {@link Component.enabled} */
|
|
417
|
+
enabled: boolean;
|
|
209
418
|
create(world: World): void;
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
* without the need of the mouse.
|
|
213
|
-
*
|
|
214
|
-
* @param world - the world where this plane should be created.
|
|
215
|
-
* @param normal - the orientation of the clipping plane.
|
|
216
|
-
* @param point - the position of the clipping plane.
|
|
217
|
-
* navigation.
|
|
218
|
-
*/
|
|
219
|
-
createFromNormalAndCoplanarPoint(world: World, normal: THREE.Vector3, point: THREE.Vector3): T;
|
|
220
|
-
/**
|
|
221
|
-
* {@link Createable.delete}
|
|
222
|
-
*
|
|
223
|
-
* @param world - the world where the plane to delete is.
|
|
224
|
-
* @param plane - the plane to delete. If undefined, the first plane
|
|
225
|
-
* found under the cursor will be deleted.
|
|
226
|
-
*/
|
|
227
|
-
delete(world: World, plane?: T): void;
|
|
228
|
-
/** Deletes all the existing clipping planes. */
|
|
229
|
-
deleteAll(): void;
|
|
230
|
-
private deletePlane;
|
|
231
|
-
private pickPlane;
|
|
232
|
-
private getAllPlaneMeshes;
|
|
233
|
-
private createPlaneFromIntersection;
|
|
234
|
-
private getWorldNormal;
|
|
235
|
-
private normalizePlaneDirectionY;
|
|
236
|
-
private newPlane;
|
|
237
|
-
protected newPlaneInstance(world: World, point: THREE.Vector3, normal: THREE.Vector3): T;
|
|
238
|
-
private updateMaterialsAndPlanes;
|
|
239
|
-
private _onStartDragging;
|
|
240
|
-
private _onEndDragging;
|
|
419
|
+
delete(world: World): void;
|
|
420
|
+
dispose(): void;
|
|
241
421
|
}
|
|
422
|
+
export declare function isPointInFrontOfPlane(point: number[], planePoint: number[], planeNormal: number[]): boolean;
|
|
242
423
|
import * as THREE from "three";
|
|
243
424
|
export declare function obbFromPoints(vertices: ArrayLike<number>): {
|
|
244
425
|
center: THREE.Vector3;
|
|
@@ -246,28 +427,46 @@ export declare function obbFromPoints(vertices: ArrayLike<number>): {
|
|
|
246
427
|
rotation: THREE.Matrix3;
|
|
247
428
|
transformation: THREE.Matrix4;
|
|
248
429
|
};
|
|
249
|
-
export declare
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
*
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
430
|
+
export declare class UUID {
|
|
431
|
+
private static _pattern;
|
|
432
|
+
private static _lut;
|
|
433
|
+
static create(): string;
|
|
434
|
+
static validate(uuid: string): void;
|
|
435
|
+
}
|
|
436
|
+
import * as THREE from "three";
|
|
437
|
+
export declare class MaterialsUtils {
|
|
438
|
+
static isTransparent(material: THREE.Material): boolean;
|
|
439
|
+
}
|
|
440
|
+
import * as THREE from "three";
|
|
441
|
+
import { Component, Components, Event, World, Disposable } from "../core";
|
|
442
|
+
export interface VertexPickerConfig {
|
|
443
|
+
showOnlyVertex: boolean;
|
|
444
|
+
snapDistance: number;
|
|
445
|
+
previewElement: HTMLElement;
|
|
446
|
+
}
|
|
447
|
+
export declare class VertexPicker extends Component implements Disposable {
|
|
448
|
+
onVertexFound: Event<THREE.Vector3>;
|
|
449
|
+
onVertexLost: Event<THREE.Vector3>;
|
|
450
|
+
components: Components;
|
|
451
|
+
private _pickedPoint;
|
|
452
|
+
private _config;
|
|
259
453
|
private _enabled;
|
|
260
|
-
|
|
454
|
+
private _workingPlane;
|
|
261
455
|
/** {@link Disposable.onDisposed} */
|
|
262
456
|
readonly onDisposed: Event<unknown>;
|
|
263
|
-
/** {@link Component.enabled} */
|
|
264
|
-
get enabled(): boolean;
|
|
265
457
|
set enabled(value: boolean);
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
458
|
+
get enabled(): boolean;
|
|
459
|
+
constructor(components: Components, config?: Partial<VertexPickerConfig>);
|
|
460
|
+
[Symbol.dispose](): void;
|
|
461
|
+
set workingPlane(plane: THREE.Plane | null);
|
|
462
|
+
get workingPlane(): THREE.Plane | null;
|
|
463
|
+
set config(value: Partial<VertexPickerConfig>);
|
|
464
|
+
get config(): Partial<VertexPickerConfig>;
|
|
270
465
|
dispose(): void;
|
|
466
|
+
get(world: World): THREE.Vector3 | null;
|
|
467
|
+
private getClosestVertex;
|
|
468
|
+
private getVertices;
|
|
469
|
+
private getVertex;
|
|
271
470
|
}
|
|
272
471
|
import { Component, Components, Disposable, Updateable, World, Event } from "../../core";
|
|
273
472
|
import { MiniMap } from "./src";
|
|
@@ -382,322 +581,108 @@ export declare class OrthoPerspectiveCamera extends SimpleCamera {
|
|
|
382
581
|
private newOrthoCamera;
|
|
383
582
|
private setOrthoCameraAspect;
|
|
384
583
|
}
|
|
385
|
-
import * as
|
|
386
|
-
import
|
|
584
|
+
import * as THREE from "three";
|
|
585
|
+
import { Component, Createable, Disposable, Event, Hideable, World } from "../Types";
|
|
586
|
+
import { SimplePlane } from "./src";
|
|
587
|
+
import { Components } from "../Components";
|
|
387
588
|
/**
|
|
388
|
-
*
|
|
589
|
+
* A lightweight component to easily create and handle
|
|
590
|
+
* [clipping planes](https://threejs.org/docs/#api/en/materials/Material.clippingPlanes).
|
|
591
|
+
*
|
|
592
|
+
* @param components - the instance of {@link Components} used.
|
|
593
|
+
* @param planeType - the type of plane to be used by the clipper.
|
|
594
|
+
* E.g. {@link SimplePlane}.
|
|
389
595
|
*/
|
|
390
|
-
export declare class
|
|
596
|
+
export declare class Clipper<T extends SimplePlane> extends Component implements Createable, Disposable, Hideable {
|
|
597
|
+
static readonly uuid: "66290bc5-18c4-4cd1-9379-2e17a0617611";
|
|
598
|
+
/** {@link Createable.onAfterCreate} */
|
|
599
|
+
readonly onAfterCreate: Event<T>;
|
|
600
|
+
/** {@link Createable.onAfterDelete} */
|
|
601
|
+
readonly onAfterDelete: Event<T>;
|
|
602
|
+
/** Event that fires when the user starts dragging a clipping plane. */
|
|
603
|
+
readonly onBeforeDrag: Event<void>;
|
|
604
|
+
/** Event that fires when the user stops dragging a clipping plane. */
|
|
605
|
+
readonly onAfterDrag: Event<void>;
|
|
606
|
+
readonly onBeforeCreate: Event<unknown>;
|
|
607
|
+
readonly onBeforeCancel: Event<unknown>;
|
|
608
|
+
readonly onAfterCancel: Event<unknown>;
|
|
609
|
+
readonly onBeforeDelete: Event<unknown>;
|
|
610
|
+
/** {@link Disposable.onDisposed} */
|
|
611
|
+
readonly onDisposed: Event<string>;
|
|
391
612
|
/**
|
|
392
|
-
*
|
|
393
|
-
*
|
|
394
|
-
*
|
|
395
|
-
*
|
|
396
|
-
* @param recursiveSpatial whether to get the properties of spatial items recursively
|
|
397
|
-
* to make the location data available (e.g. absolute position of building).
|
|
613
|
+
* Whether to force the clipping plane to be orthogonal in the Y direction
|
|
614
|
+
* (up). This is desirable when clipping a building horizontally and a
|
|
615
|
+
* clipping plane is created in its roof, which might have a slight
|
|
616
|
+
* slope for draining purposes.
|
|
398
617
|
*/
|
|
399
|
-
|
|
400
|
-
}
|
|
401
|
-
import * as FRAGS from "@thatopen/fragments";
|
|
402
|
-
import { FragmentsGroup } from "@thatopen/fragments";
|
|
403
|
-
import { Disposable, Event, Component, Components } from "../../core";
|
|
404
|
-
import { QueryGroup } from "./src/types";
|
|
405
|
-
export interface QueryResult {
|
|
406
|
-
[modelID: string]: {
|
|
407
|
-
modelEntities: Set<number>;
|
|
408
|
-
otherEntities: Set<number>;
|
|
409
|
-
};
|
|
410
|
-
}
|
|
411
|
-
export interface IndexedModels {
|
|
412
|
-
[modelID: string]: {
|
|
413
|
-
[expressID: number]: Set<number>;
|
|
414
|
-
};
|
|
415
|
-
}
|
|
416
|
-
export declare class IfcPropertiesFinder extends Component implements Disposable {
|
|
417
|
-
readonly onFound: Event<FRAGS.FragmentIdMap>;
|
|
418
|
-
/** {@link Disposable.onDisposed} */
|
|
419
|
-
readonly onDisposed: Event<unknown>;
|
|
420
|
-
enabled: boolean;
|
|
421
|
-
indexedModels: IndexedModels;
|
|
422
|
-
private readonly _conditionFunctions;
|
|
423
|
-
private _noHandleAttributes;
|
|
424
|
-
constructor(components: Components);
|
|
425
|
-
private onFragmentsDisposed;
|
|
426
|
-
dispose(): void;
|
|
427
|
-
private indexEntityRelations;
|
|
428
|
-
find(groups: QueryGroup[], queryModels?: FragmentsGroup[]): Promise<FRAGS.FragmentIdMap>;
|
|
429
|
-
private toFragmentMap;
|
|
430
|
-
private simpleQuery;
|
|
431
|
-
private getMatchingEntities;
|
|
432
|
-
private combineArrays;
|
|
433
|
-
private getCommonElements;
|
|
434
|
-
private arrayIntersection;
|
|
435
|
-
private arrayUnion;
|
|
436
|
-
private getConditionFunctions;
|
|
437
|
-
}
|
|
438
|
-
import * as WEBIFC from "web-ifc";
|
|
439
|
-
import { FragmentsGroup } from "@thatopen/fragments";
|
|
440
|
-
import { Disposable, Event, Component, Components } from "../../core";
|
|
441
|
-
import { RelationsMap, ModelsRelationMap, InverseAttributes, InverseAttribute } from "./src/types";
|
|
442
|
-
/**
|
|
443
|
-
* Indexer for IFC entities, facilitating the indexing and retrieval of IFC entity relationships.
|
|
444
|
-
* It is designed to process models properties by indexing their IFC entities' relations based on predefined inverse attributes, and provides methods to query these relations.
|
|
445
|
-
*/
|
|
446
|
-
export declare class IfcRelationsIndexer extends Component implements Disposable {
|
|
447
|
-
static readonly uuid: "23a889ab-83b3-44a4-8bee-ead83438370b";
|
|
448
|
-
/** {@link Disposable.onDisposed} */
|
|
449
|
-
readonly onDisposed: Event<string>;
|
|
450
|
-
enabled: boolean;
|
|
451
|
-
readonly onRelationsIndexed: Event<{
|
|
452
|
-
modelID: string;
|
|
453
|
-
relationsMap: RelationsMap;
|
|
454
|
-
}>;
|
|
455
|
-
private _relToAttributesMap;
|
|
456
|
-
/**
|
|
457
|
-
* Array of inverse attribute names.
|
|
458
|
-
* This array is used to define the inverse attributes that the indexer will process and index.
|
|
459
|
-
*/
|
|
460
|
-
readonly inverseAttributes: InverseAttributes;
|
|
461
|
-
/**
|
|
462
|
-
* Holds the relationship mappings for each model processed by the indexer.
|
|
463
|
-
* The structure is a map where each key is a model's UUID, and the value is another map.
|
|
464
|
-
* This inner map's keys are entity expressIDs, and its values are maps where each key is an index
|
|
465
|
-
* representing a specific relation type, and the value is an array of expressIDs of entities
|
|
466
|
-
* that are related through that relation type. This structure allows for efficient querying
|
|
467
|
-
* of entity relationships within a model.
|
|
468
|
-
*/
|
|
469
|
-
readonly relationMaps: ModelsRelationMap;
|
|
470
|
-
constructor(components: Components);
|
|
471
|
-
private onFragmentsDisposed;
|
|
472
|
-
private getAttributeRels;
|
|
473
|
-
/**
|
|
474
|
-
* Adds a relation map to the model's relations map.
|
|
475
|
-
*
|
|
476
|
-
* @param model - The 'FragmentsGroup' model to which the relation map will be added.
|
|
477
|
-
* @param relationMap - The 'RelationsMap' to be added to the model's relations map.
|
|
478
|
-
*
|
|
479
|
-
* @fires onRelationsIndexed - Triggers an event with the model's UUID and the added relation map.
|
|
480
|
-
*/
|
|
481
|
-
setRelationMap(model: FragmentsGroup, relationMap: RelationsMap): void;
|
|
482
|
-
/**
|
|
483
|
-
* Processes a given model to index its IFC entities relations based on predefined inverse attributes.
|
|
484
|
-
* This method iterates through each specified inverse attribute, retrieves the corresponding relations,
|
|
485
|
-
* and maps them in a structured way to facilitate quick access to related entities.
|
|
486
|
-
*
|
|
487
|
-
* The process involves querying the model for each relation type associated with the inverse attributes
|
|
488
|
-
* and updating the internal relationMaps with the relationships found. This map is keyed by the model's UUID
|
|
489
|
-
* and contains a nested map where each key is an entity's expressID and its value is another map.
|
|
490
|
-
* This inner map's keys are the indices of the inverse attributes, and its values are arrays of expressIDs
|
|
491
|
-
* of entities that are related through that attribute.
|
|
492
|
-
*
|
|
493
|
-
* @param model The 'FragmentsGroup' model to be processed. It must have properties loaded.
|
|
494
|
-
* @returns A promise that resolves to the relations map for the processed model. This map is a detailed
|
|
495
|
-
* representation of the relations indexed by entity expressIDs and relation types.
|
|
496
|
-
* @throws An error if the model does not have properties loaded.
|
|
497
|
-
*/
|
|
498
|
-
process(model: FragmentsGroup): Promise<RelationsMap>;
|
|
499
|
-
/**
|
|
500
|
-
* Processes a given model from a WebIfc API to index its IFC entities relations based on predefined inverse attributes.
|
|
501
|
-
*
|
|
502
|
-
* @param ifcApi - The WebIfc API instance from which to retrieve the model's properties.
|
|
503
|
-
* @param modelID - The unique identifier of the model within the WebIfc API.
|
|
504
|
-
* @returns A promise that resolves to the relations map for the processed model.
|
|
505
|
-
* This map is a detailed representation of the relations indexed by entity expressIDs and relation types.
|
|
506
|
-
*/
|
|
507
|
-
processFromWebIfc(ifcApi: WEBIFC.IfcAPI, modelID: number): Promise<RelationsMap>;
|
|
508
|
-
/**
|
|
509
|
-
* Retrieves the relations of a specific entity within a model based on the given relation name.
|
|
510
|
-
* This method searches the indexed relation maps for the specified model and entity,
|
|
511
|
-
* returning the IDs of related entities if a match is found.
|
|
512
|
-
*
|
|
513
|
-
* @param model The 'FragmentsGroup' model containing the entity.
|
|
514
|
-
* @param expressID The unique identifier of the entity within the model.
|
|
515
|
-
* @param relationName The IFC schema inverse attribute of the relation to search for (e.g., "IsDefinedBy", "ContainsElements").
|
|
516
|
-
* @returns An array of express IDs representing the related entities, or 'null' if no relations are found
|
|
517
|
-
* or the specified relation name is not indexed.
|
|
518
|
-
*/
|
|
519
|
-
getEntityRelations(model: FragmentsGroup, expressID: number, relationName: InverseAttribute): number[] | null;
|
|
520
|
-
/**
|
|
521
|
-
* Serializes the relations of a given relation map into a JSON string.
|
|
522
|
-
* This method iterates through the relations in the given map, organizing them into a structured object where each key is an expressID of an entity,
|
|
523
|
-
* and its value is another object mapping relation indices to arrays of related entity expressIDs.
|
|
524
|
-
* The resulting object is then serialized into a JSON string.
|
|
525
|
-
*
|
|
526
|
-
* @param relationMap - The map of relations to be serialized. The map keys are expressIDs of entities, and the values are maps where each key is a relation type ID and its value is an array of expressIDs of entities related through that relation type.
|
|
527
|
-
* @returns A JSON string representing the serialized relations of the given relation map.
|
|
528
|
-
*/
|
|
529
|
-
serializeRelations(relationMap: RelationsMap): string;
|
|
530
|
-
/**
|
|
531
|
-
* Serializes the relations of a specific model into a JSON string.
|
|
532
|
-
* This method iterates through the relations indexed for the given model,
|
|
533
|
-
* organizing them into a structured object where each key is an expressID of an entity,
|
|
534
|
-
* and its value is another object mapping relation indices to arrays of related entity expressIDs.
|
|
535
|
-
* The resulting object is then serialized into a JSON string.
|
|
536
|
-
*
|
|
537
|
-
* @param model The 'FragmentsGroup' model whose relations are to be serialized.
|
|
538
|
-
* @returns A JSON string representing the serialized relations of the specified model.
|
|
539
|
-
* If the model has no indexed relations, 'null' is returned.
|
|
540
|
-
*/
|
|
541
|
-
serializeModelRelations(model: FragmentsGroup): string | null;
|
|
542
|
-
/**
|
|
543
|
-
* Serializes all relations of every model processed by the indexer into a JSON string.
|
|
544
|
-
* This method iterates through each model's relations indexed in 'relationMaps', organizing them
|
|
545
|
-
* into a structured JSON object. Each top-level key in this object corresponds to a model's UUID,
|
|
546
|
-
* and its value is another object mapping entity expressIDs to their related entities, categorized
|
|
547
|
-
* by relation types. The structure facilitates easy access to any entity's relations across all models.
|
|
548
|
-
*
|
|
549
|
-
* @returns A JSON string representing the serialized relations of all models processed by the indexer.
|
|
550
|
-
* If no relations have been indexed, an empty object is returned as a JSON string.
|
|
551
|
-
*/
|
|
552
|
-
serializeAllRelations(): string;
|
|
553
|
-
/**
|
|
554
|
-
* Converts a JSON string representing relations between entities into a structured map.
|
|
555
|
-
* This method parses the JSON string to reconstruct the relations map that indexes
|
|
556
|
-
* entity relations by their express IDs. The outer map keys are the express IDs of entities,
|
|
557
|
-
* and the values are maps where each key is a relation type ID and its value is an array
|
|
558
|
-
* of express IDs of entities related through that relation type.
|
|
559
|
-
*
|
|
560
|
-
* @param json The JSON string to be parsed into the relations map.
|
|
561
|
-
* @returns A 'Map' where the key is the express ID of an entity as a number, and the value
|
|
562
|
-
* is another 'Map'. This inner map's key is the relation type ID as a number, and its value
|
|
563
|
-
* is an array of express IDs (as numbers) of entities related through that relation type.
|
|
564
|
-
*/
|
|
565
|
-
getRelationsMapFromJSON(json: string): RelationsMap;
|
|
618
|
+
orthogonalY: boolean;
|
|
566
619
|
/**
|
|
567
|
-
*
|
|
568
|
-
*
|
|
569
|
-
*
|
|
620
|
+
* The tolerance that determines whether an almost-horizontal clipping plane
|
|
621
|
+
* will be forced to be orthogonal to the Y direction. {@link orthogonalY}
|
|
622
|
+
* has to be 'true' for this to apply.
|
|
570
623
|
*/
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
type StringPropTypes = "IfcText" | "IfcLabel" | "IfcIdentifier";
|
|
578
|
-
type NumericPropTypes = "IfcInteger" | "IfcReal";
|
|
579
|
-
interface ChangeMap {
|
|
580
|
-
[modelID: string]: Set<number>;
|
|
581
|
-
}
|
|
582
|
-
interface AttributeListener {
|
|
583
|
-
[modelID: string]: {
|
|
584
|
-
[expressID: number]: {
|
|
585
|
-
[attributeName: string]: Event<String | Boolean | Number>;
|
|
586
|
-
};
|
|
587
|
-
};
|
|
588
|
-
}
|
|
589
|
-
export declare class IfcPropertiesManager extends Component implements Disposable {
|
|
590
|
-
static readonly uuid: "58c2d9f0-183c-48d6-a402-dfcf5b9a34df";
|
|
591
|
-
/** {@link Disposable.onDisposed} */
|
|
592
|
-
readonly onDisposed: Event<string>;
|
|
593
|
-
readonly onRequestFile: Event<unknown>;
|
|
594
|
-
ifcToExport: ArrayBuffer | null;
|
|
595
|
-
readonly onElementToPset: Event<{
|
|
596
|
-
model: FragmentsGroup;
|
|
597
|
-
psetID: number;
|
|
598
|
-
elementID: number;
|
|
599
|
-
}>;
|
|
600
|
-
readonly onPropToPset: Event<{
|
|
601
|
-
model: FragmentsGroup;
|
|
602
|
-
psetID: number;
|
|
603
|
-
propID: number;
|
|
604
|
-
}>;
|
|
605
|
-
readonly onPsetRemoved: Event<{
|
|
606
|
-
model: FragmentsGroup;
|
|
607
|
-
psetID: number;
|
|
608
|
-
}>;
|
|
609
|
-
readonly onDataChanged: Event<{
|
|
610
|
-
model: FragmentsGroup;
|
|
611
|
-
expressID: number;
|
|
612
|
-
}>;
|
|
613
|
-
wasm: {
|
|
614
|
-
path: string;
|
|
615
|
-
absolute: boolean;
|
|
616
|
-
};
|
|
617
|
-
enabled: boolean;
|
|
618
|
-
attributeListeners: AttributeListener;
|
|
619
|
-
selectedModel?: FragmentsGroup;
|
|
620
|
-
private _changeMap;
|
|
621
|
-
constructor(components: Components);
|
|
622
|
-
get(): ChangeMap;
|
|
623
|
-
dispose(): void;
|
|
624
|
-
private increaseMaxID;
|
|
625
|
-
static getIFCSchema(model: FragmentsGroup): import("@thatopen/fragments").IfcSchema;
|
|
626
|
-
private newGUID;
|
|
627
|
-
private getOwnerHistory;
|
|
628
|
-
private registerChange;
|
|
629
|
-
setData(model: FragmentsGroup, ...dataToSave: Record<string, any>[]): Promise<void>;
|
|
630
|
-
newPset(model: FragmentsGroup, name: string, description?: string): Promise<{
|
|
631
|
-
pset: WEBIFC.IFC2X3.IfcPropertySet | WEBIFC.IFC4.IfcPropertySet | WEBIFC.IFC4X3.IfcPropertySet;
|
|
632
|
-
rel: WEBIFC.IFC4X3.IfcRelDefinesByProperties | WEBIFC.IFC4.IfcRelDefinesByProperties | WEBIFC.IFC2X3.IfcRelDefinesByProperties;
|
|
633
|
-
}>;
|
|
634
|
-
removePset(model: FragmentsGroup, ...psetID: number[]): Promise<void>;
|
|
635
|
-
private newSingleProperty;
|
|
636
|
-
newSingleStringProperty(model: FragmentsGroup, type: StringPropTypes, name: string, value: string): Promise<WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
|
|
637
|
-
newSingleNumericProperty(model: FragmentsGroup, type: NumericPropTypes, name: string, value: number): Promise<WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
|
|
638
|
-
newSingleBooleanProperty(model: FragmentsGroup, type: BooleanPropTypes, name: string, value: boolean): Promise<WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
|
|
639
|
-
removePsetProp(model: FragmentsGroup, psetID: number, propID: number): Promise<void>;
|
|
640
|
-
addElementToPset(model: FragmentsGroup, psetID: number, ...elementID: number[]): Promise<void>;
|
|
641
|
-
addPropToPset(model: FragmentsGroup, psetID: number, ...propID: number[]): Promise<void>;
|
|
642
|
-
saveToIfc(model: FragmentsGroup, ifcToSaveOn: Uint8Array): Promise<Uint8Array>;
|
|
643
|
-
setAttributeListener(model: FragmentsGroup, expressID: number, attributeName: string): Promise<Event<String | Number | Boolean>>;
|
|
644
|
-
}
|
|
645
|
-
export {};
|
|
646
|
-
import * as THREE from "three";
|
|
647
|
-
export declare class MaterialsUtils {
|
|
648
|
-
static isTransparent(material: THREE.Material): boolean;
|
|
649
|
-
}
|
|
650
|
-
export declare class UUID {
|
|
651
|
-
private static _pattern;
|
|
652
|
-
private static _lut;
|
|
653
|
-
static create(): string;
|
|
654
|
-
static validate(uuid: string): void;
|
|
655
|
-
}
|
|
656
|
-
import * as THREE from "three";
|
|
657
|
-
import { Component, Components, Event, World, Disposable } from "../core";
|
|
658
|
-
export interface VertexPickerConfig {
|
|
659
|
-
showOnlyVertex: boolean;
|
|
660
|
-
snapDistance: number;
|
|
661
|
-
previewElement: HTMLElement;
|
|
662
|
-
}
|
|
663
|
-
export declare class VertexPicker extends Component implements Disposable {
|
|
664
|
-
onVertexFound: Event<THREE.Vector3>;
|
|
665
|
-
onVertexLost: Event<THREE.Vector3>;
|
|
666
|
-
components: Components;
|
|
667
|
-
private _pickedPoint;
|
|
668
|
-
private _config;
|
|
624
|
+
toleranceOrthogonalY: number;
|
|
625
|
+
list: T[];
|
|
626
|
+
protected PlaneType: new (...args: any) => SimplePlane | T;
|
|
627
|
+
/** The material used in all the clipping planes. */
|
|
628
|
+
protected _material: THREE.MeshBasicMaterial;
|
|
629
|
+
private _size;
|
|
669
630
|
private _enabled;
|
|
670
|
-
private
|
|
671
|
-
/** {@link
|
|
672
|
-
readonly onDisposed: Event<unknown>;
|
|
673
|
-
set enabled(value: boolean);
|
|
631
|
+
private _visible;
|
|
632
|
+
/** {@link Component.enabled} */
|
|
674
633
|
get enabled(): boolean;
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
get
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
get(
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
static readonly uuid: "d260618b-ce88-4c7d-826c-6debb91de3e2";
|
|
690
|
-
enabled: boolean;
|
|
691
|
-
height: number;
|
|
692
|
-
groupName: string;
|
|
693
|
-
/** {@link Disposable.onDisposed} */
|
|
694
|
-
readonly onDisposed: Event<string>;
|
|
695
|
-
list: Set<string>;
|
|
634
|
+
/** {@link Component.enabled} */
|
|
635
|
+
set enabled(state: boolean);
|
|
636
|
+
/** {@link Hideable.visible } */
|
|
637
|
+
get visible(): boolean;
|
|
638
|
+
/** {@link Hideable.visible } */
|
|
639
|
+
set visible(state: boolean);
|
|
640
|
+
/** The material of the clipping plane representation. */
|
|
641
|
+
get material(): THREE.MeshBasicMaterial;
|
|
642
|
+
/** The material of the clipping plane representation. */
|
|
643
|
+
set material(material: THREE.MeshBasicMaterial);
|
|
644
|
+
/** The size of the geometric representation of the clippings planes. */
|
|
645
|
+
get size(): number;
|
|
646
|
+
/** The size of the geometric representation of the clippings planes. */
|
|
647
|
+
set size(size: number);
|
|
696
648
|
constructor(components: Components);
|
|
649
|
+
endCreation(): void;
|
|
650
|
+
cancelCreation(): void;
|
|
651
|
+
/** {@link Disposable.dispose} */
|
|
697
652
|
dispose(): void;
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
653
|
+
/** {@link Createable.create} */
|
|
654
|
+
create(world: World): void;
|
|
655
|
+
/**
|
|
656
|
+
* Creates a plane in a certain place and with a certain orientation,
|
|
657
|
+
* without the need of the mouse.
|
|
658
|
+
*
|
|
659
|
+
* @param world - the world where this plane should be created.
|
|
660
|
+
* @param normal - the orientation of the clipping plane.
|
|
661
|
+
* @param point - the position of the clipping plane.
|
|
662
|
+
* navigation.
|
|
663
|
+
*/
|
|
664
|
+
createFromNormalAndCoplanarPoint(world: World, normal: THREE.Vector3, point: THREE.Vector3): T;
|
|
665
|
+
/**
|
|
666
|
+
* {@link Createable.delete}
|
|
667
|
+
*
|
|
668
|
+
* @param world - the world where the plane to delete is.
|
|
669
|
+
* @param plane - the plane to delete. If undefined, the first plane
|
|
670
|
+
* found under the cursor will be deleted.
|
|
671
|
+
*/
|
|
672
|
+
delete(world: World, plane?: T): void;
|
|
673
|
+
/** Deletes all the existing clipping planes. */
|
|
674
|
+
deleteAll(): void;
|
|
675
|
+
private deletePlane;
|
|
676
|
+
private pickPlane;
|
|
677
|
+
private getAllPlaneMeshes;
|
|
678
|
+
private createPlaneFromIntersection;
|
|
679
|
+
private getWorldNormal;
|
|
680
|
+
private normalizePlaneDirectionY;
|
|
681
|
+
private newPlane;
|
|
682
|
+
protected newPlaneInstance(world: World, point: THREE.Vector3, normal: THREE.Vector3): T;
|
|
683
|
+
private updateMaterialsAndPlanes;
|
|
684
|
+
private _onStartDragging;
|
|
685
|
+
private _onEndDragging;
|
|
701
686
|
}
|
|
702
687
|
import * as THREE from "three";
|
|
703
688
|
import * as FRAGS from "@thatopen/fragments";
|
|
@@ -707,7 +692,7 @@ import { Component, Components, Disposable, Event } from "../../core";
|
|
|
707
692
|
* A simple implementation of bounding box that works for fragments. The resulting bbox is not 100% precise, but
|
|
708
693
|
* it's fast, and should suffice for general use cases such as camera zooming or general boundary determination.
|
|
709
694
|
*/
|
|
710
|
-
export declare class
|
|
695
|
+
export declare class BoundingBoxes extends Component implements Disposable {
|
|
711
696
|
static readonly uuid: "d1444724-dba6-4cdd-a0c7-68ee1450d166";
|
|
712
697
|
/** {@link Component.enabled} */
|
|
713
698
|
enabled: boolean;
|
|
@@ -732,10 +717,30 @@ export declare class FragmentBoundingBox extends Component implements Disposable
|
|
|
732
717
|
getMesh(): THREE.Mesh<THREE.BoxGeometry, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
|
|
733
718
|
reset(): void;
|
|
734
719
|
add(group: FragmentsGroup): void;
|
|
735
|
-
addMesh(mesh: THREE.InstancedMesh | THREE.Mesh | FRAGS.CurveMesh): void;
|
|
720
|
+
addMesh(mesh: THREE.InstancedMesh | THREE.Mesh | FRAGS.CurveMesh, itemIDs?: Iterable<number>): void;
|
|
736
721
|
private static getFragmentBounds;
|
|
737
722
|
}
|
|
738
723
|
import * as THREE from "three";
|
|
724
|
+
export interface MeasureEdge {
|
|
725
|
+
distance: number;
|
|
726
|
+
points: THREE.Vector3[];
|
|
727
|
+
}
|
|
728
|
+
export declare class MeasurementUtils {
|
|
729
|
+
static getFace(mesh: THREE.InstancedMesh | THREE.Mesh, triangleIndex: number, instance?: number): {
|
|
730
|
+
edges: MeasureEdge[];
|
|
731
|
+
indices: Set<number>;
|
|
732
|
+
} | null;
|
|
733
|
+
static distanceFromPointToLine(point: THREE.Vector3, lineStart: THREE.Vector3, lineEnd: THREE.Vector3, clamp?: boolean): number;
|
|
734
|
+
private static getFaceData;
|
|
735
|
+
static getVerticesAndNormal(mesh: THREE.Mesh | THREE.InstancedMesh, faceIndex: number, instance: number | undefined): {
|
|
736
|
+
p1: THREE.Vector3;
|
|
737
|
+
p2: THREE.Vector3;
|
|
738
|
+
p3: THREE.Vector3;
|
|
739
|
+
faceNormal: THREE.Vector3;
|
|
740
|
+
};
|
|
741
|
+
private static round;
|
|
742
|
+
}
|
|
743
|
+
import * as THREE from "three";
|
|
739
744
|
import * as FRAGS from "@thatopen/fragments";
|
|
740
745
|
import { Disposable, Component, Event, Components } from "../../core";
|
|
741
746
|
export interface Classification {
|
|
@@ -762,10 +767,25 @@ export declare class FragmentClassifier extends Component implements Disposable
|
|
|
762
767
|
byEntity(group: FRAGS.FragmentsGroup): void;
|
|
763
768
|
byStorey(group: FRAGS.FragmentsGroup): void;
|
|
764
769
|
byIfcRel(group: FRAGS.FragmentsGroup, ifcRel: number, systemName: string): Promise<void>;
|
|
765
|
-
setColor(items: FRAGS.FragmentIdMap, color: THREE.Color,
|
|
770
|
+
setColor(items: FRAGS.FragmentIdMap, color: THREE.Color, override?: boolean): void;
|
|
766
771
|
resetColor(items: FRAGS.FragmentIdMap): void;
|
|
767
772
|
private saveItem;
|
|
768
773
|
}
|
|
774
|
+
import { Component, Disposable, Event, Components } from "../../core";
|
|
775
|
+
export declare class FragmentExploder extends Component implements Disposable {
|
|
776
|
+
static readonly uuid: "d260618b-ce88-4c7d-826c-6debb91de3e2";
|
|
777
|
+
enabled: boolean;
|
|
778
|
+
height: number;
|
|
779
|
+
groupName: string;
|
|
780
|
+
/** {@link Disposable.onDisposed} */
|
|
781
|
+
readonly onDisposed: Event<string>;
|
|
782
|
+
list: Set<string>;
|
|
783
|
+
constructor(components: Components);
|
|
784
|
+
dispose(): void;
|
|
785
|
+
explode(): void;
|
|
786
|
+
reset(): void;
|
|
787
|
+
update(): void;
|
|
788
|
+
}
|
|
769
789
|
import * as FRAGS from "@thatopen/fragments";
|
|
770
790
|
import { Components, Component } from "../../core";
|
|
771
791
|
export declare class FragmentHider extends Component {
|
|
@@ -777,36 +797,11 @@ export declare class FragmentHider extends Component {
|
|
|
777
797
|
private updateCulledVisibility;
|
|
778
798
|
}
|
|
779
799
|
import * as WEBIFC from "web-ifc";
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
export declare class
|
|
784
|
-
|
|
785
|
-
readonly onIfcStartedLoading: Event<void>;
|
|
786
|
-
readonly onSetup: Event<void>;
|
|
787
|
-
/** {@link Disposable.onDisposed} */
|
|
788
|
-
readonly onDisposed: Event<string>;
|
|
789
|
-
settings: IfcFragmentSettings;
|
|
790
|
-
enabled: boolean;
|
|
791
|
-
webIfc: WEBIFC.IfcAPI;
|
|
792
|
-
private _material;
|
|
793
|
-
private _spatialTree;
|
|
794
|
-
private _metaData;
|
|
795
|
-
private _fragmentInstances;
|
|
796
|
-
private _civil;
|
|
797
|
-
private _propertyExporter;
|
|
798
|
-
private _visitedFragments;
|
|
799
|
-
private _materialT;
|
|
800
|
-
constructor(components: Components);
|
|
801
|
-
dispose(): void;
|
|
802
|
-
setup(config?: Partial<IfcFragmentSettings>): Promise<void>;
|
|
803
|
-
load(data: Uint8Array, coordinate?: boolean): Promise<FRAGS.FragmentsGroup>;
|
|
804
|
-
readIfcFile(data: Uint8Array): Promise<number>;
|
|
805
|
-
private getAllGeometries;
|
|
806
|
-
cleanUp(): void;
|
|
807
|
-
private getMesh;
|
|
808
|
-
private getGeometry;
|
|
809
|
-
private autoSetWasm;
|
|
800
|
+
export interface IfcItemsCategories {
|
|
801
|
+
[itemID: number]: number;
|
|
802
|
+
}
|
|
803
|
+
export declare class IfcCategories {
|
|
804
|
+
getAll(webIfc: WEBIFC.IfcAPI, modelID: number): IfcItemsCategories;
|
|
810
805
|
}
|
|
811
806
|
import { Fragment, FragmentsGroup } from "@thatopen/fragments";
|
|
812
807
|
import * as THREE from "three";
|
|
@@ -852,66 +847,70 @@ export declare class FragmentManager extends Component implements Disposable {
|
|
|
852
847
|
export(group: FragmentsGroup): Uint8Array;
|
|
853
848
|
coordinate(models?: FragmentsGroup[]): void;
|
|
854
849
|
}
|
|
855
|
-
import * as
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
850
|
+
import * as FRAGS from "@thatopen/fragments";
|
|
851
|
+
export declare class IfcPropertiesUtils {
|
|
852
|
+
static getUnits(group: FRAGS.FragmentsGroup): Promise<number>;
|
|
853
|
+
static findItemByGuid(model: FRAGS.FragmentsGroup, guid: string): Promise<{
|
|
854
|
+
[attribute: string]: any;
|
|
855
|
+
} | null>;
|
|
856
|
+
static getRelationMap(model: FRAGS.FragmentsGroup, relationType: number, onElementsFound?: (relatingID: number, relatedIDs: number[]) => Promise<void>): Promise<{
|
|
857
|
+
[relatingID: number]: number[];
|
|
863
858
|
}>;
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
859
|
+
static getQsetQuantities(model: FRAGS.FragmentsGroup, expressID: number, onQuantityFound?: (expressID: number) => void): Promise<number[] | null>;
|
|
860
|
+
static getPsetProps(model: FRAGS.FragmentsGroup, expressID: number, onPropFound?: (expressID: number) => void): Promise<number[] | null>;
|
|
861
|
+
static getPsetRel(model: FRAGS.FragmentsGroup, psetID: number): Promise<number | null>;
|
|
862
|
+
static getQsetRel(model: FRAGS.FragmentsGroup, qsetID: number): Promise<number | null>;
|
|
863
|
+
static getEntityName(model: FRAGS.FragmentsGroup, entityID: number): Promise<{
|
|
864
|
+
key: string | null;
|
|
865
|
+
name: string | null;
|
|
866
|
+
}>;
|
|
867
|
+
static getQuantityValue(model: FRAGS.FragmentsGroup, quantityID: number): Promise<{
|
|
868
|
+
key: string | null;
|
|
869
|
+
value: number | null;
|
|
870
|
+
}>;
|
|
871
|
+
static isRel(expressID: number): boolean;
|
|
872
|
+
static attributeExists(model: FRAGS.FragmentsGroup, expressID: number, attribute: string): Promise<boolean>;
|
|
873
|
+
static groupEntitiesByType(model: FRAGS.FragmentsGroup, expressIDs: Set<number> | number[]): Promise<Map<number, Set<number>>>;
|
|
874
|
+
}
|
|
875
|
+
import * as WEBIFC from "web-ifc";
|
|
876
|
+
import * as FRAGS from "@thatopen/fragments";
|
|
877
|
+
import { IfcFragmentSettings } from "./src";
|
|
878
|
+
import { Component, Components, Event, Disposable } from "../../core";
|
|
879
|
+
export declare class FragmentIfcLoader extends Component implements Disposable {
|
|
880
|
+
static readonly uuid: "a659add7-1418-4771-a0d6-7d4d438e4624";
|
|
881
|
+
readonly onIfcStartedLoading: Event<void>;
|
|
882
|
+
readonly onSetup: Event<void>;
|
|
867
883
|
/** {@link Disposable.onDisposed} */
|
|
868
|
-
readonly onDisposed: Event<
|
|
869
|
-
settings:
|
|
884
|
+
readonly onDisposed: Event<string>;
|
|
885
|
+
settings: IfcFragmentSettings;
|
|
870
886
|
enabled: boolean;
|
|
871
887
|
webIfc: WEBIFC.IfcAPI;
|
|
888
|
+
private _material;
|
|
872
889
|
private _spatialTree;
|
|
873
890
|
private _metaData;
|
|
874
|
-
private
|
|
875
|
-
private _streamSerializer;
|
|
876
|
-
private _geometries;
|
|
877
|
-
private _geometryCount;
|
|
891
|
+
private _fragmentInstances;
|
|
878
892
|
private _civil;
|
|
879
|
-
private
|
|
880
|
-
private
|
|
881
|
-
private
|
|
893
|
+
private _propertyExporter;
|
|
894
|
+
private _visitedFragments;
|
|
895
|
+
private _materialT;
|
|
882
896
|
constructor(components: Components);
|
|
883
897
|
dispose(): void;
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
private
|
|
888
|
-
|
|
889
|
-
private cleanUp;
|
|
898
|
+
setup(config?: Partial<IfcFragmentSettings>): Promise<void>;
|
|
899
|
+
load(data: Uint8Array, coordinate?: boolean): Promise<FRAGS.FragmentsGroup>;
|
|
900
|
+
readIfcFile(data: Uint8Array): Promise<number>;
|
|
901
|
+
private getAllGeometries;
|
|
902
|
+
cleanUp(): void;
|
|
890
903
|
private getMesh;
|
|
891
904
|
private getGeometry;
|
|
892
|
-
private
|
|
893
|
-
private streamGeometries;
|
|
894
|
-
}
|
|
895
|
-
import * as THREE from "three";
|
|
896
|
-
export interface MeasureEdge {
|
|
897
|
-
distance: number;
|
|
898
|
-
points: THREE.Vector3[];
|
|
899
|
-
}
|
|
900
|
-
export declare class MeasurementUtils {
|
|
901
|
-
static getFace(mesh: THREE.InstancedMesh | THREE.Mesh, triangleIndex: number, instance?: number): {
|
|
902
|
-
edges: MeasureEdge[];
|
|
903
|
-
indices: Set<number>;
|
|
904
|
-
} | null;
|
|
905
|
-
static distanceFromPointToLine(point: THREE.Vector3, lineStart: THREE.Vector3, lineEnd: THREE.Vector3, clamp?: boolean): number;
|
|
906
|
-
private static getFaceData;
|
|
907
|
-
static getVerticesAndNormal(mesh: THREE.Mesh | THREE.InstancedMesh, faceIndex: number, instance: number | undefined): {
|
|
908
|
-
p1: THREE.Vector3;
|
|
909
|
-
p2: THREE.Vector3;
|
|
910
|
-
p3: THREE.Vector3;
|
|
911
|
-
faceNormal: THREE.Vector3;
|
|
912
|
-
};
|
|
913
|
-
private static round;
|
|
905
|
+
private autoSetWasm;
|
|
914
906
|
}
|
|
907
|
+
export declare const IfcCategoryMap: {
|
|
908
|
+
[key: number]: string;
|
|
909
|
+
};
|
|
910
|
+
export declare const IfcElements: {
|
|
911
|
+
[key: number]: string;
|
|
912
|
+
};
|
|
913
|
+
export declare const GeometryTypes: Set<number>;
|
|
915
914
|
import * as WEBIFC from "web-ifc";
|
|
916
915
|
import { AsyncEvent, Component, Disposable, Event } from "../../core";
|
|
917
916
|
import { PropertiesStreamingSettings } from "../IfcGeometryTiler";
|
|
@@ -938,45 +937,46 @@ export declare class IfcPropertiesTiler extends Component implements Disposable
|
|
|
938
937
|
private streamAllProperties;
|
|
939
938
|
private cleanUp;
|
|
940
939
|
}
|
|
941
|
-
import * as WEBIFC from "web-ifc";
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
[key: number]: string;
|
|
950
|
-
};
|
|
951
|
-
export declare const IfcCategoryMap: {
|
|
952
|
-
[key: number]: string;
|
|
953
|
-
};
|
|
954
|
-
import * as FRAGS from "@thatopen/fragments";
|
|
955
|
-
export declare class IfcPropertiesUtils {
|
|
956
|
-
static getUnits(group: FRAGS.FragmentsGroup): Promise<number>;
|
|
957
|
-
static findItemByGuid(model: FRAGS.FragmentsGroup, guid: string): Promise<{
|
|
958
|
-
[attribute: string]: any;
|
|
959
|
-
} | null>;
|
|
960
|
-
static getRelationMap(model: FRAGS.FragmentsGroup, relationType: number, onElementsFound?: (relatingID: number, relatedIDs: number[]) => Promise<void>): Promise<{
|
|
961
|
-
[relatingID: number]: number[];
|
|
962
|
-
}>;
|
|
963
|
-
static getQsetQuantities(model: FRAGS.FragmentsGroup, expressID: number, onQuantityFound?: (expressID: number) => void): Promise<number[] | null>;
|
|
964
|
-
static getPsetProps(model: FRAGS.FragmentsGroup, expressID: number, onPropFound?: (expressID: number) => void): Promise<number[] | null>;
|
|
965
|
-
static getPsetRel(model: FRAGS.FragmentsGroup, psetID: number): Promise<number | null>;
|
|
966
|
-
static getQsetRel(model: FRAGS.FragmentsGroup, qsetID: number): Promise<number | null>;
|
|
967
|
-
static getEntityName(model: FRAGS.FragmentsGroup, entityID: number): Promise<{
|
|
968
|
-
key: string | null;
|
|
969
|
-
name: string | null;
|
|
970
|
-
}>;
|
|
971
|
-
static getQuantityValue(model: FRAGS.FragmentsGroup, quantityID: number): Promise<{
|
|
972
|
-
key: string | null;
|
|
973
|
-
value: number | null;
|
|
940
|
+
import * as WEBIFC from "web-ifc";
|
|
941
|
+
import { Components, Disposable, Event, Component } from "../../core";
|
|
942
|
+
import { IfcStreamingSettings, StreamedGeometries, StreamedAsset } from "./src";
|
|
943
|
+
export declare class IfcGeometryTiler extends Component implements Disposable {
|
|
944
|
+
static readonly uuid: "d9999a00-e1f5-4d3f-8cfe-c56e08609764";
|
|
945
|
+
onGeometryStreamed: Event<{
|
|
946
|
+
buffer: Uint8Array;
|
|
947
|
+
data: StreamedGeometries;
|
|
974
948
|
}>;
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
949
|
+
onAssetStreamed: Event<StreamedAsset[]>;
|
|
950
|
+
onProgress: Event<number>;
|
|
951
|
+
onIfcLoaded: Event<Uint8Array>;
|
|
952
|
+
/** {@link Disposable.onDisposed} */
|
|
953
|
+
readonly onDisposed: Event<unknown>;
|
|
954
|
+
settings: IfcStreamingSettings;
|
|
955
|
+
enabled: boolean;
|
|
956
|
+
webIfc: WEBIFC.IfcAPI;
|
|
957
|
+
private _spatialTree;
|
|
958
|
+
private _metaData;
|
|
959
|
+
private _visitedGeometries;
|
|
960
|
+
private _streamSerializer;
|
|
961
|
+
private _geometries;
|
|
962
|
+
private _geometryCount;
|
|
963
|
+
private _civil;
|
|
964
|
+
private _groupSerializer;
|
|
965
|
+
private _assets;
|
|
966
|
+
private _meshesWithHoles;
|
|
967
|
+
constructor(components: Components);
|
|
968
|
+
dispose(): void;
|
|
969
|
+
streamFromBuffer(data: Uint8Array): Promise<void>;
|
|
970
|
+
streamFromCallBack(loadCallback: WEBIFC.ModelLoadCallback): Promise<void>;
|
|
971
|
+
private readIfcFile;
|
|
972
|
+
private streamIfcFile;
|
|
973
|
+
private streamAllGeometries;
|
|
974
|
+
private cleanUp;
|
|
975
|
+
private getMesh;
|
|
976
|
+
private getGeometry;
|
|
977
|
+
private streamAssets;
|
|
978
|
+
private streamGeometries;
|
|
978
979
|
}
|
|
979
|
-
export declare const GeometryTypes: Set<number>;
|
|
980
980
|
import * as THREE from "three";
|
|
981
981
|
import { Event, Resizeable, Updateable, Disposable, World } from "../../../core";
|
|
982
982
|
export declare class MiniMap implements Resizeable, Updateable, Disposable {
|
|
@@ -1011,10 +1011,96 @@ export declare class MiniMap implements Resizeable, Updateable, Disposable {
|
|
|
1011
1011
|
resize(size?: THREE.Vector2): void;
|
|
1012
1012
|
private updatePlanes;
|
|
1013
1013
|
}
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1014
|
+
import * as THREE from "three";
|
|
1015
|
+
import { Event, Base, World, BaseScene, BaseCamera, BaseRenderer } from "../../Types";
|
|
1016
|
+
import { Components } from "../../Components";
|
|
1017
|
+
export declare class SimpleWorld<T extends BaseScene = BaseScene, U extends BaseCamera = BaseCamera, S extends BaseRenderer = BaseRenderer> extends Base implements World {
|
|
1018
|
+
/**
|
|
1019
|
+
* All the loaded [meshes](https://threejs.org/docs/#api/en/objects/Mesh).
|
|
1020
|
+
*/
|
|
1021
|
+
readonly meshes: Set<THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>>;
|
|
1022
|
+
readonly onAfterUpdate: Event<unknown>;
|
|
1023
|
+
readonly onBeforeUpdate: Event<unknown>;
|
|
1024
|
+
enabled: boolean;
|
|
1025
|
+
uuid: string;
|
|
1026
|
+
readonly onDisposed: Event<unknown>;
|
|
1027
|
+
private _scene?;
|
|
1028
|
+
private _camera?;
|
|
1029
|
+
private _renderer;
|
|
1030
|
+
get scene(): T;
|
|
1031
|
+
set scene(scene: T);
|
|
1032
|
+
get camera(): U;
|
|
1033
|
+
set camera(camera: U);
|
|
1034
|
+
get renderer(): S | null;
|
|
1035
|
+
set renderer(renderer: S | null);
|
|
1036
|
+
constructor(components: Components);
|
|
1037
|
+
update(delta?: number): void;
|
|
1038
|
+
dispose(disposeResources?: boolean): void;
|
|
1039
|
+
}
|
|
1040
|
+
import * as THREE from "three";
|
|
1041
|
+
import { BaseRenderer, Event } from "../../Types";
|
|
1042
|
+
import { Components } from "../../Components";
|
|
1043
|
+
/**
|
|
1044
|
+
* A basic renderer capable of rendering
|
|
1045
|
+
* ([Objec3Ds](https://threejs.org/docs/#api/en/core/Object3D).
|
|
1046
|
+
*/
|
|
1047
|
+
export declare class SimpleRenderer extends BaseRenderer {
|
|
1048
|
+
enabled: boolean;
|
|
1049
|
+
/** The HTML container of the THREE.js canvas where the scene is rendered. */
|
|
1050
|
+
container: HTMLElement;
|
|
1051
|
+
three: THREE.WebGLRenderer;
|
|
1052
|
+
protected _canvas: HTMLCanvasElement;
|
|
1053
|
+
protected _parameters?: Partial<THREE.WebGLRendererParameters>;
|
|
1054
|
+
protected _resizeObserver: ResizeObserver | null;
|
|
1055
|
+
protected onContainerUpdated: Event<HTMLElement>;
|
|
1056
|
+
constructor(components: Components, container: HTMLElement, parameters?: Partial<THREE.WebGLRendererParameters>);
|
|
1057
|
+
/** {@link Updateable.update} */
|
|
1058
|
+
update(): void;
|
|
1059
|
+
/** {@link Disposable.dispose} */
|
|
1060
|
+
dispose(): void;
|
|
1061
|
+
/** {@link Resizeable.getSize}. */
|
|
1062
|
+
getSize(): THREE.Vector2;
|
|
1063
|
+
/** {@link Resizeable.resize} */
|
|
1064
|
+
resize: (size?: THREE.Vector2) => void;
|
|
1065
|
+
setupEvents(active: boolean): void;
|
|
1066
|
+
private resizeEvent;
|
|
1067
|
+
private setupRenderer;
|
|
1068
|
+
private onContextLost;
|
|
1069
|
+
private onContextBack;
|
|
1070
|
+
}
|
|
1071
|
+
export declare const getRelationMap: (properties: Record<string, Record<string, any>>, relationType: number, onElementsFound?: ((relatingID: number, relatedIDs: number[]) => void) | undefined) => {
|
|
1072
|
+
[relatingID: number]: number[];
|
|
1073
|
+
};
|
|
1074
|
+
import * as THREE from "three";
|
|
1075
|
+
import { BaseScene, Configurable, Event } from "../../Types";
|
|
1076
|
+
import { Components } from "../../Components";
|
|
1077
|
+
export interface SimpleSceneConfig {
|
|
1078
|
+
directionalLight: {
|
|
1079
|
+
color: THREE.Color;
|
|
1080
|
+
intensity: number;
|
|
1081
|
+
position: THREE.Vector3;
|
|
1082
|
+
};
|
|
1083
|
+
ambientLight: {
|
|
1084
|
+
color: THREE.Color;
|
|
1085
|
+
intensity: number;
|
|
1086
|
+
};
|
|
1087
|
+
}
|
|
1088
|
+
/**
|
|
1089
|
+
* A basic 3D [scene](https://threejs.org/docs/#api/en/scenes/Scene) to add
|
|
1090
|
+
* objects hierarchically, and easily dispose them when you are finished with it.
|
|
1091
|
+
* @noInheritDoc
|
|
1092
|
+
*/
|
|
1093
|
+
export declare class SimpleScene extends BaseScene implements Configurable<{}> {
|
|
1094
|
+
/** {@link Configurable.isSetup} */
|
|
1095
|
+
isSetup: boolean;
|
|
1096
|
+
three: THREE.Scene;
|
|
1097
|
+
/** {@link Configurable.onSetup} */
|
|
1098
|
+
readonly onSetup: Event<SimpleScene>;
|
|
1099
|
+
config: Required<SimpleSceneConfig>;
|
|
1100
|
+
constructor(components: Components);
|
|
1101
|
+
/** Creates a simple and nice default set up for the scene (e.g. lighting). */
|
|
1102
|
+
setup(config?: Partial<SimpleSceneConfig>): void;
|
|
1103
|
+
}
|
|
1018
1104
|
import * as WEBIFC from "web-ifc";
|
|
1019
1105
|
import { IfcItemsCategories } from "../../../ifc";
|
|
1020
1106
|
export declare class SpatialStructure {
|
|
@@ -1023,9 +1109,52 @@ export declare class SpatialStructure {
|
|
|
1023
1109
|
setUp(webIfc: WEBIFC.IfcAPI): void;
|
|
1024
1110
|
cleanUp(): void;
|
|
1025
1111
|
}
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
};
|
|
1112
|
+
import * as THREE from "three";
|
|
1113
|
+
import CameraControls from "camera-controls";
|
|
1114
|
+
import { Disposable, Updateable, Event, BaseCamera } from "../../Types";
|
|
1115
|
+
import { Components } from "../../Components";
|
|
1116
|
+
/**
|
|
1117
|
+
* A basic camera that uses
|
|
1118
|
+
* [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls) to
|
|
1119
|
+
* easily control the camera in 2D and 3D. Check out it's API to find out
|
|
1120
|
+
* what features it offers.
|
|
1121
|
+
*/
|
|
1122
|
+
export declare class SimpleCamera extends BaseCamera implements Updateable, Disposable {
|
|
1123
|
+
/** {@link Updateable.onBeforeUpdate} */
|
|
1124
|
+
readonly onBeforeUpdate: Event<SimpleCamera>;
|
|
1125
|
+
/** {@link Updateable.onAfterUpdate} */
|
|
1126
|
+
readonly onAfterUpdate: Event<SimpleCamera>;
|
|
1127
|
+
readonly onAspectUpdated: Event<unknown>;
|
|
1128
|
+
/** {@link Disposable.onDisposed} */
|
|
1129
|
+
readonly onDisposed: Event<string>;
|
|
1130
|
+
readonly three: THREE.PerspectiveCamera;
|
|
1131
|
+
private _allControls;
|
|
1132
|
+
/**
|
|
1133
|
+
* The object that controls the camera. An instance of
|
|
1134
|
+
* [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls).
|
|
1135
|
+
* Transforming the camera directly will have no effect: you need to use this
|
|
1136
|
+
* object to move, rotate, look at objects, etc.
|
|
1137
|
+
*/
|
|
1138
|
+
get controls(): CameraControls;
|
|
1139
|
+
/** {@link Component.enabled} */
|
|
1140
|
+
get enabled(): boolean;
|
|
1141
|
+
/** {@link Component.enabled} */
|
|
1142
|
+
set enabled(enabled: boolean);
|
|
1143
|
+
constructor(components: Components);
|
|
1144
|
+
/** {@link Disposable.dispose} */
|
|
1145
|
+
dispose(): void;
|
|
1146
|
+
/** {@link Updateable.update} */
|
|
1147
|
+
update(_delta: number): void;
|
|
1148
|
+
/**
|
|
1149
|
+
* Updates the aspect of the camera to match the size of the
|
|
1150
|
+
* {@link Components.renderer}.
|
|
1151
|
+
*/
|
|
1152
|
+
updateAspect: () => void;
|
|
1153
|
+
private setupCamera;
|
|
1154
|
+
private newCameraControls;
|
|
1155
|
+
private setupEvents;
|
|
1156
|
+
private static getSubsetOfThree;
|
|
1157
|
+
}
|
|
1029
1158
|
/// <reference types="node" />
|
|
1030
1159
|
import * as THREE from "three";
|
|
1031
1160
|
import { Hideable, Event, World } from "../../Types";
|
|
@@ -1054,88 +1183,30 @@ export declare class SimpleGrid implements Hideable, Disposable {
|
|
|
1054
1183
|
/** The material of the grid. */
|
|
1055
1184
|
get material(): THREE.ShaderMaterial;
|
|
1056
1185
|
/**
|
|
1057
|
-
* Whether the grid should fade away with distance. Recommended to be true for
|
|
1058
|
-
* perspective cameras and false for orthographic cameras.
|
|
1059
|
-
*/
|
|
1060
|
-
get fade(): boolean;
|
|
1061
|
-
/**
|
|
1062
|
-
* Whether the grid should fade away with distance. Recommended to be true for
|
|
1063
|
-
* perspective cameras and false for orthographic cameras.
|
|
1064
|
-
*/
|
|
1065
|
-
set fade(active: boolean);
|
|
1066
|
-
private readonly _grid;
|
|
1067
|
-
private _fade;
|
|
1068
|
-
constructor(components: Components, world: World, config: GridConfig);
|
|
1069
|
-
[Symbol.dispose](): void;
|
|
1070
|
-
/** {@link Component.get} */
|
|
1071
|
-
get(): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
|
|
1072
|
-
/** {@link Disposable.dispose} */
|
|
1073
|
-
dispose(): void;
|
|
1074
|
-
private setupEvents;
|
|
1075
|
-
private updateZoom;
|
|
1076
|
-
}
|
|
1077
|
-
import * as THREE from "three";
|
|
1078
|
-
import { Components } from "../../Components";
|
|
1079
|
-
import { Event, World, Disposable } from "../../Types";
|
|
1080
|
-
import { Mouse } from "./mouse";
|
|
1081
|
-
/**
|
|
1082
|
-
* A simple [raycaster](https://threejs.org/docs/#api/en/core/Raycaster)
|
|
1083
|
-
* that allows to easily get items from the scene using the mouse and touch
|
|
1084
|
-
* events.
|
|
1085
|
-
*/
|
|
1086
|
-
export declare class SimpleRaycaster implements Disposable {
|
|
1087
|
-
/** {@link Component.enabled} */
|
|
1088
|
-
enabled: boolean;
|
|
1089
|
-
components: Components;
|
|
1090
|
-
/** {@link Disposable.onDisposed} */
|
|
1091
|
-
readonly onDisposed: Event<unknown>;
|
|
1092
|
-
/** The position of the mouse in the screen. */
|
|
1093
|
-
readonly mouse: Mouse;
|
|
1094
|
-
readonly three: THREE.Raycaster;
|
|
1095
|
-
world: World;
|
|
1096
|
-
constructor(components: Components, world: World);
|
|
1097
|
-
/** {@link Disposable.dispose} */
|
|
1098
|
-
dispose(): void;
|
|
1099
|
-
/**
|
|
1100
|
-
* Throws a ray from the camera to the mouse or touch event point and returns
|
|
1101
|
-
* the first item found. This also takes into account the clipping planes
|
|
1102
|
-
* used by the renderer.
|
|
1103
|
-
*
|
|
1104
|
-
* @param items - the [meshes](https://threejs.org/docs/#api/en/objects/Mesh)
|
|
1105
|
-
* to query. If not provided, it will query all the meshes stored in
|
|
1106
|
-
* {@link Components.meshes}.
|
|
1107
|
-
*/
|
|
1108
|
-
castRay(items?: THREE.Mesh[]): THREE.Intersection | null;
|
|
1109
|
-
castRayFromVector(origin: THREE.Vector3, direction: THREE.Vector3, items?: THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>[]): THREE.Intersection<THREE.Object3D<THREE.Object3DEventMap>> | null;
|
|
1110
|
-
private intersect;
|
|
1111
|
-
private filterClippingPlanes;
|
|
1112
|
-
}
|
|
1113
|
-
import * as THREE from "three";
|
|
1114
|
-
import { Disposable, Event } from "../../Types";
|
|
1115
|
-
/**
|
|
1116
|
-
* A helper to easily get the real position of the mouse in the Three.js canvas
|
|
1117
|
-
* to work with tools like the
|
|
1118
|
-
* [raycaster](https://threejs.org/docs/#api/en/core/Raycaster), even if it has
|
|
1119
|
-
* been transformed through CSS or doesn't occupy the whole screen.
|
|
1120
|
-
*/
|
|
1121
|
-
export declare class Mouse implements Disposable {
|
|
1122
|
-
dom: HTMLCanvasElement;
|
|
1123
|
-
private _event?;
|
|
1124
|
-
private _position;
|
|
1125
|
-
/** {@link Disposable.onDisposed} */
|
|
1126
|
-
readonly onDisposed: Event<unknown>;
|
|
1127
|
-
constructor(dom: HTMLCanvasElement);
|
|
1186
|
+
* Whether the grid should fade away with distance. Recommended to be true for
|
|
1187
|
+
* perspective cameras and false for orthographic cameras.
|
|
1188
|
+
*/
|
|
1189
|
+
get fade(): boolean;
|
|
1128
1190
|
/**
|
|
1129
|
-
*
|
|
1191
|
+
* Whether the grid should fade away with distance. Recommended to be true for
|
|
1192
|
+
* perspective cameras and false for orthographic cameras.
|
|
1130
1193
|
*/
|
|
1131
|
-
|
|
1194
|
+
set fade(active: boolean);
|
|
1195
|
+
private readonly _grid;
|
|
1196
|
+
private _fade;
|
|
1197
|
+
constructor(components: Components, world: World, config: GridConfig);
|
|
1198
|
+
[Symbol.dispose](): void;
|
|
1199
|
+
/** {@link Component.get} */
|
|
1200
|
+
get(): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
|
|
1132
1201
|
/** {@link Disposable.dispose} */
|
|
1133
1202
|
dispose(): void;
|
|
1134
|
-
private getPositionY;
|
|
1135
|
-
private getPositionX;
|
|
1136
|
-
private updateMouseInfo;
|
|
1137
1203
|
private setupEvents;
|
|
1204
|
+
private updateZoom;
|
|
1138
1205
|
}
|
|
1206
|
+
export declare const relToAttributesMap: Map<number, {
|
|
1207
|
+
forRelating?: "IsDecomposedBy" | "Decomposes" | "AssociatedTo" | "HasAssociations" | "ClassificationForObjects" | "IsGroupedBy" | "HasAssignments" | "IsDefinedBy" | "DefinesOcurrence" | "IsTypedBy" | "Types" | "Defines" | "ContainedInStructure" | "ContainsElements" | undefined;
|
|
1208
|
+
forRelated?: "IsDecomposedBy" | "Decomposes" | "AssociatedTo" | "HasAssociations" | "ClassificationForObjects" | "IsGroupedBy" | "HasAssignments" | "IsDefinedBy" | "DefinesOcurrence" | "IsTypedBy" | "Types" | "Defines" | "ContainedInStructure" | "ContainsElements" | undefined;
|
|
1209
|
+
}>;
|
|
1139
1210
|
/**
|
|
1140
1211
|
* Simple event handler by
|
|
1141
1212
|
* [Jason Kleban](https://gist.github.com/JasonKleban/50cee44960c225ac1993c922563aa540).
|
|
@@ -1345,6 +1416,23 @@ export declare abstract class Component extends Base {
|
|
|
1345
1416
|
*/
|
|
1346
1417
|
abstract enabled: boolean;
|
|
1347
1418
|
}
|
|
1419
|
+
import { Base } from "./base";
|
|
1420
|
+
import { World } from "./world";
|
|
1421
|
+
import { Event } from "./event";
|
|
1422
|
+
import { Components } from "../../Components";
|
|
1423
|
+
/**
|
|
1424
|
+
* One of the elements that make a world. It can be either a scene, a camera
|
|
1425
|
+
* or a renderer.
|
|
1426
|
+
*/
|
|
1427
|
+
export declare abstract class BaseWorldItem extends Base {
|
|
1428
|
+
readonly worlds: Map<string, World>;
|
|
1429
|
+
readonly onWorldChanged: Event<{
|
|
1430
|
+
world: World;
|
|
1431
|
+
action: "added" | "removed";
|
|
1432
|
+
}>;
|
|
1433
|
+
currentWorld: World | null;
|
|
1434
|
+
protected constructor(components: Components);
|
|
1435
|
+
}
|
|
1348
1436
|
import { Disposable, Hideable, Resizeable, Updateable, Configurable } from "./interfaces";
|
|
1349
1437
|
import { Components } from "../../Components";
|
|
1350
1438
|
/**
|
|
@@ -1364,23 +1452,6 @@ export declare abstract class Base {
|
|
|
1364
1452
|
/** Whether is component is {@link Configurable}. */
|
|
1365
1453
|
isConfigurable: () => this is Configurable<any>;
|
|
1366
1454
|
}
|
|
1367
|
-
import { Base } from "./base";
|
|
1368
|
-
import { World } from "./world";
|
|
1369
|
-
import { Event } from "./event";
|
|
1370
|
-
import { Components } from "../../Components";
|
|
1371
|
-
/**
|
|
1372
|
-
* One of the elements that make a world. It can be either a scene, a camera
|
|
1373
|
-
* or a renderer.
|
|
1374
|
-
*/
|
|
1375
|
-
export declare abstract class BaseWorldItem extends Base {
|
|
1376
|
-
readonly worlds: Map<string, World>;
|
|
1377
|
-
readonly onWorldChanged: Event<{
|
|
1378
|
-
world: World;
|
|
1379
|
-
action: "added" | "removed";
|
|
1380
|
-
}>;
|
|
1381
|
-
currentWorld: World | null;
|
|
1382
|
-
protected constructor(components: Components);
|
|
1383
|
-
}
|
|
1384
1455
|
import * as THREE from "three";
|
|
1385
1456
|
import CameraControls from "camera-controls";
|
|
1386
1457
|
import { BaseWorldItem } from "./base-world-item";
|
|
@@ -1446,6 +1517,32 @@ export declare abstract class BaseScene extends BaseWorldItem implements Disposa
|
|
|
1446
1517
|
dispose(): void;
|
|
1447
1518
|
}
|
|
1448
1519
|
import * as THREE from "three";
|
|
1520
|
+
import { Disposable, Event } from "../../Types";
|
|
1521
|
+
/**
|
|
1522
|
+
* A helper to easily get the real position of the mouse in the Three.js canvas
|
|
1523
|
+
* to work with tools like the
|
|
1524
|
+
* [raycaster](https://threejs.org/docs/#api/en/core/Raycaster), even if it has
|
|
1525
|
+
* been transformed through CSS or doesn't occupy the whole screen.
|
|
1526
|
+
*/
|
|
1527
|
+
export declare class Mouse implements Disposable {
|
|
1528
|
+
dom: HTMLCanvasElement;
|
|
1529
|
+
private _event?;
|
|
1530
|
+
private _position;
|
|
1531
|
+
/** {@link Disposable.onDisposed} */
|
|
1532
|
+
readonly onDisposed: Event<unknown>;
|
|
1533
|
+
constructor(dom: HTMLCanvasElement);
|
|
1534
|
+
/**
|
|
1535
|
+
* The real position of the mouse of the Three.js canvas.
|
|
1536
|
+
*/
|
|
1537
|
+
get position(): THREE.Vector2;
|
|
1538
|
+
/** {@link Disposable.dispose} */
|
|
1539
|
+
dispose(): void;
|
|
1540
|
+
private getPositionY;
|
|
1541
|
+
private getPositionX;
|
|
1542
|
+
private updateMouseInfo;
|
|
1543
|
+
private setupEvents;
|
|
1544
|
+
}
|
|
1545
|
+
import * as THREE from "three";
|
|
1449
1546
|
import { BaseScene } from "./base-scene";
|
|
1450
1547
|
import { BaseCamera } from "./base-camera";
|
|
1451
1548
|
import { BaseRenderer } from "./base-renderer";
|
|
@@ -1457,138 +1554,157 @@ export interface World extends Disposable, Updateable {
|
|
|
1457
1554
|
renderer: BaseRenderer | null;
|
|
1458
1555
|
uuid: string;
|
|
1459
1556
|
}
|
|
1460
|
-
import
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
readonly onAfterUpdate: Event<unknown>;
|
|
1469
|
-
readonly onBeforeUpdate: Event<unknown>;
|
|
1557
|
+
import { NavigationMode } from "./types";
|
|
1558
|
+
/**
|
|
1559
|
+
* A {@link NavigationMode} that allows first person navigation,
|
|
1560
|
+
* simulating FPS video games.
|
|
1561
|
+
*/
|
|
1562
|
+
export declare class FirstPersonMode implements NavigationMode {
|
|
1563
|
+
private camera;
|
|
1564
|
+
/** {@link NavigationMode.enabled} */
|
|
1470
1565
|
enabled: boolean;
|
|
1471
|
-
|
|
1472
|
-
readonly
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
set scene(scene: T);
|
|
1478
|
-
get camera(): U;
|
|
1479
|
-
set camera(camera: U);
|
|
1480
|
-
get renderer(): S | null;
|
|
1481
|
-
set renderer(renderer: S | null);
|
|
1482
|
-
constructor(components: Components);
|
|
1483
|
-
update(delta?: number): void;
|
|
1484
|
-
dispose(disposeResources?: boolean): void;
|
|
1566
|
+
/** {@link NavigationMode.id} */
|
|
1567
|
+
readonly id = "FirstPerson";
|
|
1568
|
+
constructor(camera: any);
|
|
1569
|
+
/** {@link NavigationMode.set} */
|
|
1570
|
+
set(active: boolean): void;
|
|
1571
|
+
private setupFirstPersonCamera;
|
|
1485
1572
|
}
|
|
1486
1573
|
import * as THREE from "three";
|
|
1487
|
-
import { BaseScene, Configurable, Event } from "../../Types";
|
|
1488
1574
|
import { Components } from "../../Components";
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1575
|
+
import { Event, World, Disposable } from "../../Types";
|
|
1576
|
+
import { Mouse } from "./mouse";
|
|
1577
|
+
/**
|
|
1578
|
+
* A simple [raycaster](https://threejs.org/docs/#api/en/core/Raycaster)
|
|
1579
|
+
* that allows to easily get items from the scene using the mouse and touch
|
|
1580
|
+
* events.
|
|
1581
|
+
*/
|
|
1582
|
+
export declare class SimpleRaycaster implements Disposable {
|
|
1583
|
+
/** {@link Component.enabled} */
|
|
1584
|
+
enabled: boolean;
|
|
1585
|
+
components: Components;
|
|
1586
|
+
/** {@link Disposable.onDisposed} */
|
|
1587
|
+
readonly onDisposed: Event<unknown>;
|
|
1588
|
+
/** The position of the mouse in the screen. */
|
|
1589
|
+
readonly mouse: Mouse;
|
|
1590
|
+
readonly three: THREE.Raycaster;
|
|
1591
|
+
world: World;
|
|
1592
|
+
constructor(components: Components, world: World);
|
|
1593
|
+
/** {@link Disposable.dispose} */
|
|
1594
|
+
dispose(): void;
|
|
1595
|
+
/**
|
|
1596
|
+
* Throws a ray from the camera to the mouse or touch event point and returns
|
|
1597
|
+
* the first item found. This also takes into account the clipping planes
|
|
1598
|
+
* used by the renderer.
|
|
1599
|
+
*
|
|
1600
|
+
* @param items - the [meshes](https://threejs.org/docs/#api/en/objects/Mesh)
|
|
1601
|
+
* to query. If not provided, it will query all the meshes stored in
|
|
1602
|
+
* {@link Components.meshes}.
|
|
1603
|
+
*/
|
|
1604
|
+
castRay(items?: THREE.Mesh[]): THREE.Intersection | null;
|
|
1605
|
+
castRayFromVector(origin: THREE.Vector3, direction: THREE.Vector3, items?: THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>[]): THREE.Intersection<THREE.Object3D<THREE.Object3DEventMap>> | null;
|
|
1606
|
+
private intersect;
|
|
1607
|
+
private filterClippingPlanes;
|
|
1499
1608
|
}
|
|
1609
|
+
import { NavigationMode } from "./types";
|
|
1500
1610
|
/**
|
|
1501
|
-
* A
|
|
1502
|
-
*
|
|
1503
|
-
* @noInheritDoc
|
|
1611
|
+
* A {@link NavigationMode} that allows 3D navigation and panning
|
|
1612
|
+
* like in many 3D and CAD softwares.
|
|
1504
1613
|
*/
|
|
1505
|
-
export declare class
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
/** {@link
|
|
1510
|
-
readonly
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1614
|
+
export declare class OrbitMode implements NavigationMode {
|
|
1615
|
+
camera: any;
|
|
1616
|
+
/** {@link NavigationMode.enabled} */
|
|
1617
|
+
enabled: boolean;
|
|
1618
|
+
/** {@link NavigationMode.id} */
|
|
1619
|
+
readonly id = "Orbit";
|
|
1620
|
+
constructor(camera: any);
|
|
1621
|
+
/** {@link NavigationMode.set} */
|
|
1622
|
+
set(active: boolean): void;
|
|
1623
|
+
private activateOrbitControls;
|
|
1515
1624
|
}
|
|
1516
|
-
import
|
|
1517
|
-
import { BaseRenderer, Event } from "../../Types";
|
|
1518
|
-
import { Components } from "../../Components";
|
|
1625
|
+
import { NavigationMode } from "./types";
|
|
1519
1626
|
/**
|
|
1520
|
-
* A
|
|
1521
|
-
*
|
|
1627
|
+
* A {@link NavigationMode} that allows to navigate floorplans in 2D,
|
|
1628
|
+
* like many BIM tools.
|
|
1522
1629
|
*/
|
|
1523
|
-
export declare class
|
|
1630
|
+
export declare class PlanMode implements NavigationMode {
|
|
1631
|
+
private camera;
|
|
1632
|
+
/** {@link NavigationMode.enabled} */
|
|
1524
1633
|
enabled: boolean;
|
|
1525
|
-
/**
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
constructor(
|
|
1533
|
-
/** {@link
|
|
1534
|
-
|
|
1535
|
-
/** {@link Disposable.dispose} */
|
|
1536
|
-
dispose(): void;
|
|
1537
|
-
/** {@link Resizeable.getSize}. */
|
|
1538
|
-
getSize(): THREE.Vector2;
|
|
1539
|
-
/** {@link Resizeable.resize} */
|
|
1540
|
-
resize: (size?: THREE.Vector2) => void;
|
|
1541
|
-
setupEvents(active: boolean): void;
|
|
1542
|
-
private resizeEvent;
|
|
1543
|
-
private setupRenderer;
|
|
1544
|
-
private onContextLost;
|
|
1545
|
-
private onContextBack;
|
|
1634
|
+
/** {@link NavigationMode.id} */
|
|
1635
|
+
readonly id = "Plan";
|
|
1636
|
+
private mouseAction1?;
|
|
1637
|
+
private mouseAction2?;
|
|
1638
|
+
private mouseInitialized;
|
|
1639
|
+
private readonly defaultAzimuthSpeed;
|
|
1640
|
+
private readonly defaultPolarSpeed;
|
|
1641
|
+
constructor(camera: any);
|
|
1642
|
+
/** {@link NavigationMode.set} */
|
|
1643
|
+
set(active: boolean): void;
|
|
1546
1644
|
}
|
|
1547
1645
|
import * as THREE from "three";
|
|
1548
|
-
import
|
|
1549
|
-
import {
|
|
1550
|
-
import {
|
|
1646
|
+
import { CameraProjection } from "./types";
|
|
1647
|
+
import { Event } from "../../../core";
|
|
1648
|
+
import { OrthoPerspectiveCamera } from "../index";
|
|
1551
1649
|
/**
|
|
1552
|
-
*
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
* what features it offers.
|
|
1556
|
-
*/
|
|
1557
|
-
export declare class SimpleCamera extends BaseCamera implements Updateable, Disposable {
|
|
1558
|
-
/** {@link Updateable.onBeforeUpdate} */
|
|
1559
|
-
readonly onBeforeUpdate: Event<SimpleCamera>;
|
|
1560
|
-
/** {@link Updateable.onAfterUpdate} */
|
|
1561
|
-
readonly onAfterUpdate: Event<SimpleCamera>;
|
|
1562
|
-
readonly onAspectUpdated: Event<unknown>;
|
|
1563
|
-
/** {@link Disposable.onDisposed} */
|
|
1564
|
-
readonly onDisposed: Event<string>;
|
|
1565
|
-
readonly three: THREE.PerspectiveCamera;
|
|
1566
|
-
private _allControls;
|
|
1650
|
+
* Object to control the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
|
|
1651
|
+
*/
|
|
1652
|
+
export declare class ProjectionManager {
|
|
1567
1653
|
/**
|
|
1568
|
-
*
|
|
1569
|
-
* [yomotsu's cameracontrols](https://github.com/yomotsu/camera-controls).
|
|
1570
|
-
* Transforming the camera directly will have no effect: you need to use this
|
|
1571
|
-
* object to move, rotate, look at objects, etc.
|
|
1654
|
+
* Event that fires when the {@link CameraProjection} changes.
|
|
1572
1655
|
*/
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
/** {@link Updateable.update} */
|
|
1582
|
-
update(_delta: number): void;
|
|
1656
|
+
readonly onChanged: Event<THREE.Camera>;
|
|
1657
|
+
current: CameraProjection;
|
|
1658
|
+
camera: THREE.PerspectiveCamera | THREE.OrthographicCamera;
|
|
1659
|
+
private _component;
|
|
1660
|
+
private _previousDistance;
|
|
1661
|
+
/** Match Ortho zoom with Perspective distance when changing projection mode */
|
|
1662
|
+
matchOrthoDistanceEnabled: boolean;
|
|
1663
|
+
constructor(camera: OrthoPerspectiveCamera);
|
|
1583
1664
|
/**
|
|
1584
|
-
*
|
|
1585
|
-
*
|
|
1665
|
+
* Sets the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
|
|
1666
|
+
*
|
|
1667
|
+
* @param projection - the new projection to set. If it is the current projection,
|
|
1668
|
+
* it will have no effect.
|
|
1586
1669
|
*/
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1670
|
+
set(projection: CameraProjection): Promise<void>;
|
|
1671
|
+
/**
|
|
1672
|
+
* Changes the current {@link CameraProjection} from Ortographic to Perspective
|
|
1673
|
+
* and vice versa.
|
|
1674
|
+
*/
|
|
1675
|
+
toggle(): Promise<void>;
|
|
1676
|
+
private setOrthoCamera;
|
|
1677
|
+
private getDims;
|
|
1678
|
+
private setupOrthoCamera;
|
|
1679
|
+
private getDistance;
|
|
1680
|
+
private setPerspectiveCamera;
|
|
1681
|
+
}
|
|
1682
|
+
/**
|
|
1683
|
+
* The projection system of the camera.
|
|
1684
|
+
*/
|
|
1685
|
+
export type CameraProjection = "Perspective" | "Orthographic";
|
|
1686
|
+
/**
|
|
1687
|
+
* The extensible list of supported navigation modes.
|
|
1688
|
+
*/
|
|
1689
|
+
export type NavModeID = "Orbit" | "FirstPerson" | "Plan";
|
|
1690
|
+
/**
|
|
1691
|
+
* An object that determines the behavior of the camera controls
|
|
1692
|
+
* and the user input (e.g. 2D floor plan mode, first person mode, etc).
|
|
1693
|
+
*/
|
|
1694
|
+
export interface NavigationMode {
|
|
1695
|
+
/** The unique ID of this navigation mode. */
|
|
1696
|
+
id: NavModeID;
|
|
1697
|
+
/**
|
|
1698
|
+
* Enable or disable this navigation mode.
|
|
1699
|
+
* When a new navigation mode is enabled, the previous navigation mode
|
|
1700
|
+
* must be disabled.
|
|
1701
|
+
*
|
|
1702
|
+
* @param active - whether to enable or disable this mode.
|
|
1703
|
+
* @param options - any additional data required to enable or disable it.
|
|
1704
|
+
* */
|
|
1705
|
+
set: (active: boolean, options?: any) => void;
|
|
1706
|
+
/** Whether this navigation mode is active or not. */
|
|
1707
|
+
enabled: boolean;
|
|
1592
1708
|
}
|
|
1593
1709
|
import * as THREE from "three";
|
|
1594
1710
|
import { Components } from "../../Components";
|
|
@@ -1747,131 +1863,15 @@ export declare class SimplePlane implements Disposable, Hideable {
|
|
|
1747
1863
|
private newHelper;
|
|
1748
1864
|
private static newPlaneMesh;
|
|
1749
1865
|
}
|
|
1750
|
-
import
|
|
1751
|
-
/**
|
|
1752
|
-
* A {@link NavigationMode} that allows first person navigation,
|
|
1753
|
-
* simulating FPS video games.
|
|
1754
|
-
*/
|
|
1755
|
-
export declare class FirstPersonMode implements NavigationMode {
|
|
1756
|
-
private camera;
|
|
1757
|
-
/** {@link NavigationMode.enabled} */
|
|
1758
|
-
enabled: boolean;
|
|
1759
|
-
/** {@link NavigationMode.id} */
|
|
1760
|
-
readonly id = "FirstPerson";
|
|
1761
|
-
constructor(camera: any);
|
|
1762
|
-
/** {@link NavigationMode.set} */
|
|
1763
|
-
set(active: boolean): void;
|
|
1764
|
-
private setupFirstPersonCamera;
|
|
1765
|
-
}
|
|
1766
|
-
import { NavigationMode } from "./types";
|
|
1767
|
-
/**
|
|
1768
|
-
* A {@link NavigationMode} that allows 3D navigation and panning
|
|
1769
|
-
* like in many 3D and CAD softwares.
|
|
1770
|
-
*/
|
|
1771
|
-
export declare class OrbitMode implements NavigationMode {
|
|
1772
|
-
camera: any;
|
|
1773
|
-
/** {@link NavigationMode.enabled} */
|
|
1774
|
-
enabled: boolean;
|
|
1775
|
-
/** {@link NavigationMode.id} */
|
|
1776
|
-
readonly id = "Orbit";
|
|
1777
|
-
constructor(camera: any);
|
|
1778
|
-
/** {@link NavigationMode.set} */
|
|
1779
|
-
set(active: boolean): void;
|
|
1780
|
-
private activateOrbitControls;
|
|
1781
|
-
}
|
|
1782
|
-
import { NavigationMode } from "./types";
|
|
1783
|
-
/**
|
|
1784
|
-
* A {@link NavigationMode} that allows to navigate floorplans in 2D,
|
|
1785
|
-
* like many BIM tools.
|
|
1786
|
-
*/
|
|
1787
|
-
export declare class PlanMode implements NavigationMode {
|
|
1788
|
-
private camera;
|
|
1789
|
-
/** {@link NavigationMode.enabled} */
|
|
1790
|
-
enabled: boolean;
|
|
1791
|
-
/** {@link NavigationMode.id} */
|
|
1792
|
-
readonly id = "Plan";
|
|
1793
|
-
private mouseAction1?;
|
|
1794
|
-
private mouseAction2?;
|
|
1795
|
-
private mouseInitialized;
|
|
1796
|
-
private readonly defaultAzimuthSpeed;
|
|
1797
|
-
private readonly defaultPolarSpeed;
|
|
1798
|
-
constructor(camera: any);
|
|
1799
|
-
/** {@link NavigationMode.set} */
|
|
1800
|
-
set(active: boolean): void;
|
|
1801
|
-
}
|
|
1866
|
+
import * as WEBIFC from "web-ifc";
|
|
1802
1867
|
import * as THREE from "three";
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
/**
|
|
1811
|
-
* Event that fires when the {@link CameraProjection} changes.
|
|
1812
|
-
*/
|
|
1813
|
-
readonly onChanged: Event<THREE.Camera>;
|
|
1814
|
-
current: CameraProjection;
|
|
1815
|
-
camera: THREE.PerspectiveCamera | THREE.OrthographicCamera;
|
|
1816
|
-
private _component;
|
|
1817
|
-
private _previousDistance;
|
|
1818
|
-
/** Match Ortho zoom with Perspective distance when changing projection mode */
|
|
1819
|
-
matchOrthoDistanceEnabled: boolean;
|
|
1820
|
-
constructor(camera: OrthoPerspectiveCamera);
|
|
1821
|
-
/**
|
|
1822
|
-
* Sets the {@link CameraProjection} of the {@link OrthoPerspectiveCamera}.
|
|
1823
|
-
*
|
|
1824
|
-
* @param projection - the new projection to set. If it is the current projection,
|
|
1825
|
-
* it will have no effect.
|
|
1826
|
-
*/
|
|
1827
|
-
set(projection: CameraProjection): Promise<void>;
|
|
1828
|
-
/**
|
|
1829
|
-
* Changes the current {@link CameraProjection} from Ortographic to Perspective
|
|
1830
|
-
* and vice versa.
|
|
1831
|
-
*/
|
|
1832
|
-
toggle(): Promise<void>;
|
|
1833
|
-
private setOrthoCamera;
|
|
1834
|
-
private getDims;
|
|
1835
|
-
private setupOrthoCamera;
|
|
1836
|
-
private getDistance;
|
|
1837
|
-
private setPerspectiveCamera;
|
|
1838
|
-
}
|
|
1839
|
-
/**
|
|
1840
|
-
* The projection system of the camera.
|
|
1841
|
-
*/
|
|
1842
|
-
export type CameraProjection = "Perspective" | "Orthographic";
|
|
1843
|
-
/**
|
|
1844
|
-
* The extensible list of supported navigation modes.
|
|
1845
|
-
*/
|
|
1846
|
-
export type NavModeID = "Orbit" | "FirstPerson" | "Plan";
|
|
1847
|
-
/**
|
|
1848
|
-
* An object that determines the behavior of the camera controls
|
|
1849
|
-
* and the user input (e.g. 2D floor plan mode, first person mode, etc).
|
|
1850
|
-
*/
|
|
1851
|
-
export interface NavigationMode {
|
|
1852
|
-
/** The unique ID of this navigation mode. */
|
|
1853
|
-
id: NavModeID;
|
|
1854
|
-
/**
|
|
1855
|
-
* Enable or disable this navigation mode.
|
|
1856
|
-
* When a new navigation mode is enabled, the previous navigation mode
|
|
1857
|
-
* must be disabled.
|
|
1858
|
-
*
|
|
1859
|
-
* @param active - whether to enable or disable this mode.
|
|
1860
|
-
* @param options - any additional data required to enable or disable it.
|
|
1861
|
-
* */
|
|
1862
|
-
set: (active: boolean, options?: any) => void;
|
|
1863
|
-
/** Whether this navigation mode is active or not. */
|
|
1864
|
-
enabled: boolean;
|
|
1865
|
-
}
|
|
1866
|
-
import { IfcFragmentSettings } from "../../FragmentIfcLoader/src";
|
|
1867
|
-
/** Configuration of the IFC-fragment streaming. */
|
|
1868
|
-
export declare class IfcStreamingSettings extends IfcFragmentSettings {
|
|
1869
|
-
minGeometrySize: number;
|
|
1870
|
-
minAssetsSize: number;
|
|
1871
|
-
}
|
|
1872
|
-
/** Configuration of the IFC-fragment streaming. */
|
|
1873
|
-
export declare class PropertiesStreamingSettings extends IfcFragmentSettings {
|
|
1874
|
-
propertiesSize: number;
|
|
1868
|
+
export declare class Units {
|
|
1869
|
+
factor: number;
|
|
1870
|
+
complement: number;
|
|
1871
|
+
apply(matrix: THREE.Matrix4): void;
|
|
1872
|
+
setUp(webIfc: WEBIFC.IfcAPI): void;
|
|
1873
|
+
private getLengthUnits;
|
|
1874
|
+
private getScaleMatrix;
|
|
1875
1875
|
}
|
|
1876
1876
|
import * as WEBIFC from "web-ifc";
|
|
1877
1877
|
import { AsyncEvent, Component, Disposable, Event } from "../../../core";
|
|
@@ -1915,6 +1915,31 @@ export interface StreamedAsset {
|
|
|
1915
1915
|
color: number[];
|
|
1916
1916
|
}[];
|
|
1917
1917
|
}
|
|
1918
|
+
import * as THREE from "three";
|
|
1919
|
+
import * as WEBIFC from "web-ifc";
|
|
1920
|
+
import * as FRAGS from "@thatopen/fragments";
|
|
1921
|
+
export declare class CivilReader {
|
|
1922
|
+
defLineMat: THREE.LineBasicMaterial;
|
|
1923
|
+
read(webIfc: WEBIFC.IfcAPI): {
|
|
1924
|
+
alignments: Map<number, FRAGS.Alignment>;
|
|
1925
|
+
coordinationMatrix: THREE.Matrix4;
|
|
1926
|
+
} | undefined;
|
|
1927
|
+
get(civilItems: any): {
|
|
1928
|
+
alignments: Map<number, FRAGS.Alignment>;
|
|
1929
|
+
coordinationMatrix: THREE.Matrix4;
|
|
1930
|
+
} | undefined;
|
|
1931
|
+
private getCurves;
|
|
1932
|
+
}
|
|
1933
|
+
import { IfcFragmentSettings } from "../../FragmentIfcLoader/src";
|
|
1934
|
+
/** Configuration of the IFC-fragment streaming. */
|
|
1935
|
+
export declare class IfcStreamingSettings extends IfcFragmentSettings {
|
|
1936
|
+
minGeometrySize: number;
|
|
1937
|
+
minAssetsSize: number;
|
|
1938
|
+
}
|
|
1939
|
+
/** Configuration of the IFC-fragment streaming. */
|
|
1940
|
+
export declare class PropertiesStreamingSettings extends IfcFragmentSettings {
|
|
1941
|
+
propertiesSize: number;
|
|
1942
|
+
}
|
|
1918
1943
|
import * as WEBIFC from "web-ifc";
|
|
1919
1944
|
/** Configuration of the IFC-fragment conversion. */
|
|
1920
1945
|
export declare class IfcFragmentSettings {
|
|
@@ -1942,35 +1967,10 @@ export declare class IfcFragmentSettings {
|
|
|
1942
1967
|
autoSetWasm: boolean;
|
|
1943
1968
|
customLocateFileHandler: WEBIFC.LocateFileHandlerFn | null;
|
|
1944
1969
|
}
|
|
1945
|
-
import * as THREE from "three";
|
|
1946
|
-
import * as WEBIFC from "web-ifc";
|
|
1947
|
-
import * as FRAGS from "@thatopen/fragments";
|
|
1948
|
-
export declare class CivilReader {
|
|
1949
|
-
defLineMat: THREE.LineBasicMaterial;
|
|
1950
|
-
read(webIfc: WEBIFC.IfcAPI): {
|
|
1951
|
-
alignments: Map<number, FRAGS.Alignment>;
|
|
1952
|
-
coordinationMatrix: THREE.Matrix4;
|
|
1953
|
-
} | undefined;
|
|
1954
|
-
get(civilItems: any): {
|
|
1955
|
-
alignments: Map<number, FRAGS.Alignment>;
|
|
1956
|
-
coordinationMatrix: THREE.Matrix4;
|
|
1957
|
-
} | undefined;
|
|
1958
|
-
private getCurves;
|
|
1959
|
-
}
|
|
1960
1970
|
import * as WEBIFC from "web-ifc";
|
|
1961
1971
|
export declare class IfcMetadataReader {
|
|
1962
1972
|
get(webIfc: WEBIFC.IfcAPI, type: number): string;
|
|
1963
1973
|
}
|
|
1964
|
-
import * as WEBIFC from "web-ifc";
|
|
1965
|
-
import * as THREE from "three";
|
|
1966
|
-
export declare class Units {
|
|
1967
|
-
factor: number;
|
|
1968
|
-
complement: number;
|
|
1969
|
-
apply(matrix: THREE.Matrix4): void;
|
|
1970
|
-
setUp(webIfc: WEBIFC.IfcAPI): void;
|
|
1971
|
-
private getLengthUnits;
|
|
1972
|
-
private getScaleMatrix;
|
|
1973
|
-
}
|
|
1974
1974
|
export type RelationsMap = Map<number, Map<number, number[]>>;
|
|
1975
1975
|
export interface ModelsRelationMap {
|
|
1976
1976
|
[modelID: string]: RelationsMap;
|