@archilogic/floor-plan-sdk 5.0.0-v5-scene-structure.0 → 5.0.1

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/fpe.d.ts CHANGED
@@ -1,1476 +1,3252 @@
1
- declare const validNodeTypes: readonly ["a:helper:spaceDivider", "a:reference:externalId", "a:reference:ifcElement", "a:reference:ifcFile", "a:relation:wall", "a:settings:display", "a:settings:generatedGroup", "box", "camera-bookmark", "closet", "column", "curtain", "door", "floor", "floorplan", "floorplanDxf", "group", "interior", "kitchen", "level", "object", "pic", "plan", "polybox", "polyfloor", "railing", "stairs", "tag", "wall", "window"];
2
- type NodeTypes = typeof validNodeTypes[number];
3
- type NodesByType = {
4
- [K in NodeTypes]: SceneNode[];
5
- };
6
-
7
- declare class TinyEmitter$1 {
8
- on(event: string, callback: Function, ctx?: any): this;
9
- once(event: string, callback: Function, ctx?: any): this;
10
- emit(event: string, ...args: any[]): this;
11
- off(event: string, callback?: Function): this;
12
- }
13
-
14
- type Point2d = [number, number];
15
- type Polygon = Point2d[];
16
- type PolygonList = Polygon[];
17
- type BoundingBox2d = {
18
- x: number;
19
- z: number;
20
- x2: number;
21
- z2: number;
22
- length: number;
23
- width: number;
24
- };
25
- interface Vector2d {
26
- x: number;
27
- z: number;
28
- }
29
- interface Vector extends Vector2d {
30
- y?: number;
31
- }
32
- interface Vector3d extends Vector {
33
- x: number;
34
- y: number;
35
- z: number;
36
- }
37
- type ProductId = string;
38
- type ProductSrc = `!${ProductId}`;
39
-
40
- type RGBArray$1 = [number, number, number];
41
- interface MaterialDefinition {
42
- size?: [number, number];
43
- colorDiffuse?: RGBArray$1;
44
- colorSpecular?: RGBArray$1;
45
- specularCoef?: number;
46
- mapDiffuse?: string;
47
- mapDiffusePreview?: string;
48
- mapDiffuseSource?: string;
49
- mapDiffuseKey?: string;
50
- mapSpecular?: string;
51
- mapSpecularPreview?: string;
52
- mapSpecularSource?: string;
53
- mapSpecularKey?: string;
54
- mapNormal?: string;
55
- mapNormalPreview?: string;
56
- mapNormalSource?: string;
57
- mapNormalKey?: string;
58
- mapAlpha?: string;
59
- mapAlphaPreview?: string;
60
- mapAlphaSource?: string;
61
- mapAlphaKey?: string;
62
- opacity?: number;
63
- bsdfType?: string;
64
- useInBaking?: boolean;
65
- wrap?: 'repeat' | 'mirror';
66
- receiveRealTimeShadows?: boolean;
67
- castRealTimeShadows?: boolean;
68
- hideAfterBaking?: boolean;
69
- no2dOutline?: boolean;
70
- wireframeThickness?: number;
71
- wireframeThresholdAngle?: number;
72
- wireframeColor?: RGBArray$1;
73
- wireframeOpacity?: number;
74
- lightEmissionCoef?: number;
75
- }
76
- type MaterialReference = string;
77
- type Material = MaterialDefinition | MaterialReference;
78
- interface SceneNodeMaterials {
79
- [meshName: string]: Material;
80
- }
81
-
82
- declare class SceneNodeJson {
83
- type?: NodeTypes;
84
- id?: string;
85
- x?: number;
86
- y?: number;
87
- z?: number;
88
- ry?: number;
89
- l?: number;
90
- w?: number;
91
- h?: number;
92
- v?: string;
93
- src?: ProductSrc;
94
- polygon?: Polygon;
95
- polygonHoles?: Polygon[];
96
- locked?: boolean;
97
- class?: string[];
98
- usage?: string;
99
- hCeiling?: number;
100
- hasCeiling?: boolean;
101
- materials?: SceneNodeMaterials;
102
- name?: string;
103
- customId?: string;
104
- controlLine?: string;
105
- baseHeight?: number;
106
- backHasBase?: boolean;
107
- frontHasBase?: boolean;
108
- nodeIds?: {
109
- [nodeId: string]: string;
110
- };
111
- nodeId?: string;
112
- params?: {
113
- [param: string]: any;
114
- };
115
- shape?: string;
116
- doorType?: string;
117
- doorAngle?: number;
118
- doorWidth?: number;
119
- side?: string;
120
- hinge?: string;
121
- threshold?: boolean;
122
- thresholdHeight?: number;
123
- leafWidth?: number;
124
- leafOffset?: number;
125
- frameOffset?: number;
126
- fixLeafRatio?: number;
127
- rowRatios?: number[];
128
- columnRatios?: number[][];
129
- frameWidth?: number;
130
- frameLength?: number;
131
- cooktopType?: string;
132
- sinkType?: string;
133
- sinkPos?: number;
134
- cooktopPos?: number;
135
- ovenPos?: number;
136
- ovenType?: string;
137
- baseBoard?: number;
138
- highCabinetLeft?: number;
139
- highCabinetRight?: number;
140
- cabinetType?: string;
141
- counterHeight?: number;
142
- counterThickness?: number;
143
- elementLength?: number;
144
- wallCabinet?: boolean;
145
- wallCabinetWidth?: number;
146
- wallCabinetHeight?: number;
147
- barCounter?: boolean;
148
- fridge?: boolean;
149
- fridgePos?: number;
150
- microwave?: boolean;
151
- microwavePos?: number;
152
- extractorType?: string;
153
- baseboard?: number;
154
- handleWidth?: number;
155
- handleHeight?: number;
156
- handleLength?: number;
157
- file?: string;
158
- drawingOrigin?: number[];
159
- drawingUnits?: 'kilometers' | 'meters' | 'centimeters' | 'millimeters' | 'miles' | 'feet' | 'inches';
160
- hiddenLayers?: string[];
161
- circulation?: string;
162
- stairType?: string;
163
- stepWidth?: number;
164
- railing?: 'none' | 'left' | 'right' | 'both';
165
- railingType?: 'verticalBars' | 'filling';
166
- treadHeight?: number;
167
- stepThickness?: number;
168
- segmentation?: string;
169
- pailing?: number;
170
- segments?: number;
171
- segmentDistance?: number;
172
- railCount?: number;
173
- rx?: number;
174
- distance?: number;
175
- index?: number;
176
- visibleLevelIds?: string[];
177
- hiddenLevelIds?: string[];
178
- fov?: number;
179
- mode?: string;
180
- displayInUI?: boolean;
181
- activeLevelId?: string;
182
- bake?: boolean;
183
- bakeStatus?: string;
184
- bakedModelUrl?: string;
185
- bakedModelStage?: string;
186
- bakeContentHash?: string;
187
- bakePollStage?: string;
188
- bakePreviewStatusFileKey?: string;
189
- bakeRegularStatusFileKey?: string;
190
- bakeSettings?: any;
191
- lightMapCenter?: number;
192
- lightMapFalloff?: number;
193
- lightMapIntensity?: number;
194
- skyMap?: string;
195
- _highlight?: HighlightArgs;
196
- _isSelected?: boolean;
197
- children?: SceneNodeJson[];
198
- units?: string;
199
- folds?: number;
200
- method?: string;
201
- }
202
- interface SceneNodeOptions {
203
- /** apply default schema to each node - node.addChild has this set to true by default */
204
- setDefaults?: boolean;
205
- /** force regenerating node ids - otherwise ids will only be generated if they are missing */
206
- regenerateIds?: boolean;
207
- force?: boolean;
208
- keepTransient?: boolean;
209
- /** provide an id for an action to be able to group multiple actions */
210
- actionId?: string;
211
- /** define whether the update requires an update of computed properties */
212
- updateState?: boolean;
213
- /** define whether an event should be broadcasted - for plugins or multiplayer */
214
- skipHistory?: boolean;
215
- /** relevant for plugins or multiplayer: should the event be broadcasted */
216
- preventBroadcast?: boolean;
217
- }
218
- interface ToJsonOptions extends SceneNodeOptions {
219
- /** export the mapping between old and new node ids as top-level idMap property */
220
- exportIdMap?: boolean;
221
- }
222
- interface TransformArgs {
223
- x?: number;
224
- y?: number;
225
- z?: number;
226
- ry?: number;
227
- }
228
- type RGBArray = [number, number, number];
229
- interface HighlightArgs {
230
- /** color overlay for the node */
231
- fill?: RGBArray;
232
- /** opacity for the color overlay */
233
- fillOpacity?: number;
234
- /** outline for the node */
235
- outline?: RGBArray;
236
- /** width of the outline */
237
- outlineWidth?: number;
238
- }
239
- /**
240
- * Main class for the nodes in a scene
241
- */
242
- declare class SceneNode extends SceneNodeJson {
243
- /** node type: 'wall', 'column' etc */
244
- type: NodeTypes;
245
- /** globally unique id for each node */
246
- id: string;
247
- children: SceneNode[];
248
- private _parent;
249
- private _scene;
250
- private _emitter;
251
- constructor({ node, parent, scene, emitter, options }: {
252
- /** node params */
253
- node: SceneNodeJson;
254
- /** parent node */
255
- parent?: SceneNode;
256
- /** the scene class to get access to scene.nodesByType etc */
257
- scene?: Scene;
258
- /** optional emitter that emits events for all SceneNode updates */
259
- emitter?: TinyEmitter$1;
260
- /** scene node options */
261
- options?: SceneNodeOptions;
262
- });
263
- get parent(): SceneNode;
264
- get scene(): Scene;
265
- get schema(): Schema;
266
- /**
267
- * internal method: update the properties of a scene node
268
- * @param {Object} args - update arguments
269
- */
270
- _update(args?: SceneNodeJson): void;
271
- /**
272
- * set the attributes of a scene node
273
- * @param {Object} args - update arguments
274
- * @param {Object} [options] - update options
275
- */
276
- set(args?: SceneNodeJson, options?: SceneNodeOptions): void;
277
- /**
278
- * set the transform of a scene node ( this is faster than node.set )
279
- * @param {Object} args - update arguments { x, y, z, ry }
280
- * @param {Object} [options] - update options
281
- */
282
- setTransform({ x, y, z, ry }?: TransformArgs, options?: SceneNodeOptions): void;
283
- /**
284
- * set the materials of a scene node
285
- * @param {Object} materials - Object containing meshKey - material definition pairs, material definition can be a name(String) or a new definition(Object)
286
- * @param {Object} [options] - update options
287
- */
288
- setMaterials(materials?: SceneNodeMaterials, options?: SceneNodeOptions): void;
289
- /**
290
- * set transient attributes of a scene node [ v1.6 ]
291
- * @param {Object} args - transient arguments, have to be prefixed with underscore
292
- */
293
- setTransient(args?: {}, options?: SceneNodeOptions): void;
294
- /**
295
- * method to set the transient _highlight property of a scene node
296
- * will emit a set-transient event
297
- */
298
- setHighlight(args?: HighlightArgs, options?: SceneNodeOptions): void;
299
- /**
300
- * find node by id ( unique ) or type ( find first )
301
- */
302
- find(args?: {
303
- id?: string;
304
- type?: NodeTypes;
305
- }): SceneNode | void;
306
- /**
307
- * find all children nodes by type
308
- */
309
- findAll(args?: {
310
- type?: NodeTypes;
311
- }): SceneNode[];
312
- /**
313
- * add child to node
314
- * @returns {SceneNode} the new child
315
- */
316
- addChild(node: SceneNodeJson, options?: SceneNodeOptions): SceneNode;
317
- /**
318
- * remove child from node
319
- */
320
- removeChild(node: any, options?: SceneNodeOptions): void;
321
- /**
322
- * remove node from its parent
323
- */
324
- remove(options?: SceneNodeOptions): void;
325
- /**
326
- * get nodes in the scene that refer to this node, like relation or setting nodes
327
- */
328
- getReferringNodes(): SceneNode[];
329
- /**
330
- * get the world position from a local position
331
- */
332
- getWorldPosition(): any;
333
- /**
334
- * get the local position from a world position
335
- */
336
- getLocalPositionFromWorld(pos: SceneNodeJson): SceneNodeJson;
337
- /**
338
- * get list of all parent nodes
339
- */
340
- getParents(): SceneNode[];
341
- /**
342
- * export scene node to json removing transient data
343
- */
344
- toJson(options?: ToJsonOptions): any;
345
- /**
346
- * Executes the callback on this node and all descendants
347
- */
348
- traverse(callback: (node: SceneNode) => any): void;
349
- }
350
-
351
- declare enum spaceCategories {
352
- residential = "residential",
353
- office = "office",
354
- parking = "parking",
355
- lightIndustrial = "lightIndustrial"
356
- }
357
- type SpaceCategories = keyof typeof spaceCategories;
358
-
359
- type NodesByName = {
360
- [key: string]: SceneNode[];
361
- };
362
- type Schema = {
363
- [K in NodeTypes]?: TypeSchema;
364
- };
365
- interface TypeSchemaProperty {
366
- type?: string | string[];
367
- description?: string;
368
- const?: string;
369
- pattern?: string;
370
- items?: TypeSchemaProperty | TypeSchemaProperty[];
371
- default?: any;
372
- minimum?: number;
373
- maximum?: number;
374
- minItems?: number;
375
- maxItems?: number;
376
- multipleOf?: number;
377
- enum?: string[];
378
- patternProperties?: any;
379
- additionalProperties?: boolean;
380
- properties?: {
381
- [key: string]: TypeSchemaProperty;
382
- };
383
- children?: TypeSchemaProperty;
384
- }
385
- interface TypeSchema {
386
- type?: string;
387
- required?: string[];
388
- additionalProperties?: boolean;
389
- description?: string;
390
- properties: {
391
- [key: string]: TypeSchemaProperty;
392
- };
393
- }
394
- interface SceneOptions {
395
- spaceContourAreaThreshold?: number;
396
- }
397
- /**
398
- * Central class to load an entire scene
399
- * scene structure is converted into a tree of SceneNode items
400
- * nodes can be quickly accessed
401
- * via `scene.nodesById[<uuid>]`
402
- * or `scene.nodesByType[<type>]`
403
- */
404
- declare class Scene {
405
- sceneId: string | null;
406
- node: SceneNode | null;
407
- /** @deprecated */
408
- type: string;
409
- spaceCategories: SpaceCategories[];
410
- nodesById: {
411
- [uuid: string]: SceneNode;
412
- };
413
- nodesByType: NodesByType;
414
- nodesByName: NodesByName;
415
- options: SceneOptions;
416
- private _emitter;
417
- private _schema;
418
- private _apiVersion;
419
- constructor({ schema, options }?: {
420
- /** optionally initialize scene with existing schema */
421
- schema?: Schema;
422
- options?: SceneOptions;
423
- });
424
- get emitter(): TinyEmitter$1;
425
- get schema(): Schema;
426
- set schema(schema: Schema);
427
- /**
428
- * load scene structure recursively, creating sceneNodes
429
- * and registering nodes and nodesByType
430
- */
431
- loadSceneStructure(sceneStructure: SceneNodeJson,
432
- /** options will be handed to new SceneNode() */
433
- options?: {
434
- /** overwrite the rotation of the plan node - will be restored on planNode.toJson() */
435
- planRotation?: number;
436
- /** apply default schema to each node, useful when starting a plan from scratch ({type: 'plan'}) */
437
- setDefaults?: boolean;
438
- /** force regenerating node ids - otherwise ids will only be generated if they are missing */
439
- regenerateIds?: boolean;
440
- }): SceneNode;
441
- /**
442
- * set the scene type
443
- * @deprecated, use setSpaceCategories() instead
444
- */
445
- setSceneType(): void;
446
- _setSceneType(): void;
447
- /**
448
- * set the space categories
449
- */
450
- setSpaceCategories(): void;
451
- /**
452
- * compute the floor area
453
- */
454
- getFloorArea(): number;
455
- /**
456
- * add a node in scene.nodesByType, nodesById, and nodesByName
457
- */
458
- registerNode(node: SceneNode): void;
459
- /**
460
- * remove a node in scene.nodesByType, nodesById, and nodesByName
461
- */
462
- unregisterNode(node: SceneNode): void;
463
- /**
464
- * subscribe to a scene event
465
- * * SceneNode events that change a node
466
- * all set events fire with `{ node: <SceneNode>, args: <payload>, prevState: <oldValues>, options: <Object>, event: <eventName> }`
467
- * * `set-transform` - x,y,z or ry is changed for a node
468
- * * `set` - an attribute is changed for a node, like l or w
469
- * * `set-materials` - a material for a specific mesh is changed for a node, args: `{ <meshName>: <material> }`
470
- * * `set-transient` - transient attribute ( starting with underscore ) is changed for a node
471
- * * SceneNode events that change the node tree
472
- * all tree change events fire with `{ node: <SceneNode>, args: <SceneNode>, options: <Object>, event: <eventName> }`
473
- * * `add-child` - a child (args) is added to the node
474
- * * `remove-child` - a child (args) is removed from the node
475
- * * Scene events:
476
- * * `scene-structure-loading` - fires when the loadSceneStructure is starting, payload is the Scene instance
477
- * * `scene-structure-loaded` - fires when the loadSceneStructure is complete, payload is the Scene instance
478
- */
479
- on(event: string, callback: any, context?: any): void;
480
- /**
481
- * subscribe to a scene event but remove after first emit
482
- * otherwise like scene.on()
483
- */
484
- once(event: string, callback: any, context?: any): void;
485
- /**
486
- * unsubscribe from a scene event
487
- */
488
- off(event: string, callback?: any): void;
489
- /**
490
- * emit an event
491
- */
492
- emit(event: string, arg1: any, arg2?: any, arg3?: any, arg4?: any): void;
493
- /**
494
- * retrieve scene structure api version
495
- */
496
- get apiVersion(): string;
497
- }
498
-
499
- interface SpaceRelations {
500
- /** space id */
501
- node: SceneNode;
502
- /** related nodes */
503
- relationsById: NodeIdList;
504
- relationsByEdgeIndex: {};
505
- }
506
- interface NodeIdList {
507
- [nodeId: string]: {
508
- /** related node */
509
- node: SceneNode;
510
- /** type of the relation */
511
- relation: 'edge' | 'contained';
512
- /** edge relations */
513
- edgeRelations?: {
514
- /** edge index of the space polygon [ loopIndex, edgeIndex ] */
515
- edgeIndex?: [number, number];
516
- /** edge index of related node */
517
- nodeContourIndex?: number;
518
- }[];
519
- };
520
- }
521
-
522
- interface ShapeStyle {
523
- stroke?: string | number | number[];
524
- strokeWidth?: number | 'native';
525
- strokeOpacity?: number;
526
- fill?: string | number | number[] | false;
527
- fillOpacity?: number;
528
- }
529
- interface BaseShape {
530
- type: string;
531
- style?: ShapeStyle;
532
- }
533
- interface LineShape extends BaseShape {
534
- type: 'line';
535
- start: Point2d;
536
- end: Point2d;
537
- }
538
- interface ArcShape extends BaseShape {
539
- type: 'arc';
540
- position: Point2d;
541
- radius: number;
542
- startAngle: number;
543
- endAngle: number;
544
- }
545
- interface CompositeShape extends BaseShape {
546
- type: 'composite';
547
- segments: OpenShapes[];
548
- }
549
- type OpenShapes = LineShape | ArcShape | PolylineShape | BezierShape;
550
- interface CircleShape extends BaseShape {
551
- type: 'circle';
552
- position: Point2d;
553
- radius: number;
554
- }
555
- interface RectShape extends BaseShape {
556
- type: 'rectangle';
557
- position: Point2d;
558
- dimensions: [number, number];
559
- }
560
- interface PolygonShape extends BaseShape {
561
- type: 'polygon';
562
- points: Polygon;
563
- holes?: PolygonList;
564
- }
565
- interface PolylineShape extends BaseShape {
566
- type: 'polyline';
567
- points: Polygon;
568
- }
569
- interface BezierShape extends BaseShape {
570
- type: 'quadraticBezier';
571
- points: Polygon;
572
- }
573
- interface TextShape extends BaseShape {
574
- type: 'text';
575
- position: Point2d;
576
- text: string;
577
- rotation?: number;
578
- alignV?: 'center' | 'bottom' | 'top';
579
- alignH?: 'center' | 'left' | 'right';
580
- fontSize?: number;
581
- }
582
- type Shape = PolygonShape | PolylineShape | RectShape | CircleShape | LineShape | GroupShape | TextShape | ArcShape | BezierShape | CompositeShape;
583
- interface GroupShape extends BaseShape {
584
- type: 'group';
585
- position?: Point2d;
586
- rotation?: number;
587
- children: Shape[];
588
- }
589
- /**
590
- * boolean union of two or more polygon
591
- */
592
- declare function polygonUnion(polygons: PolygonList): PolygonList;
593
- declare enum EndType {
594
- etOpenSquare = 0,
595
- etOpenRound = 1,
596
- etOpenButt = 2,
597
- etClosedLine = 3,
598
- etClosedPolygon = 4
599
- }
600
- /**
601
- * contour offset for one or multiple polygons
602
- * https://sourceforge.net/p/jsclipper/wiki/documentation/#clipperlibendtype
603
- */
604
- declare function polygonOffset(polygons: PolygonList, delta?: number, endType?: EndType, skipCleaning?: boolean): PolygonList;
605
- /**
606
- * boolean intersection of two or more polygon
607
- * the subject path can be an open polyline
608
- */
609
- declare function polygonIntersection(polygons?: PolygonList, clipPolygons?: PolygonList, subjectPathOpen?: boolean): PolygonList;
610
-
611
- /**
612
- * This interface was referenced by `AuthJson`'s JSON-Schema
613
- * via the `definition` "resourceScope".
614
- */
615
- type ResourceScope =
616
- | "customFields"
617
- | "customAttributes"
618
- | "customAttributeValues"
619
- | "organization"
620
- | "dxf"
621
- | "floor"
622
- | "ifc"
623
- | "job"
624
- | "order"
625
- | "product"
626
- | "user"
627
- | "team"
628
- | "superadmin"
629
- | "token"
630
- | "subscription"
631
- | "graphql";
632
- /**
633
- * This interface was referenced by `AuthJson`'s JSON-Schema
634
- * via the `definition` "actionScope".
635
- */
636
- type ActionScope =
637
- | "manageJoinRequests"
638
- | "access"
639
- | "archive"
640
- | "bake"
641
- | "changeRole"
642
- | "close"
643
- | "create"
644
- | "createFromOrder"
645
- | "delete"
646
- | "export"
647
- | "import"
648
- | "invite"
649
- | "query"
650
- | "queryPublic"
651
- | "queryPrivate"
652
- | "read"
653
- | "readPrivate"
654
- | "readPublic"
655
- | "update"
656
- | "remove"
657
- | "write"
658
- | "addUser"
659
- | "removeUser"
660
- | "settings";
661
- /**
662
- * This interface was referenced by `AuthJson`'s JSON-Schema
663
- * via the `definition` "scopeDefinitionArray".
664
- */
665
- type ScopeDefinitionArray = ScopeDefinition[];
666
- /**
667
- * This interface was referenced by `AuthJson`'s JSON-Schema
668
- * via the `definition` "scopeDefinition".
669
- */
670
- interface ScopeDefinition {
671
- resource: ResourceScope;
672
- action?: ActionScope;
673
- resourceId?: string;
674
- }
675
- /**
676
- * This interface was referenced by `AuthJson`'s JSON-Schema
677
- * via the `definition` "temporaryAccessToken".
678
- */
679
- interface TemporaryAccessToken {
680
- authorization: string;
681
- expiresAt: number;
682
- }
683
- /**
684
- * This interface was referenced by `AuthJson`'s JSON-Schema
685
- * via the `definition` "createTemporaryAccessToken".
686
- */
687
- interface CreateTemporaryAccessToken {
688
- scopes: ScopeDefinitionArray;
689
- durationSeconds?: number;
690
- }
691
-
692
- type TemporaryAccessTokenFunction = (args: CreateTemporaryAccessToken) => Promise<TemporaryAccessToken>;
693
- interface TokenOptions {
694
- publishableAccessToken?: string;
695
- secretAccessToken?: string;
696
- temporaryAccessToken?: TemporaryAccessToken;
697
- temporaryAccessTokenFunction?: TemporaryAccessTokenFunction;
698
- temporaryAccessTokenScopes?: ScopeDefinitionArray;
699
- sdkVersion?: string;
700
- }
701
-
702
- declare class TinyEmitter {
703
- on(event: string, callback: Function, ctx?: any): this;
704
- once(event: string, callback: Function, ctx?: any): this;
705
- emit(event: string, ...args: any[]): this;
706
- off(event: string, callback?: Function): this;
707
- }
708
-
709
- interface AssetData {
710
- id: string;
711
- node: SceneNode;
712
- polygon: Polygon;
713
- boundingBox: BoundingBox2d;
714
- name: string;
715
- manufacturer: string;
716
- productId: string;
717
- tags: string[];
718
- categories: string[];
719
- subCategories: string[];
720
- dimensions: {
721
- width: number;
722
- length: number;
723
- height: number;
724
- };
725
- seatCapacity: number;
726
- position: Vector3d;
727
- rotation: number;
728
- }
729
- interface SpaceData {
730
- node: SceneNode;
731
- boundingBox: BoundingBox2d;
732
- id: string;
733
- usage?: string;
734
- usageName?: string;
735
- program?: string;
736
- polygons: PolygonList;
737
- assets: string[];
738
- area: number;
739
- center: Point2d;
740
- customId?: string;
741
- name?: string;
742
- }
743
- interface ProductData {
744
- preview: string;
745
- manufacturer: string;
746
- productId: string;
747
- name: string;
748
- fileKey: string;
749
- tags: string[];
750
- categories: string[];
751
- subCategories: string[];
752
- boundingPoints: {
753
- min: any;
754
- max: any;
755
- };
756
- boundingBox: {
757
- length: number;
758
- width: number;
759
- height: number;
760
- };
761
- seatCapacity: number;
762
- texture: string;
763
- materials: string[];
764
- matColors: string[];
765
- colours: string[];
766
- order: number;
767
- isCeilingLamp: boolean;
768
- isCarpet: boolean;
769
- createdAt: string;
770
- updatedAt: string;
771
- link: string;
772
- _shapes?: Shape[];
773
- }
774
- interface ResourceData {
775
- space: SpaceData;
776
- asset: AssetData;
777
- }
778
- type ResourceType = keyof ResourceData;
779
- type BaseResource<T extends ResourceType> = {
780
- resourceType: T;
781
- setHighlight: (highlightArgs?: HighlightArgs) => void;
782
- };
783
- type SceneResource<T extends ResourceType> = BaseResource<T> & Omit<ResourceData[T], 'node'>;
784
- type SpaceResource = SceneResource<'space'>;
785
- type AssetResource = SceneResource<'asset'>;
786
-
787
- type LoadingEvent = 'loading-done' | 'loading-status' | 'product-load-stage' | 'product-load-texture' | 'product-data' | 'product-contour' | 'spaces-loaded' | 'assets-loaded';
788
- declare enum TextureFilter {
789
- None = 0,
790
- Default = 1,
791
- Grayscale = 2
792
- }
793
- declare class FpeLoader$1 extends TinyEmitter {
794
- productQueue: {
795
- [productId: string]: {
796
- nodes: Set<SceneNode>;
797
- /**
798
- 0 = nothing loaded;
799
- 1 = product data loaded;
800
- 2 = product bounding box contour loaded;
801
- 3 = product contour loaded
802
- */
803
- loadStage: number;
804
- };
805
- };
806
- textureQueue: {
807
- [textureId: string]: {
808
- productId?: string;
809
- nodes: Set<SceneNode>;
810
- textureUrl: string;
811
- applyFilter: TextureFilter;
812
- imageData?: any;
813
- /**
814
- 0: nothing loaded;
815
- 1: image texture loaded;
816
- 2: final product texture created with contour baked in
817
- */
818
- loadStage: number;
819
- error?: boolean;
820
- texture?: any;
821
- contourTexture?: any;
822
- anchor?: any;
823
- offset?: any;
824
- position?: any;
825
- };
826
- };
827
- promiseCache: Map<string, Promise<any>>;
828
- loadStages: {
829
- product: boolean;
830
- productContour: boolean;
831
- productTexture: boolean;
832
- };
833
- isSceneStructureLoaded: boolean;
834
- resources: FloorPlanCore['resources'];
835
- productContourCacheAge: number;
836
- productDataCacheAge: number;
837
- initialLoading: boolean;
838
- _loadCounter: number;
839
- on: (event: LoadingEvent, callback: Function, ctx?: any) => this;
840
- once: (event: LoadingEvent, callback: Function, ctx?: any) => this;
841
- off: (event: LoadingEvent, callback?: Function) => this;
842
- emit: (event: LoadingEvent, ...args: any[]) => this;
843
- constructor(resources: FloorPlanCore['resources'], settings: FloorPlanCore['settings']);
844
- loadStatus({ args }: {
845
- args: any;
846
- }): void;
847
- reset(): void;
848
- }
849
-
850
- interface StartupOptions {
851
- /** option to hide certain elements */
852
- hideElements?: HideableElement[];
853
- preserveViewbox?: string;
854
- /** option to disable panning and zooming */
855
- panZoom?: boolean;
856
- /** if set, panning and zooming is restricted to the scene boundingbox plus the margin */
857
- panZoomMargin?: number;
858
- /** rotation angle for the floor plan in degrees (counterclockwise) */
859
- planRotation?: number | null;
860
- /** if set room stamps have a fixed size - otherwise they adapt to the zoom level */
861
- roomStampSize?: number;
862
- /** toggle overlaying UI elements */
863
- ui?: UI;
864
- /** floor plan theming */
865
- theme?: FloorPlanTheme;
866
- /** mapping table for custom space labels */
867
- spaceLabelMapping?: SpaceLabelMapping;
868
- /** set the unit system */
869
- units?: Units;
870
- /** min and max zooming factor. Defaults to [3, 300] */
871
- zoomRange?: [number, number];
872
- }
873
- /**
874
- * This is the place to give the floor plan your own style
875
- */
876
- type FloorPlanTheme = {
877
- /** define the background */
878
- background?: BackgroundOptions;
879
- /** wall contours are merged to one continuous outline, needed if you want white walls */
880
- wallContours?: boolean;
881
- /** render assets with textures rather than solid colors */
882
- showAssetTextures?: boolean;
883
- fontFamily?: string;
884
- elements?: {
885
- byId?: Record<string, ElementTheme>;
886
- floorPlan?: {
887
- grayscale: boolean;
888
- };
889
- roomStamp?: {
890
- /** @deprecated show the usage information in room stamps */
891
- showUsage?: boolean;
892
- /** @deprecated show the area information in room stamps */
893
- showArea?: boolean;
894
- /** show the area information in room stamps */
895
- roomStampDisplay?: ('usage' | 'area' | 'customId' | 'name')[];
896
- /** text color for room stamps */
897
- text?: RGBArray;
898
- /** whether the room stamp text should have an outline to assist with contrast issues */
899
- textOutline?: boolean;
900
- };
901
- asset?: ElementTheme;
902
- space?: SpaceTheme;
903
- wall?: ElementTheme;
904
- wallContour?: ElementTheme;
905
- box?: ElementTheme;
906
- curtain?: ElementTheme;
907
- closet?: ElementTheme;
908
- door?: ElementTheme;
909
- kitchen?: ElementTheme;
910
- railing?: ElementTheme;
911
- stairs?: ElementTheme;
912
- window?: ElementTheme;
913
- column?: ElementTheme;
914
- polybox?: ElementTheme;
915
- };
916
- };
917
- /**
918
- * Background of the floor plan canvas
919
- */
920
- type BackgroundOptions = {
921
- /** background-color: hex code for color, set to 'transparent' for transparent background */
922
- color?: string;
923
- /** show a dynamic grid */
924
- showGrid?: boolean;
925
- };
926
- /**
927
- * Elements that can be hidden in the floor plan
928
- */
929
- type HideableElement = SceneNode['type'] | 'roomStamp';
930
- type UI = {
931
- /** Show a dynamic scale indicator */
932
- scale?: boolean;
933
- /** Show the current cursor position in plan coordinates */
934
- coordinates?: boolean;
935
- };
936
- /**
937
- * Map space labels by space usage or space id to a custom name
938
- * @example { kitchen: 'cuisine' }
939
- */
940
- type SpaceLabelMapping = {
941
- [label: string]: string;
942
- };
943
- /**
944
- * Which unit system and how to display the units
945
- */
946
- type Units = {
947
- /** meters or feet? */
948
- system?: 'metric' | 'imperial';
949
- /** how many decimals should be shown for lengths? */
950
- lengthDecimals?: number;
951
- /** how many decimals should be shown for areas? */
952
- areaDecimals?: number;
953
- /** if 'area', it displays e.g. 12 m². If 'boundingBox'it displays e.g. 4 m x 3 m */
954
- roomDimensions?: 'area' | 'boundingBox';
955
- };
956
- type FpeComputed = {
957
- wallContours: PolygonList[];
958
- relations: {
959
- spaces: SpaceRelations[];
960
- };
961
- snapPoints: Polygon;
962
- snapMargin: number;
963
- };
964
- type FpeCoreEvent = 'update-settings';
965
- type Resources = {
966
- spaces: SpaceResource[];
967
- assets: AssetResource[];
968
- products: {
969
- [productId: string]: ProductData;
970
- };
971
- productContours: {
972
- [productId: string]: PolygonList;
973
- };
974
- productBoundingBoxes: {
975
- [productId: string]: PolygonList;
976
- };
977
- };
978
- /**
979
- * The main Floor plan engine SDK class
980
- */
981
- declare class FloorPlanCore {
982
- settings: FpeConfig;
983
- static readonly version: any;
984
- readonly fpeId: string;
985
- resources: Resources;
986
- computed: FpeComputed;
987
- loader: FpeLoader$1;
988
- scene: Scene;
989
- isBrowser: boolean;
990
- utils: any;
991
- location: {
992
- latitude: number;
993
- longitude: number;
994
- };
995
- protected _emitter: TinyEmitter;
996
- constructor({ options, scene }?: {
997
- options?: FpeConfig;
998
- scene?: Scene;
999
- });
1000
- on(event: FpeCoreEvent, callback: Function, ctx?: any): this;
1001
- once(event: FpeCoreEvent, callback: Function, ctx?: any): this;
1002
- off(event: FpeCoreEvent, callback?: Function): this;
1003
- emit(event: FpeCoreEvent, ...args: any[]): this;
1004
- initScene(scene: any): void;
1005
- /**
1006
- * Load a scene with it's unique identifier the sceneId
1007
- * @param {string} sceneId id of the scene to load
1008
- * @param {AccessToken} accessToken Space API v2 [publishable](../space-api/v2/introduction.md#publishable-access-token) or [temporary](../space-api/v2/introduction.md#temporary-access-token) access token
1009
- * @returns {Promise.<Boolean, Error>} returns promise which resolves when loading is done
1010
- */
1011
- loadScene(sceneId: string, accessTokenOptions?: TokenOptions): Promise<boolean | Error>;
1012
- getSpaces(): void;
1013
- /**
1014
- * Change options after the floor plan engine instance has been created
1015
- */
1016
- set(args?: FpeConfig): void;
1017
- /**
1018
- * Get a list of spaces and assets for a specific plan position
1019
- * @param {*} pos - plan position
1020
- * @returns {Object} - list of spaces and assets
1021
- */
1022
- getResourcesFromPosition(pos: Point2d): {
1023
- spaces: SpaceData[];
1024
- assets: AssetData[];
1025
- };
1026
- /**
1027
- * get bounding box of a scene node
1028
- * @param {SceneNode | string} node - Element or Element id
1029
- * @param {*} margin
1030
- */
1031
- getElementBoundingBox(node: any, margin?: number): BoundingBox2d;
1032
- /**
1033
- * Destroy the floor plan instance
1034
- */
1035
- destroy(): void;
1036
- }
1037
- interface FpeConfig extends StartupOptions {
1038
- api?: {
1039
- accessToken?: string;
1040
- productDataCacheAge?: number;
1041
- productContourCacheAge?: number;
1042
- } & TokenOptions;
1043
- loadTextures?: boolean;
1044
- showFloorPlan?: boolean;
1045
- showSpaceDividers?: boolean;
1046
- showCeilingLamps?: boolean;
1047
- svgViewBoxDim?: number;
1048
- xrayMode?: boolean;
1049
- svgMode?: boolean;
1050
- destroyOnDomRemove?: boolean;
1051
- }
1052
- interface ElementTheme {
1053
- fill?: ShapeStyle['fill'];
1054
- fillOpacity?: number;
1055
- stroke?: ShapeStyle['stroke'];
1056
- }
1057
- interface SpaceTheme extends ElementTheme {
1058
- usage?: {
1059
- [key: string]: ElementTheme;
1060
- };
1061
- program?: {
1062
- [key: string]: ElementTheme;
1063
- };
1064
- }
1065
-
1066
- interface InfoWindowArgs {
1067
- /** pixel width of the window - default 100 */
1068
- width?: number;
1069
- /** pixel height of the window - default 80 */
1070
- height?: number;
1071
- /** coordinates of the window in meters */
1072
- pos?: Point2d;
1073
- /** html string as content of the info window */
1074
- html?: string;
1075
- /** If true , a close button will appear in the top right corner of the info window. */
1076
- closeButton?: boolean;
1077
- }
1078
- interface InfoWindowState extends InfoWindowArgs {
1079
- floorPlan?: FloorPlanEngine;
1080
- }
1081
- declare class InfoWindow {
1082
- private _floorPlan;
1083
- pos: Point2d;
1084
- height: number;
1085
- width: number;
1086
- closeButton: any;
1087
- html: any;
1088
- el: Element;
1089
- private _anchorPos;
1090
- private _getPosition;
1091
- constructor({ width, height, pos, html, closeButton, floorPlan }?: InfoWindowState);
1092
- _createInfoWindow(): void;
1093
- _setContent(): void;
1094
- _updateInfoWindow(): void;
1095
- set({ width, height, pos, html, closeButton }: {
1096
- width: any;
1097
- height: any;
1098
- pos: any;
1099
- html: any;
1100
- closeButton: any;
1101
- }): void;
1102
- remove(): void;
1103
- }
1104
-
1105
- interface HtmlMarkerArgs {
1106
- /** coordinates of the window in meters */
1107
- pos?: Point2d;
1108
- offset?: Point2d;
1109
- /** html string as content of the info window */
1110
- el?: HTMLElement;
1111
- /** If true , a close button will appear in the top right corner of the info window. */
1112
- closeButton?: boolean;
1113
- }
1114
- interface HtmlMarkerState extends HtmlMarkerArgs {
1115
- floorPlan: FloorPlanEngine;
1116
- }
1117
- declare class HtmlMarker {
1118
- pos: Point2d;
1119
- size: Point2d;
1120
- offset: Point2d;
1121
- isHidden: boolean;
1122
- id: string;
1123
- el: HTMLElement;
1124
- private _floorPlan;
1125
- private _anchorPos;
1126
- constructor({ pos, offset, el, floorPlan }: HtmlMarkerState);
1127
- _updateHtmlMarker: () => void;
1128
- _updateHtmlMarkerStyle(): void;
1129
- set({ pos, offset }: Pick<HtmlMarkerArgs, 'pos' | 'offset'>): void;
1130
- remove(): void;
1131
- }
1132
-
1133
- type FpeLoader = FloorPlanCore['loader'];
1134
- type ScreenPosition = {
1135
- x: number;
1136
- y: number;
1137
- };
1138
- declare class Ticker {
1139
- methods: {
1140
- [name: string]: {
1141
- fn: Function;
1142
- ctx: WebGlView;
1143
- };
1144
- };
1145
- add: (name: string, fn: Function, ctx: WebGlView) => void;
1146
- remove: (name: string) => void;
1147
- }
1148
- type ViewEvent = 'pan' | 'zoom' | 'viewbox' | 'resize-canvas' | 'scene-rendered' | 'focus';
1149
- type BaseLayers = 'base' | 'scene' | 'annotation' | 'helper';
1150
- declare class WebGlView extends TinyEmitter {
1151
- windowPos: Point2d;
1152
- zoom: number;
1153
- client: Point2d;
1154
- layers: Map<string, PlanLayer>;
1155
- viewbox: BoundingBox2d;
1156
- viewportNeedsUpdate: boolean;
1157
- viewportPaused: boolean;
1158
- viewportInFocus: boolean;
1159
- parentEl: HTMLElement;
1160
- _settings: FpeConfig;
1161
- redrawScene: () => void;
1162
- gfxNodes: {
1163
- [nodeId: string]: {
1164
- nodeContainer?: any;
1165
- loadStage?: number;
1166
- textureId?: string;
1167
- };
1168
- };
1169
- _dummyTexture: any;
1170
- _oldTime: number;
1171
- ticker?: Ticker;
1172
- on: (event: ViewEvent, callback: Function, ctx?: any) => this;
1173
- once: (event: ViewEvent, callback: Function, ctx?: any) => this;
1174
- off: (event: ViewEvent, callback?: Function) => this;
1175
- emit: (event: ViewEvent, ...args: any[]) => this;
1176
- constructor(loader: FpeLoader, settings: FpeConfig, fpeId: string);
1177
- /**
1178
- * main animation loop
1179
- */
1180
- draw(): void;
1181
- startAnimationLoop(): void;
1182
- stopAnimationLoop(): void;
1183
- updateView(): void;
1184
- watchResize(): Promise<void>;
1185
- get gfxNodeCount(): number;
1186
- reset(): void;
1187
- pause(interaction?: string): void;
1188
- resume(interaction?: string): void;
1189
- }
1190
-
1191
- /** style definition used internally for rendering a node */
1192
- interface StyleProps extends ShapeStyle {
1193
- /** draw a dashed contour */
1194
- dash?: boolean;
1195
- }
1196
-
1197
- interface GraphicArgs {
1198
- shapes: Shape[];
1199
- position?: Point2d;
1200
- alpha?: number;
1201
- clearLayer?: boolean;
1202
- scale?: number;
1203
- interactive?: boolean;
1204
- id?: string;
1205
- isHandler?: boolean;
1206
- scaleOnZoom?: boolean;
1207
- }
1208
- interface PlanGraphicArgs extends GraphicArgs {
1209
- floorPlan: FloorPlanEngine;
1210
- [key: string]: any;
1211
- }
1212
- type GraphicUpdate = {
1213
- position?: Point2d;
1214
- style?: StyleProps;
1215
- shapes?: Shape[];
1216
- };
1217
- declare class PlanGraphic {
1218
- shapes: Shape[];
1219
- scaleOnZoom: boolean;
1220
- gfxScale: number;
1221
- private floorPlan;
1222
- constructor({ shapes, position, alpha, scale, clearLayer, interactive, id, isHandler, scaleOnZoom, baseLayer, container, floorPlan }: PlanGraphicArgs);
1223
- set({ position, style, shapes }?: GraphicUpdate): void;
1224
- on(event: string, callback: any, context?: any): this;
1225
- off(event: string, callback?: any): this;
1226
- destroy(): void;
1227
- private addDragEvent;
1228
- private removeDragEvent;
1229
- }
1230
-
1231
- declare class PlanLayer {
1232
- graphics: Set<PlanGraphic>;
1233
- id: string;
1234
- private baseLayer;
1235
- private floorPlan;
1236
- constructor(floorPlan: FloorPlanEngine, baseLayer?: BaseLayers, id?: string);
1237
- addGraphic(args: GraphicArgs): PlanGraphic;
1238
- deleteGraphic(graphic: PlanGraphic): void;
1239
- /**
1240
- * Draw shapes on the layer
1241
- * @deprecated
1242
- */
1243
- draw(args: GraphicArgs): PlanGraphic;
1244
- drawImage({ url, width, height, mask, options }: {
1245
- url: any;
1246
- width: any;
1247
- height: any;
1248
- mask: any;
1249
- options: any;
1250
- }): void;
1251
- /**
1252
- * clear all shapes from the layer
1253
- */
1254
- clear(): void;
1255
- /**
1256
- * destroy layer and all shapes
1257
- */
1258
- destroy(): void;
1259
- }
1260
-
1261
- interface MarkerArgs {
1262
- /** coordinates of the marker in meters */
1263
- pos?: Point2d;
1264
- /** color of the marker, hex code */
1265
- color?: string;
1266
- /** size in pixels */
1267
- size?: number;
1268
- floorPlan?: FloorPlanEngine;
1269
- }
1270
- interface MarkerUpdateArgs {
1271
- events?: {
1272
- [event: string]: {
1273
- callback: any;
1274
- context: any;
1275
- };
1276
- };
1277
- }
1278
- declare class MarkerPin {
1279
- pos: Point2d;
1280
- color: string;
1281
- size: number;
1282
- id: string;
1283
- layer: PlanLayer;
1284
- graphic: PlanGraphic;
1285
- private floorPlan;
1286
- constructor({ pos, color, size, floorPlan }: MarkerArgs);
1287
- draw(): void;
1288
- remove(): void;
1289
- on(eventType: string, callback: any, context?: any): void;
1290
- off(eventType?: string, callback?: any): void;
1291
- set(updateArgs: MarkerUpdateArgs): void;
1292
- }
1293
-
1294
- type Animate = number | boolean;
1295
-
1296
- declare class Helper extends TinyEmitter {
1297
- floorPlan: FloorPlanEngine;
1298
- helperId: string;
1299
- constructor({ floorPlan, helperId }: {
1300
- floorPlan: FloorPlanEngine;
1301
- helperId: string;
1302
- });
1303
- destroy(): void;
1304
- }
1305
-
1306
- type FpeEvent = FpeCoreEvent | 'click' | 'dblclick' | 'context-menu' | 'mousemove' | 'drop' | 'drag-move' | 'drag-start' | 'drag-end' | 'key' | 'keyup';
1307
- interface ExportImage {
1308
- /** output format: png, jpg */
1309
- format?: 'png' | 'jpg';
1310
- /** fle name relevant if download is true */
1311
- fileName?: string;
1312
- /** only relevant if format is jpg */
1313
- quality?: number;
1314
- /** desired output format */
1315
- output?: 'base64' | 'text';
1316
- /** target width of the image */
1317
- maxWidth?: number;
1318
- /** If true, methods triggers a file download directly */
1319
- download?: boolean;
1320
- }
1321
- interface FpeInteraction {
1322
- lastSceneClick: Point2d;
1323
- cursor: Point2d;
1324
- cursorTarget: SceneNode;
1325
- isDragging: boolean;
1326
- isPanning: boolean;
1327
- lastClick: {
1328
- time: number;
1329
- pos: ScreenPosition;
1330
- };
1331
- metaKey: boolean;
1332
- ctrlKey: boolean;
1333
- altKey: boolean;
1334
- shiftKey: boolean;
1335
- dragOffset: Point2d;
1336
- cursorAction: 'split-wall' | 'duplicate' | 'move' | 'select' | 'none';
1337
- _dragStart: ScreenPosition;
1338
- preventFocusoutOnAltKeyup: boolean;
1339
- }
1340
- /**
1341
- * The main Floor plan engine SDK class
1342
- */
1343
- declare class FloorPlanEngine extends FloorPlanCore {
1344
- fpeNode?: HTMLElement;
1345
- view: WebGlView;
1346
- interaction: FpeInteraction;
1347
- availableHelpers: {
1348
- [name: string]: typeof Helper;
1349
- };
1350
- helper: {
1351
- [name: string]: Helper;
1352
- };
1353
- constructor({ container, options, scene }?: {
1354
- container?: Element;
1355
- options?: FpeConfig;
1356
- scene?: Scene;
1357
- });
1358
- prevent(e: any): void;
1359
- /**
1360
- * Subscribe to an event
1361
- */
1362
- on(event: FpeEvent, callback: Function, ctx?: any): this;
1363
- /**
1364
- * Subscribe to an event once
1365
- */
1366
- once(event: FpeEvent, callback: Function, ctx?: any): this;
1367
- /**
1368
- */
1369
- off(event: FpeEvent, callback?: Function): this;
1370
- emit(event: FpeEvent, ...args: any[]): this;
1371
- handleDrop(evt: any): void;
1372
- /**
1373
- * Change options after the floor plan engine instance has been created
1374
- * @param {StartupOptions} args - Startup options
1375
- */
1376
- set(args: FpeConfig): void;
1377
- mountFloorPlan(root: Element): void;
1378
- initDrawing(): void;
1379
- initDrawingEvents(): void;
1380
- generateUi(): void;
1381
- getSceneBoundingBox(margin?: number): BoundingBox2d;
1382
- /**
1383
- * Get a bounding box containing the scene, with some padding
1384
- * @param {BoundingBox2d} sceneBoundingBox - bounding box of the scene, in meters.
1385
- * @param {number} rectLeft - left edge of a rectangle into which the scene should fit, in pixels.
1386
- * @param {number} rectTop - top edge of a rectangle into which the scene should fit, in pixels.
1387
- * @param {number} rectRight - right edge of a rectangle into which the scene should fit, in pixels.
1388
- * @param {number} rectBottom - bottom edge of a rectangle into which the scene should fit, in pixels.
1389
- * @param {number} viewportWidth - width in pixels of the canvas.
1390
- * @param {number} viewportHeight - height in pixels of the canvas.
1391
- * @returns {BoundingBox2d} returns a new bounding box
1392
- */
1393
- getZoomExtentsBoundingBox(sceneBoundingBox: BoundingBox2d, rectLeft: number, rectTop: number, rectRight: number, rectBottom: number, viewportWidth: number, viewportHeight: number): BoundingBox2d;
1394
- /**
1395
- * Zoom to the extent of the scene in the viewport ( wait for loadScene promise )
1396
- * @param {number} [margin = 1] - margin around scene in meters. Defaults to 1 meter
1397
- * @param {Animate} [animate = false] - duration in milliseconds of the animation for the viewport transform. If true, the duration will be 500ms. If false or not provided there will be no animation
1398
- * @param {BoundingBox2d} [boundingBox = null] - bounding box to zoom to. Can for example be calculated via getZoomExtentsBoundingBox(…). If provided, the margin parameter will be ignored
1399
- * @returns {Promise.<Boolean, Error>} returns promise which resolves when animation is done
1400
- */
1401
- zoomExtents(margin?: number, animate?: Animate, boundingBox?: BoundingBox2d): Promise<boolean>;
1402
- /**
1403
- * Zoom to the bounding box of an element ( wait for loadScene promise )
1404
- * @param {string | SceneNode} node - id of an asset or a space or the node itself
1405
- * @param {number} [margin = 1] - margin around scene in meters
1406
- * @param {Animate} [animate] - duration of the animation for the viewport transform, if not provided there will be no animation
1407
- * @returns {Promise.<Boolean, Error>} returns promise which resolves when animation is done
1408
- */
1409
- zoomToElement(node: any, margin?: number, animate?: Animate): Promise<boolean | Error>;
1410
- /**
1411
- * set zoom to a specific bounding box
1412
- * @param {BoundingBox} bb - bounding box
1413
- * @param {Animate} [animate] - duration of the animation for the viewport transform, if not provided there will be no animation
1414
- * @returns {Promise.<Boolean, Error>} returns promise which resolves when animation is done
1415
- */
1416
- setZoom(bb: BoundingBox2d, animate?: Animate): Promise<boolean>;
1417
- /**
1418
- * zoom the current view by a factor
1419
- * @param {number} factor - zoom factor, larger than 1 zooms in, smaller than 1 zooms out
1420
- * @param {Animate} [animate = true] - duration of the animation for the viewport transform, if not provided there will be no animation
1421
- * @returns {Promise.<Boolean, Error>} returns promise which resolves when animation is done
1422
- */
1423
- zoomByFactor(factor: number, animate?: Animate): Promise<boolean>;
1424
- /**
1425
- * Add HTML info window
1426
- */
1427
- addInfoWindow(args?: InfoWindowArgs): InfoWindow;
1428
- /**
1429
- * Add custom HTML marker
1430
- */
1431
- addHtmlMarker(args?: HtmlMarkerArgs): HtmlMarker;
1432
- /**
1433
- * Add plan marker
1434
- */
1435
- addMarker({ pos, color, size }?: MarkerArgs): MarkerPin;
1436
- /**
1437
- * Convert screen coordinates to plan coordinates
1438
- */
1439
- getPlanPosition(point: Point2d): Point2d;
1440
- /**
1441
- * Convert plan coordinates to screen coordinates
1442
- */
1443
- getScreenPosition(point: Point2d): Point2d;
1444
- /**
1445
- * create plan layer or return existing by id
1446
- */
1447
- addLayer({ id, baseLayer }?: {
1448
- id?: string;
1449
- baseLayer?: BaseLayers;
1450
- }): PlanLayer;
1451
- /**
1452
- * get plan layer by name
1453
- */
1454
- getLayer(id: any): PlanLayer;
1455
- /**
1456
- * create plan graphic
1457
- * @deprecated use floorPlan.addLayer(<name>)
1458
- * @returns {PlanLayer}
1459
- */
1460
- addPlanGraphic(): PlanLayer;
1461
- /**
1462
- * Adds a helper and removes previous instances of it
1463
- */
1464
- addHelper(helper: string | typeof Helper, options?: any): Helper;
1465
- removeHelper(helperId: string): void;
1466
- /**
1467
- * Export the current view as an image
1468
- */
1469
- exportImage({ format, fileName, quality, output, maxWidth, download }?: ExportImage): Promise<string | Error>;
1470
- /**
1471
- * Destroy the floor plan instance
1472
- */
1473
- destroy(): void;
1474
- }
1475
-
1476
- export { FloorPlanEngine, type GraphicArgs, type Point2d, type Polygon, type PolygonList, type Shape, polygonIntersection, polygonOffset, polygonUnion };
1
+ /**
2
+ * This interface was referenced by `AuthJson`'s JSON-Schema
3
+ * via the `definition` "actionScope".
4
+ */
5
+ declare type ActionScope =
6
+ | "manageJoinRequests"
7
+ | "access"
8
+ | "archive"
9
+ | "bake"
10
+ | "changeRole"
11
+ | "close"
12
+ | "create"
13
+ | "createFromOrder"
14
+ | "delete"
15
+ | "export"
16
+ | "import"
17
+ | "invite"
18
+ | "query"
19
+ | "queryPublic"
20
+ | "queryPrivate"
21
+ | "read"
22
+ | "readPrivate"
23
+ | "readPublic"
24
+ | "update"
25
+ | "remove"
26
+ | "write"
27
+ | "addUser"
28
+ | "removeUser"
29
+ | "settings";
30
+
31
+ declare type Animate = number | boolean;
32
+
33
+ declare interface ApiUrls {
34
+ spaceApiUrl?: string;
35
+ apiStorageUrl?: string;
36
+ apiProductDataPath?: string;
37
+ }
38
+
39
+ declare interface ArcCurve extends CurveBase {
40
+ type: ArcCurveType;
41
+ radius: number;
42
+ startAngle: number;
43
+ endAngle: number;
44
+ }
45
+
46
+ declare interface ArcCurve_2 extends BaseShape {
47
+ type: 'curve:arc';
48
+ position: Vector2_2;
49
+ radius: number;
50
+ startAngle: number;
51
+ endAngle: number;
52
+ }
53
+
54
+ declare type ArcCurveType = typeof ArcCurveTypeValue;
55
+
56
+ declare const ArcCurveTypeValue = "curve:arc";
57
+
58
+ /**
59
+ * Background of the floor plan canvas
60
+ */
61
+ declare type BackgroundOptions = {
62
+ /** background-color: hex code for color, set to 'transparent' for transparent background */
63
+ color?: string;
64
+ /** show a dynamic grid */
65
+ showGrid?: boolean;
66
+ };
67
+
68
+ declare type BaseLayers = 'base' | 'scene' | 'preview' | 'annotation' | 'helper';
69
+
70
+ declare interface BaseShape {
71
+ type: string;
72
+ style?: ShapeStyle;
73
+ }
74
+
75
+ declare interface BezierCurve extends BaseShape {
76
+ type: 'curve:quadraticBezier';
77
+ points: Polygon;
78
+ }
79
+
80
+ declare type BoundingBox2d = {
81
+ min: Vector2_2;
82
+ max: Vector2_2;
83
+ };
84
+
85
+ declare type BoundingBox3d = {
86
+ min: Vector3;
87
+ max: Vector3;
88
+ };
89
+
90
+ declare interface CircleCurve extends CurveBase {
91
+ type: CircleCurveType;
92
+ radius: number;
93
+ }
94
+
95
+ declare interface CircleCurve_2 extends BaseShape {
96
+ type: 'curve:circle';
97
+ position: Vector2_2;
98
+ radius: number;
99
+ }
100
+
101
+ declare type CircleCurveType = typeof CircleCurveTypeValue;
102
+
103
+ declare const CircleCurveTypeValue = "curve:circle";
104
+
105
+ declare type ClosedCurve = RectangleCurve | PolygonCurve | CircleCurve | CompositeCurve;
106
+
107
+ declare type ClosedCurveType = RectangleCurveType | PolygonCurveType | CircleCurveType | CompositeCurveType;
108
+
109
+ declare interface CommonParameters$1 {
110
+ materials: LayoutRampMaterials;
111
+ }
112
+
113
+ declare interface CommonParameters$2 {
114
+ segmentCount: number;
115
+ segmentLength: number;
116
+ materials: LayoutRailingMaterials;
117
+ }
118
+
119
+ declare interface CommonParameters$3 {
120
+ wallCabinet: boolean;
121
+ leftHighCabinetCount: number;
122
+ rightHighCabinetCount: number;
123
+ sinkElementSlot: number;
124
+ cooktopElementSlot: number;
125
+ ovenElementSlot: number;
126
+ materials: LayoutKitchenMaterials;
127
+ }
128
+
129
+ declare interface CommonParameters$4 {
130
+ frameThickness: number;
131
+ frameDepth: number;
132
+ doorType: DoorType;
133
+ doorAngle: number;
134
+ hardware: boolean;
135
+ hingeSide: HingeSide;
136
+ doorSide: DoorSide;
137
+ materials: LayoutDoorMaterials;
138
+ }
139
+
140
+ declare interface CommonParameters$5 {
141
+ counterHeight: number;
142
+ materials: LayoutCaseworkMaterials;
143
+ }
144
+
145
+ declare interface CommonParameters$6 {
146
+ materials: LayoutBeamMaterials;
147
+ }
148
+
149
+ declare interface CommonParameters {
150
+ frameThickness: number;
151
+ frameDepth: number;
152
+ panelLength: number;
153
+ panelCount: number;
154
+ materials: LayoutWindowMaterials;
155
+ }
156
+
157
+ declare interface CompositeCurve extends CurveBase {
158
+ type: CompositeCurveType;
159
+ segments: OpenCurve[];
160
+ }
161
+
162
+ declare interface CompositeCurve_2 extends BaseShape {
163
+ type: 'curve:composite';
164
+ segments: OpenCurves[];
165
+ }
166
+
167
+ declare type CompositeCurveType = typeof CompositeCurveTypeValue;
168
+
169
+ declare const CompositeCurveTypeValue = "curve:composite";
170
+
171
+ /**
172
+ * This interface was referenced by `AuthJson`'s JSON-Schema
173
+ * via the `definition` "createTemporaryAccessToken".
174
+ */
175
+ declare interface CreateTemporaryAccessToken {
176
+ scopes: ScopeDefinitionArray;
177
+ durationSeconds?: number;
178
+ }
179
+
180
+ declare class CuboidGeometry extends ParametricGeometryBase {
181
+ type: CuboidGeometryType;
182
+ dimensions: Vector3;
183
+ constructor(id: string);
184
+ }
185
+
186
+ declare interface CuboidGeometryJson extends ParametricGeometryBaseJson {
187
+ type: CuboidGeometryType;
188
+ dimensions: Vector3;
189
+ }
190
+
191
+ declare type CuboidGeometryType = typeof CuboidGeometryTypeValue;
192
+
193
+ declare const CuboidGeometryTypeValue = "geometry:cuboid";
194
+
195
+ declare interface CurveBase {
196
+ type: CurveType;
197
+ }
198
+
199
+ declare type CurveType = ClosedCurveType | OpenCurveType;
200
+
201
+ declare interface CustomStairsParameters {
202
+ stairsType: CustomStairsType;
203
+ height: number;
204
+ stepWidth: number;
205
+ railing: 'none' | 'left' | 'right' | 'both';
206
+ materials: LayoutStairsMaterials;
207
+ }
208
+
209
+ declare type CustomStairsParametersJson = Partial<CustomStairsParameters>;
210
+
211
+ declare type CustomStairsType = 'custom';
212
+
213
+ declare interface DimensionParameters$1 {
214
+ length: number;
215
+ height: number;
216
+ }
217
+
218
+ declare interface DimensionParameters$2 {
219
+ length: number;
220
+ height: number;
221
+ }
222
+
223
+ declare type DimensionParameters = {
224
+ length: number;
225
+ width: number;
226
+ height: number;
227
+ };
228
+
229
+ declare type DoorSide = 'side1' | 'side2';
230
+
231
+ declare type DoorType = 'singleSwing' | 'doubleSwing' | 'slidingDoor' | 'opening' | 'elevatorDoor' | 'garageDoor';
232
+
233
+ declare interface EdgeCanSplitOptions {
234
+ minimumLength?: number;
235
+ }
236
+
237
+ declare type EdgeElementMap = {
238
+ 'element:curtainWall': LayoutCurtainWall;
239
+ 'element:spaceDivider': LayoutSpaceDivider;
240
+ 'element:wall': LayoutWall;
241
+ };
242
+
243
+ declare interface EdgeSplitOptions {
244
+ vertexId?: string;
245
+ edgeId?: string;
246
+ elementId?: string;
247
+ }
248
+
249
+ declare interface EdgeSplitReturnValue {
250
+ vertex: SpatialGraphVertex;
251
+ edge: SpatialGraphEdge;
252
+ element?: LayoutEdgeElement;
253
+ }
254
+
255
+ declare type EdgeType = 'graph:adjacentTo' | 'graph:connectedTo';
256
+
257
+ declare interface ExportImage {
258
+ /** output format: png, jpg */
259
+ format?: 'png' | 'jpg';
260
+ /** fle name relevant if download is true */
261
+ fileName?: string;
262
+ /** only relevant if format is jpg */
263
+ quality?: number;
264
+ /** desired output format */
265
+ output?: 'base64' | 'text';
266
+ /** target width of the image */
267
+ maxWidth?: number;
268
+ /** If true, methods triggers a file download directly */
269
+ download?: boolean;
270
+ }
271
+
272
+ declare class ExtrusionGeometry extends ParametricGeometryBase {
273
+ type: ExtrusionGeometryType;
274
+ profile: ClosedCurve;
275
+ height: number;
276
+ constructor(id: string, profile: ClosedCurve);
277
+ }
278
+
279
+ declare interface ExtrusionGeometryJson extends ParametricGeometryBaseJson {
280
+ type: ExtrusionGeometryType;
281
+ profile: ClosedCurve;
282
+ height: number;
283
+ }
284
+
285
+ declare type ExtrusionGeometryType = typeof ExtrusionGeometryTypeValue;
286
+
287
+ declare const ExtrusionGeometryTypeValue = "geometry:extrusion";
288
+
289
+ /**
290
+ * The main Floor plan engine SDK class
291
+ */
292
+ declare class FloorPlanCore {
293
+ settings: FpeConfig;
294
+ static readonly version: any;
295
+ readonly fpeId: string;
296
+ computed: FpeComputed;
297
+ loader: FpeLoader;
298
+ layout: SpaceGraphLayout;
299
+ spaceGraph: SpaceGraph;
300
+ isBrowser: boolean;
301
+ utils: any;
302
+ location: {
303
+ latitude: number;
304
+ longitude: number;
305
+ /** angle measured in degrees from the north line (=0 degrees). Value should be between -180 and 180 degrees (positive clockwise) */
306
+ bearing: number;
307
+ };
308
+ protected _emitter: TinyEmitter;
309
+ constructor({ options }?: {
310
+ options?: FpeConfig;
311
+ });
312
+ on<EventType extends FpeCoreEvent, Context>(event: EventType, handler: FpeCoreEventHandler<EventType>, ctx?: Context): this;
313
+ once<EventType extends FpeCoreEvent, Context>(event: EventType, handler: FpeCoreEventHandler<EventType>, ctx?: Context): this;
314
+ off<EventType extends FpeCoreEvent>(event: EventType, handler?: FpeCoreEventHandler<EventType>): this;
315
+ emit<EventType extends FpeCoreEvent>(event: EventType, ...args: FpeCoreEventMap[EventType]): this;
316
+ loadLayout(layout: SpaceGraphLayout, { skipGeometryCompute }?: {
317
+ skipGeometryCompute?: boolean;
318
+ }): void;
319
+ loadSpaceGraph(spaceGraph: SpaceGraph, { skipGeometryCompute, layoutId }?: {
320
+ skipGeometryCompute?: boolean;
321
+ layoutId?: string;
322
+ }): void;
323
+ loadSpaceGraphJson(spaceGraphJson: SpaceGraphJson): void;
324
+ /**
325
+ * Load a floor with its unique identifier the floorId
326
+ * @param {string} floorId id of the floor to load
327
+ * @param {AccessToken} accessTokenOptions Space API v2 [publishable](../space-api/v2/introduction.md#publishable-access-token) or [temporary](../space-api/v2/introduction.md#temporary-access-token) access token
328
+ * @returns {Promise.<Boolean, Error>} returns promise which resolves when loading is done
329
+ */
330
+ loadFloorById(floorId: string, accessTokenOptions?: TokenOptions): Promise<boolean | Error>;
331
+ /**
332
+ * Change options after the floor plan engine instance has been created
333
+ */
334
+ set(args?: FpeConfig): void;
335
+ /**
336
+ * Get a list of spaces and assets for a specific plan position
337
+ * @param {*} position - plan position
338
+ * @returns {Object} - list of spaces and assets
339
+ */
340
+ getResourcesFromPosition(position: Vector2_2): {
341
+ spaces: LayoutSpace[];
342
+ assets: LayoutAsset[];
343
+ };
344
+ /**
345
+ * Destroy the floor plan instance
346
+ */
347
+ destroy(): void;
348
+ }
349
+
350
+ /**
351
+ * The main Floor plan engine SDK class
352
+ */
353
+ export declare class FloorPlanEngine extends FloorPlanCore {
354
+ fpeNode?: HTMLElement;
355
+ view: WebGlView;
356
+ interaction: FpeInteraction;
357
+ availableHelpers: {
358
+ [name: string]: typeof Helper;
359
+ };
360
+ helper: {
361
+ [name: string]: Helper;
362
+ };
363
+ preventUpdateOnSpaceGraphEvent: boolean;
364
+ constructor({ container, options }?: {
365
+ container?: Element;
366
+ options?: FpeConfig;
367
+ });
368
+ prevent(e: any): void;
369
+ /**
370
+ * Subscribe to an event
371
+ */
372
+ on<EventType extends FpeEvent, Context>(event: EventType, handler: FpeEventHandler<EventType>, ctx?: Context): this;
373
+ /**
374
+ * Subscribe to an event once
375
+ */
376
+ once<EventType extends FpeEvent, Context>(event: EventType, handler: FpeEventHandler<EventType>, ctx?: Context): this;
377
+ /**
378
+ * Unsubscribe from an event
379
+ */
380
+ off<EventType extends FpeEvent, Context>(event: EventType, handler?: FpeEventHandler<EventType>, ctx?: Context): this;
381
+ emit<EventType extends FpeEvent>(event: EventType, ...args: FpeEventMap[EventType]): this;
382
+ handleDrop(evt: DragEvent): void;
383
+ /**
384
+ * Change options after the floor plan engine instance has been created
385
+ * @param args - Startup options
386
+ */
387
+ set(args: FpeConfig): void;
388
+ drawNodePreview(id: string, layout: SpaceGraphLayout, layer: PlanLayer, style?: ShapeStyle): void;
389
+ drawNodeUpdate(id: string, style?: 'selected' | ShapeStyle | false): void;
390
+ drawResourceUpdate({ resourceId }: {
391
+ resourceId: string;
392
+ }): void;
393
+ mountFloorPlan(root: Element): void;
394
+ initDrawing(): void;
395
+ initDrawingEvents(): void;
396
+ freeDrawingEvents(): void;
397
+ generateUi(): void;
398
+ getBoundingBox(margin?: number): BoundingBox2d;
399
+ /**
400
+ * Get a bounding box containing the layout, with some padding
401
+ * @param layoutBoundingBox - bounding box of the layout, in meters.
402
+ * @param rectLeft - left edge of a rectangle into which the layout should fit, in pixels.
403
+ * @param rectTop - top edge of a rectangle into which the layout should fit, in pixels.
404
+ * @param rectRight - right edge of a rectangle into which the layout should fit, in pixels.
405
+ * @param rectBottom - bottom edge of a rectangle into which the layout should fit, in pixels.
406
+ * @param viewportWidth - width in pixels of the canvas.
407
+ * @param viewportHeight - height in pixels of the canvas.
408
+ * @returns returns a new bounding box
409
+ */
410
+ getZoomExtentsBoundingBox(layoutBoundingBox: BoundingBox2d, rectLeft: number, rectTop: number, rectRight: number, rectBottom: number, viewportWidth: number, viewportHeight: number): BoundingBox2d;
411
+ /**
412
+ * Zoom to the extent of the scene in the viewport ( wait for loadScene promise )
413
+ * @param margin - margin around scene in meters. Defaults to 1 meter
414
+ * @param animate - duration in milliseconds of the animation for the viewport transform. If true, the duration will be 500ms. If false or not provided there will be no animation
415
+ * @param boundingBox - bounding box to zoom to. Can for example be calculated via getZoomExtentsBoundingBox(…). If provided, the margin parameter will be ignored
416
+ * @returns returns promise which resolves when animation is done
417
+ */
418
+ zoomExtents(margin?: number, animate?: Animate, boundingBox?: BoundingBox2d): Promise<boolean>;
419
+ /**
420
+ * Zoom to the bounding box of an element ( wait for loadScene promise )
421
+ * @param node - id of a node or the node itself
422
+ * @param margin - margin around scene in meters
423
+ * @param animate - duration of the animation for the viewport transform, if not provided there will be no animation
424
+ * @returns returns promise which resolves when animation is done
425
+ */
426
+ zoomToElement(node: string | LayoutElement | SpatialGraphEdge | LayoutSpace, margin?: number, animate?: Animate): Promise<boolean | Error>;
427
+ /**
428
+ * set zoom to a specific bounding box
429
+ * @param bb - bounding box
430
+ * @param animate - duration of the animation for the viewport transform, if not provided there will be no animation
431
+ * @returns returns promise which resolves when animation is done
432
+ */
433
+ setZoom(bb: BoundingBox2d, animate?: Animate): Promise<boolean>;
434
+ /**
435
+ * zoom the current view by a factor
436
+ * @param factor - zoom factor, larger than 1 zooms in, smaller than 1 zooms out
437
+ * @param animate - duration of the animation for the viewport transform, if not provided there will be no animation
438
+ * @returns returns promise which resolves when animation is done
439
+ */
440
+ zoomByFactor(factor: number, animate?: Animate): Promise<boolean>;
441
+ /**
442
+ * Add HTML info window
443
+ */
444
+ addInfoWindow(args?: InfoWindowArgs): InfoWindow;
445
+ /**
446
+ * Add custom HTML marker
447
+ */
448
+ addHtmlMarker(args?: HtmlMarkerArgs): HtmlMarker;
449
+ /**
450
+ * Add plan marker
451
+ */
452
+ addMarker({ position, color, size }?: MarkerArgs): MarkerPin;
453
+ /**
454
+ * Convert screen coordinates to plan coordinates
455
+ */
456
+ getPlanPosition(point: Vector2_2): Vector2_2;
457
+ /**
458
+ * Convert plan coordinates to screen coordinates
459
+ */
460
+ getScreenPosition(point: Vector2_2): Vector2_2;
461
+ /**
462
+ * create plan layer or return existing by id
463
+ */
464
+ addLayer({ id, baseLayer }?: {
465
+ id?: string;
466
+ baseLayer?: BaseLayers;
467
+ }): PlanLayer;
468
+ /**
469
+ * get plan layer by name
470
+ */
471
+ getLayer(id: any): PlanLayer;
472
+ /**
473
+ * create plan graphic
474
+ * @deprecated use floorPlan.addLayer(<name>)
475
+ * @returns
476
+ */
477
+ addPlanGraphic(): PlanLayer;
478
+ /**
479
+ * Adds a helper and removes previous instances of it
480
+ */
481
+ addHelper(helper: string | typeof Helper, options?: any): Helper;
482
+ removeHelper(helperId: string): void;
483
+ /**
484
+ * Export the current view as an image
485
+ */
486
+ exportImage({ format, fileName, quality, output, maxWidth, download }?: ExportImage): Promise<string | Error>;
487
+ /**
488
+ * Destroy the floor plan instance
489
+ */
490
+ destroy(): void;
491
+ }
492
+
493
+ /**
494
+ * This is the place to give the floor plan your own style
495
+ */
496
+ declare type FloorPlanTheme = {
497
+ /** define the background */
498
+ background?: BackgroundOptions;
499
+ /** wall contours are merged to one continuous outline, needed if you want white walls */
500
+ wallContours?: boolean;
501
+ /** render assets with textures rather than solid colors */
502
+ showAssetTextures?: boolean;
503
+ fontFamily?: string;
504
+ elements?: {
505
+ byId?: Record<string, ShapeStyle>;
506
+ floorPlan?: {
507
+ grayscale: boolean;
508
+ };
509
+ roomStamp?: {
510
+ /** @deprecated show the usage information in room stamps */
511
+ showUsage?: boolean;
512
+ /** @deprecated show the area information in room stamps */
513
+ showArea?: boolean;
514
+ /** show the area information in room stamps */
515
+ roomStampDisplay?: ('usage' | 'area' | 'customId' | 'name' | 'id')[];
516
+ /** text color for room stamps */
517
+ text?: Rgb;
518
+ /** whether the room stamp text should have an outline to assist with contrast issues */
519
+ textOutline?: boolean;
520
+ };
521
+ 'element:asset'?: ShapeStyle;
522
+ 'element:beam'?: ShapeStyle;
523
+ 'element:boundaryWall'?: ShapeStyle;
524
+ 'element:casework'?: ShapeStyle;
525
+ 'element:ceiling'?: ShapeStyle;
526
+ 'element:column'?: ShapeStyle;
527
+ 'element:curtainWall'?: ShapeStyle;
528
+ 'element:door'?: ShapeStyle;
529
+ 'element:floor'?: ShapeStyle;
530
+ 'element:generic'?: ShapeStyle;
531
+ 'element:kitchen'?: ShapeStyle;
532
+ 'element:opening'?: ShapeStyle;
533
+ 'element:railing'?: ShapeStyle;
534
+ 'element:ramp'?: ShapeStyle;
535
+ 'element:roof'?: ShapeStyle;
536
+ 'element:slab'?: ShapeStyle;
537
+ 'element:spaceDivider'?: ShapeStyle;
538
+ 'element:stairFlight'?: ShapeStyle;
539
+ 'element:stairs'?: ShapeStyle;
540
+ 'element:wall'?: ShapeStyle;
541
+ 'element:window'?: ShapeStyle;
542
+ 'layout:space'?: SpaceShapeStyle;
543
+ 'spatialGraph:edge'?: ShapeStyle;
544
+ };
545
+ };
546
+
547
+ declare type FpeComputed = {
548
+ wallContours: PolygonWithHoles[];
549
+ snapPoints: Vector2_2[];
550
+ snapMargin: number;
551
+ };
552
+
553
+ declare interface FpeConfig extends StartupOptions {
554
+ api?: {
555
+ productDataCacheAge?: number;
556
+ productContourCacheAge?: number;
557
+ } & TokenOptions;
558
+ loadTextures?: boolean;
559
+ showFloorPlan?: boolean;
560
+ showSpaceDividers?: boolean;
561
+ showCeilingLamps?: boolean;
562
+ svgViewBoxDim?: number;
563
+ svgMode?: boolean;
564
+ destroyOnDomRemove?: boolean;
565
+ }
566
+
567
+ export declare type FpeCoreEvent = keyof FpeCoreEventMap;
568
+
569
+ declare type FpeCoreEventHandler<EventType extends FpeCoreEvent> = FpeCoreEventMap[EventType] extends any[] ? (...args: FpeCoreEventMap[EventType]) => void : never;
570
+
571
+ declare type FpeCoreEventMap = {
572
+ 'update-settings': [event: FpeConfig];
573
+ 'space-api-floor-loaded': [id: string];
574
+ 'space-api-floor-error': [id: string, error: string];
575
+ };
576
+
577
+ export declare type FpeDragEvent = {
578
+ position: Vector2_2;
579
+ screenPos: Vector2_2;
580
+ sourceEvent: FpeInteractionEvent;
581
+ };
582
+
583
+ export declare type FpeDropEvent = {
584
+ position: Vector2_2;
585
+ screenPos: Vector2_2;
586
+ verticalPos: number;
587
+ sourceEvent: DragEvent;
588
+ };
589
+
590
+ export declare type FpeEvent = keyof FpeEventMap;
591
+
592
+ declare type FpeEventHandler<EventType extends FpeEvent> = FpeEventMap[EventType] extends any[] ? (...args: FpeEventMap[EventType]) => void : never;
593
+
594
+ export declare type FpeEventMap = FpeCoreEventMap & {
595
+ click: [event: FpePointerEvent];
596
+ dblclick: [event: FpePointerEvent];
597
+ 'context-menu': [event: FpePointerEvent];
598
+ mousemove: [event: FpePointerEvent];
599
+ drop: [event: FpeDropEvent];
600
+ 'drag-move': [event: FpeDragEvent];
601
+ 'drag-start': [event: FpeDragEvent];
602
+ 'drag-end': [event: FpeDragEvent];
603
+ key: [event: FpeKeyEvent];
604
+ keyup: [event: FpeKeyEvent];
605
+ focus: [event: boolean];
606
+ 'resource-loaded': [event: {
607
+ resourceId: string;
608
+ }];
609
+ 'spaces-loaded': [];
610
+ 'loading-status': [event: {
611
+ totalCount: number;
612
+ doneCount: number;
613
+ }];
614
+ 'loading-done': [event: {
615
+ totalCount: number;
616
+ }];
617
+ };
618
+
619
+ declare interface FpeInteraction {
620
+ lastSceneClick: Vector2_2;
621
+ cursor: Vector2_2;
622
+ cursorTarget: LayoutElement | LayoutSpace;
623
+ isDragging: boolean;
624
+ isPanning: boolean;
625
+ lastClick: {
626
+ time: number;
627
+ position: ScreenPosition;
628
+ };
629
+ metaKey: boolean;
630
+ ctrlKey: boolean;
631
+ altKey: boolean;
632
+ shiftKey: boolean;
633
+ dragOffset: Vector2_2;
634
+ cursorAction: 'split-wall' | 'duplicate' | 'move' | 'select' | 'none';
635
+ _dragStart: ScreenPosition;
636
+ preventFocusoutOnAltKeyup: boolean;
637
+ }
638
+
639
+ export declare type FpeInteractionEvent = FpeInteractionEventType[keyof FpeInteractionEventType];
640
+
641
+ export declare type FpeInteractionEventType = {
642
+ /* Excluded from this release type: pixi */
643
+ dom: MouseEvent;
644
+ };
645
+
646
+ export declare type FpeKeyEvent = {
647
+ key: string;
648
+ lowerCaseKey: string;
649
+ sourceEvent: KeyboardEvent;
650
+ };
651
+
652
+ declare class FpeLoader extends TinyEmitter {
653
+ promiseCache: Map<string, Promise<any>>;
654
+ loadStages: {
655
+ product: boolean;
656
+ productContour: boolean;
657
+ productTexture: boolean;
658
+ };
659
+ queue: Record<ResourceFormats, Map<string, Promise<any>>>;
660
+ resources: {
661
+ nodes: Map<string, Set<LayoutAsset | LayoutFloorPlanImageAnnotation>>;
662
+ productJson: Map<string, ProductAttributes>;
663
+ productContour: Map<string, Polygon[]>;
664
+ texture: Map<string, TextureData>;
665
+ };
666
+ floorPlan: FloorPlanCore;
667
+ productContourCacheAge: number;
668
+ productDataCacheAge: number;
669
+ initialLoading: boolean;
670
+ _requestCounter: number;
671
+ _loadCounter: number;
672
+ on: (event: LoadingEvent, callback: Function, ctx?: any) => this;
673
+ once: (event: LoadingEvent, callback: Function, ctx?: any) => this;
674
+ off: (event: LoadingEvent, callback?: Function) => this;
675
+ emit: (event: LoadingEvent, ...args: any[]) => this;
676
+ constructor(floorPlan: FloorPlanCore);
677
+ loadStatus(): void;
678
+ loadResources(resourceId: string, node: LayoutAsset, formats: ResourceFormats[]): Promise<any[]>;
679
+ loadResource(resourceId: string, node: LayoutAsset, format: ResourceFormats): any;
680
+ reset(): void;
681
+ }
682
+
683
+ export declare type FpePointerEvent = {
684
+ nodeId?: string;
685
+ position: Vector2_2;
686
+ isDoubleClick?: boolean;
687
+ sourceEvent: FpeInteractionEvent;
688
+ };
689
+
690
+ declare class GeometryBase extends SpaceGraphNodeBase {
691
+ type: SpaceGraphGeometryType;
692
+ position: PositionEntry;
693
+ rotation: RotationEntry;
694
+ rotationAxis: Vector3;
695
+ boundingBox: BoundingBox3d;
696
+ surfaces: Surfaces;
697
+ materials: SurfaceMaterialsJson;
698
+ constructor(id: string, type: SpaceGraphGeometryType);
699
+ }
700
+
701
+ declare interface GeometryBaseJson extends SpaceGraphNodeBaseJson {
702
+ id: string;
703
+ type: SpaceGraphGeometryType;
704
+ position?: PositionEntry;
705
+ rotation?: RotationEntry;
706
+ rotationAxis?: Vector3;
707
+ boundingBox?: BoundingBox3d;
708
+ surfaces?: Surfaces;
709
+ materials?: SurfaceMaterialsJson;
710
+ material?: SpaceGraphMaterialJson;
711
+ }
712
+
713
+ declare class GeometryClip extends GeometryOperationPlaneBase {
714
+ type: GeometryClipType;
715
+ constructor(id: string, plane: Plane, material: SpaceGraphMaterial);
716
+ }
717
+
718
+ declare interface GeometryClipJson extends GeometryOperationPlaneBaseJson {
719
+ type: GeometryClipType;
720
+ }
721
+
722
+ declare type GeometryClipType = typeof GeometryClipTypeValue;
723
+
724
+ declare const GeometryClipTypeValue = "csg:clip";
725
+
726
+ declare type GeometryFaceIndices = number[] | IndexRange | 'all';
727
+
728
+ declare class GeometryIntersect extends GeometryOperationGeometryBase {
729
+ type: GeometryIntersectType;
730
+ }
731
+
732
+ declare interface GeometryIntersectJson extends GeometryOperationGeometryBaseJson {
733
+ type: GeometryIntersectType;
734
+ }
735
+
736
+ declare type GeometryIntersectType = typeof GeometryIntersectTypeValue;
737
+
738
+ declare const GeometryIntersectTypeValue = "csg:intersect";
739
+
740
+ declare type GeometryOperation = GeometryOperationGeometry | GeometryOperationPlane;
741
+
742
+ declare class GeometryOperationBase extends SpaceGraphTypedValue {
743
+ type: GeometryOperationType;
744
+ constructor(type: GeometryOperationType);
745
+ }
746
+
747
+ declare interface GeometryOperationBaseJson extends SpaceGraphTypedValueJson {
748
+ type: GeometryOperationType;
749
+ }
750
+
751
+ declare type GeometryOperationGeometry = GeometryReference | GeometrySubtract | GeometryUnion | GeometryIntersect;
752
+
753
+ declare class GeometryOperationGeometryBase extends GeometryOperationBase {
754
+ type: GeometryOperationGeometryType;
755
+ geometry: SpaceGraphGeometry;
756
+ position: PositionEntry;
757
+ rotation: RotationEntry;
758
+ rotationAxis: Vector3;
759
+ materials: SurfaceMaterials;
760
+ constructor(type: GeometryOperationGeometryType, geometry: SpaceGraphGeometry, materials: SurfaceMaterials);
761
+ }
762
+
763
+ declare interface GeometryOperationGeometryBaseJson extends GeometryOperationBaseJson {
764
+ type: GeometryOperationGeometryType;
765
+ geometry: string | SpaceGraphGeometryJson;
766
+ position?: PositionEntry;
767
+ rotation?: RotationEntry;
768
+ rotationAxis?: Vector3;
769
+ materials?: SurfaceMaterialsJson;
770
+ material?: SpaceGraphMaterialJson;
771
+ }
772
+
773
+ declare type GeometryOperationGeometryJson = string | GeometryReferenceJson | GeometrySubtractJson | GeometryIntersectJson | GeometryUnionJson;
774
+
775
+ declare type GeometryOperationGeometryType = GeometryReferenceType | GeometrySubtractType | GeometryUnionType | GeometryIntersectType;
776
+
777
+ declare type GeometryOperationJson = GeometryOperationGeometryJson | GeometryOperationPlaneJson;
778
+
779
+ declare type GeometryOperationPlane = GeometryClip;
780
+
781
+ declare class GeometryOperationPlaneBase extends GeometryOperationBase {
782
+ type: GeometryOperationPlaneType;
783
+ plane: Plane;
784
+ material: SpaceGraphMaterial;
785
+ constructor(type: GeometryOperationPlaneType, plane: Plane, material: SpaceGraphMaterial);
786
+ }
787
+
788
+ declare interface GeometryOperationPlaneBaseJson extends GeometryOperationBaseJson {
789
+ type: GeometryOperationPlaneType;
790
+ plane: Plane;
791
+ material: SpaceGraphMaterialJson;
792
+ }
793
+
794
+ declare type GeometryOperationPlaneJson = GeometryClipJson;
795
+
796
+ declare type GeometryOperationPlaneType = GeometryClipType;
797
+
798
+ declare type GeometryOperationType = GeometryOperationGeometryType | GeometryOperationPlaneType;
799
+
800
+ declare class GeometryReference extends GeometryOperationGeometryBase {
801
+ type: GeometryReferenceType;
802
+ }
803
+
804
+ declare interface GeometryReferenceJson extends GeometryOperationGeometryBaseJson {
805
+ type: GeometryReferenceType;
806
+ }
807
+
808
+ declare type GeometryReferenceType = typeof GeometryReferenceTypeValue;
809
+
810
+ declare const GeometryReferenceTypeValue = "reference:geometry";
811
+
812
+ declare class GeometrySubtract extends GeometryOperationGeometryBase {
813
+ type: GeometrySubtractType;
814
+ }
815
+
816
+ declare interface GeometrySubtractJson extends GeometryOperationGeometryBaseJson {
817
+ type: GeometrySubtractType;
818
+ }
819
+
820
+ declare type GeometrySubtractType = typeof GeometrySubtractTypeValue;
821
+
822
+ declare const GeometrySubtractTypeValue = "csg:subtract";
823
+
824
+ declare class GeometryUnion extends GeometryOperationGeometryBase {
825
+ type: GeometryUnionType;
826
+ }
827
+
828
+ declare interface GeometryUnionJson extends GeometryOperationGeometryBaseJson {
829
+ type: GeometryUnionType;
830
+ }
831
+
832
+ declare type GeometryUnionType = typeof GeometryUnionTypeValue;
833
+
834
+ declare const GeometryUnionTypeValue = "csg:union";
835
+
836
+ /**
837
+ * undirected graph for traversal without edge weights
838
+ */
839
+ declare class Graph {
840
+ nodeMap: Map<LayoutNode, Map<EdgeType, Set<LayoutNode>>>;
841
+ addNode(node: LayoutNode): Map<EdgeType, Set<LayoutNode>>;
842
+ addEdge(type: EdgeType, source: LayoutNode, destination: LayoutNode): void;
843
+ removeNode(node: LayoutNode): void;
844
+ removeEdge(type: EdgeType, source: LayoutNode, destination: LayoutNode): void;
845
+ /**
846
+ * Breadth-First Search
847
+ * if edges have weights this needs to be replaces with dijkstra algorithm
848
+ */
849
+ findShortestPath(edgeType: EdgeType, start: LayoutNode, end: LayoutNode, options?: {
850
+ depthLimit?: number;
851
+ }): LayoutNode[] | null;
852
+ }
853
+
854
+ export declare interface GraphicArgs {
855
+ shapes: Shape[];
856
+ position?: Vector2_2;
857
+ alpha?: number;
858
+ clearLayer?: boolean;
859
+ scale?: number;
860
+ interactive?: boolean;
861
+ updatePositionOnDrag?: boolean;
862
+ id?: string;
863
+ isHandler?: boolean;
864
+ scaleOnZoom?: boolean;
865
+ }
866
+
867
+ declare type GraphicUpdate = {
868
+ position?: Vector2_2;
869
+ style?: ShapeStyle;
870
+ shapes?: Shape[];
871
+ };
872
+
873
+ declare class GroupRelation extends SpaceGraphNodeBase {
874
+ type: GroupRelationType;
875
+ elements: Set<LayoutElement>;
876
+ constructor(id: string);
877
+ insertElements(elements: LayoutElement[]): void;
878
+ removeElements(elements: LayoutElement[]): void;
879
+ copyForClone(product: GroupRelation): void;
880
+ }
881
+
882
+ declare interface GroupRelationJson extends SpaceGraphNodeBaseJson {
883
+ type: GroupRelationType;
884
+ elements: string[];
885
+ }
886
+
887
+ declare type GroupRelationType = typeof GroupRelationTypeValue;
888
+
889
+ declare const GroupRelationTypeValue = "relation:group";
890
+
891
+ declare interface GroupShape extends BaseShape {
892
+ type: 'group';
893
+ position?: Vector2_2;
894
+ rotation?: number;
895
+ children: Shape[];
896
+ }
897
+
898
+ declare class Helper extends TinyEmitter {
899
+ floorPlan: FloorPlanEngine;
900
+ helperId: string;
901
+ constructor({ floorPlan, helperId }: {
902
+ floorPlan: FloorPlanEngine;
903
+ helperId: string;
904
+ });
905
+ destroy(): void;
906
+ }
907
+
908
+ /**
909
+ * Elements that can be hidden in the floor plan
910
+ */
911
+ declare type HideableElement = LayoutElement['type'] | LayoutSpace['type'] | SpatialGraphEdge['type'] | LayoutAnnotation['type'] | 'roomStamp';
912
+
913
+ declare type HingeSide = 'left' | 'right';
914
+
915
+ declare class HtmlMarker {
916
+ position: Vector2_2;
917
+ size: Vector2_2;
918
+ offset: Vector2_2;
919
+ isHidden: boolean;
920
+ id: string;
921
+ el: HTMLElement;
922
+ private _floorPlan;
923
+ private _anchorPos;
924
+ constructor({ position, offset, el, floorPlan }: HtmlMarkerState);
925
+ _updateHtmlMarker: () => void;
926
+ _updateHtmlMarkerStyle(): void;
927
+ set({ position, offset }: Pick<HtmlMarkerArgs, 'position' | 'offset'>): void;
928
+ remove(): void;
929
+ }
930
+
931
+ declare interface HtmlMarkerArgs {
932
+ /** coordinates of the window in meters */
933
+ position?: Vector2_2;
934
+ offset?: Vector2_2;
935
+ /** html string as content of the info window */
936
+ el?: HTMLElement;
937
+ /** If true , a close button will appear in the top right corner of the info window. */
938
+ closeButton?: boolean;
939
+ }
940
+
941
+ declare interface HtmlMarkerState extends HtmlMarkerArgs {
942
+ floorPlan: FloorPlanEngine;
943
+ }
944
+
945
+ declare type IndexRange = {
946
+ type: 'index:range';
947
+ start: number;
948
+ end: number;
949
+ };
950
+
951
+ declare class InfoWindow {
952
+ private _floorPlan;
953
+ position: Vector2_2;
954
+ height: number;
955
+ width: number;
956
+ closeButton: any;
957
+ html: any;
958
+ el: Element;
959
+ private _anchorPos;
960
+ private _getPosition;
961
+ constructor({ width, height, position, html, closeButton, floorPlan }?: InfoWindowState);
962
+ _createInfoWindow(): void;
963
+ _setContent(): void;
964
+ _updateInfoWindow(): void;
965
+ set({ width, height, position, html, closeButton }: {
966
+ width: any;
967
+ height: any;
968
+ position: any;
969
+ html: any;
970
+ closeButton: any;
971
+ }): void;
972
+ remove(): void;
973
+ }
974
+
975
+ declare interface InfoWindowArgs {
976
+ /** pixel width of the window - default 100 */
977
+ width?: number;
978
+ /** pixel height of the window - default 80 */
979
+ height?: number;
980
+ /** coordinates of the window in meters */
981
+ position?: Vector2_2;
982
+ /** html string as content of the info window */
983
+ html?: string;
984
+ /** If true , a close button will appear in the top right corner of the info window. */
985
+ closeButton?: boolean;
986
+ }
987
+
988
+ declare interface InfoWindowState extends InfoWindowArgs {
989
+ floorPlan?: FloorPlanEngine;
990
+ }
991
+
992
+ declare class Layout2dView extends LayoutViewBase {
993
+ type: Layout2dViewType;
994
+ parameters: Layout2dViewParameters;
995
+ constructor(id: string);
996
+ setParameters(parameters: RecursivePartial<Layout2dViewParameters>): void;
997
+ }
998
+
999
+ declare interface Layout2dViewJson extends LayoutViewBaseJson {
1000
+ type: Layout2dViewType;
1001
+ parameters?: Layout2dViewParametersJson;
1002
+ }
1003
+
1004
+ declare interface Layout2dViewNodeStyle {
1005
+ tags: string[];
1006
+ fill: string;
1007
+ fillOpacity: number;
1008
+ stroke: string;
1009
+ strokeWidth: number;
1010
+ }
1011
+
1012
+ declare type Layout2dViewNodeStyleJson = Partial<Layout2dViewNodeStyle>;
1013
+
1014
+ declare interface Layout2dViewParameters {
1015
+ style: Layout2dViewStyle;
1016
+ hidden: LayoutElementType[];
1017
+ }
1018
+
1019
+ declare interface Layout2dViewParametersJson {
1020
+ style: Layout2dViewStyleJson;
1021
+ hidden: LayoutElementType[];
1022
+ }
1023
+
1024
+ declare interface Layout2dViewStyle {
1025
+ background: Pick<Layout2dViewNodeStyle, 'fill'>;
1026
+ units: 'imperial' | 'metric';
1027
+ byId: Record<string, Layout2dViewNodeStyle>;
1028
+ byType: Record<string, Layout2dViewNodeStyle>;
1029
+ byAttribute: {
1030
+ program: Record<string, Layout2dViewNodeStyle>;
1031
+ usage: Record<string, Layout2dViewNodeStyle>;
1032
+ };
1033
+ }
1034
+
1035
+ declare interface Layout2dViewStyleJson {
1036
+ background?: Pick<Layout2dViewNodeStyleJson, 'fill'>;
1037
+ units?: 'imperial' | 'metric';
1038
+ byId?: Record<string, Layout2dViewNodeStyleJson>;
1039
+ byType?: Record<string, Layout2dViewNodeStyleJson>;
1040
+ byAttribute?: {
1041
+ program?: Record<string, Layout2dViewNodeStyleJson>;
1042
+ usage?: Record<string, Layout2dViewNodeStyleJson>;
1043
+ };
1044
+ }
1045
+
1046
+ declare type Layout2dViewType = typeof Layout2dViewTypeValue;
1047
+
1048
+ declare const Layout2dViewTypeValue = "view:2d";
1049
+
1050
+ declare class Layout3dView extends LayoutViewBase {
1051
+ type: Layout3dViewType;
1052
+ parameters: Layout3dViewParameters;
1053
+ constructor(id: string);
1054
+ setParameters(parameters: RecursivePartial<Layout3dViewParameters>): void;
1055
+ }
1056
+
1057
+ declare interface Layout3dViewJson extends LayoutViewBaseJson {
1058
+ type: Layout3dViewType;
1059
+ parameters?: Layout3dViewParametersJson;
1060
+ }
1061
+
1062
+ declare interface Layout3dViewParameters {
1063
+ position: Vector3;
1064
+ normal: Vector3;
1065
+ fov: number | 'default';
1066
+ scale: number | 'auto';
1067
+ lensShiftX: number;
1068
+ lensShiftY: number;
1069
+ projection: 'perspective' | 'orthographic';
1070
+ }
1071
+
1072
+ declare type Layout3dViewParametersJson = Partial<Layout3dViewParameters>;
1073
+
1074
+ declare type Layout3dViewType = typeof Layout3dViewTypeValue;
1075
+
1076
+ declare const Layout3dViewTypeValue = "view:3d";
1077
+
1078
+ declare type LayoutAnnotation = LayoutFloorPlanDxfAnnotation | LayoutFloorPlanImageAnnotation;
1079
+
1080
+ declare class LayoutAnnotationBase extends LayoutNodeBase {
1081
+ type: LayoutAnnotationType;
1082
+ parameters: LayoutAnnotationParameters;
1083
+ position: Vector3;
1084
+ rotation: number;
1085
+ copyForClone(annotation: LayoutAnnotation): void;
1086
+ setTransform(position: Vector3, rotation: number): void;
1087
+ setParameters(parameters: RecursivePartial<LayoutAnnotationParameters>): void;
1088
+ }
1089
+
1090
+ declare interface LayoutAnnotationBaseJson extends LayoutNodeBaseJson {
1091
+ type: LayoutAnnotationType;
1092
+ position: Vector3;
1093
+ rotation: number;
1094
+ parameters?: LayoutAnnotationParametersJson;
1095
+ }
1096
+
1097
+ declare type LayoutAnnotationJson = LayoutFloorPlanDxfAnnotationJson | LayoutFloorPlanImageAnnotationJson;
1098
+
1099
+ declare type LayoutAnnotationParameters = LayoutFloorPlanDxfParameters | LayoutFloorPlanImageParameters;
1100
+
1101
+ declare type LayoutAnnotationParametersJson = LayoutFloorPlanDxfParametersJson | LayoutFloorPlanImageParametersJson;
1102
+
1103
+ declare type LayoutAnnotationType = LayoutFloorPlanDxfType | LayoutFloorPlanImageType;
1104
+
1105
+ declare class LayoutAsset extends LayoutTransformElementBase {
1106
+ type: LayoutAssetType;
1107
+ parameters: LayoutAssetParameters;
1108
+ product: SpaceGraphProduct | null;
1109
+ constructor(id: string);
1110
+ setParameters(parameters: RecursivePartial<LayoutAssetParameters>): void;
1111
+ setProduct(product: SpaceGraphProduct): void;
1112
+ getBoundingBox(localTransform?: boolean): {
1113
+ min: Vector3;
1114
+ max: Vector3;
1115
+ transform: Transform3d;
1116
+ };
1117
+ }
1118
+
1119
+ declare interface LayoutAssetJson extends LayoutTransformElementBaseJson {
1120
+ type: LayoutAssetType;
1121
+ product?: string;
1122
+ }
1123
+
1124
+ declare interface LayoutAssetMaterials {
1125
+ }
1126
+
1127
+ declare interface LayoutAssetParameters {
1128
+ materials: LayoutAssetMaterials;
1129
+ }
1130
+
1131
+ declare type LayoutAssetType = typeof LayoutAssetTypeValue;
1132
+
1133
+ declare const LayoutAssetTypeValue = "element:asset";
1134
+
1135
+ declare class LayoutBeam extends LayoutTransformElementBase {
1136
+ type: LayoutBeamType;
1137
+ parameters: LayoutBeamParameters;
1138
+ constructor(id: string);
1139
+ setParameters(parameters: RecursivePartial<LayoutBeamParameters>): void;
1140
+ }
1141
+
1142
+ declare interface LayoutBeamJson extends LayoutTransformElementBaseJson {
1143
+ type: LayoutBeamType;
1144
+ parameters?: LayoutBeamParametersJson;
1145
+ }
1146
+
1147
+ declare interface LayoutBeamMaterials {
1148
+ top: SpaceGraphMaterialJson;
1149
+ bottom: SpaceGraphMaterialJson;
1150
+ sides: SpaceGraphMaterialJson;
1151
+ }
1152
+
1153
+ declare type LayoutBeamParameters = DimensionParameters & CommonParameters$6;
1154
+
1155
+ declare type LayoutBeamParametersJson = DimensionParameters & Partial<CommonParameters$6>;
1156
+
1157
+ declare type LayoutBeamType = typeof LayoutBeamTypeValue;
1158
+
1159
+ declare const LayoutBeamTypeValue = "element:beam";
1160
+
1161
+ declare class LayoutBoundary {
1162
+ vertices: SpatialGraphVertex[];
1163
+ edges: SpatialGraphEdge[];
1164
+ geometryProfile: Vector2[];
1165
+ }
1166
+
1167
+ declare type LayoutBoundaryElement = LayoutBoundarySlab | LayoutBoundaryWall;
1168
+
1169
+ declare class LayoutBoundaryElementBase extends LayoutElementBase {
1170
+ type: LayoutBoundaryElementType;
1171
+ parameters: LayoutBoundaryElementParameters;
1172
+ boundaries: LayoutBoundary[];
1173
+ constructor(id: string, type: LayoutBoundaryElementType, boundaries: LayoutBoundary[]);
1174
+ getBoundingBox(): {
1175
+ min: Vector3;
1176
+ max: Vector3;
1177
+ transform: Transform3d;
1178
+ };
1179
+ }
1180
+
1181
+ declare interface LayoutBoundaryElementBaseJson extends LayoutElementBaseJson {
1182
+ type: LayoutBoundaryElementType;
1183
+ boundaries: LayoutBoundaryJson[];
1184
+ parameters?: LayoutBoundaryElementParametersJson;
1185
+ }
1186
+
1187
+ declare type LayoutBoundaryElementJson = LayoutBoundarySlabJson | LayoutBoundaryWallJson;
1188
+
1189
+ declare type LayoutBoundaryElementParameters = LayoutBoundarySlabParameters | LayoutBoundaryWallParameters;
1190
+
1191
+ declare type LayoutBoundaryElementParametersJson = LayoutBoundarySlabParametersJson | LayoutBoundaryWallParametersJson;
1192
+
1193
+ declare type LayoutBoundaryElementType = LayoutBoundarySlabType | LayoutBoundaryWallType;
1194
+
1195
+ declare interface LayoutBoundaryJson {
1196
+ edges: string[];
1197
+ }
1198
+
1199
+ declare class LayoutBoundarySlab extends LayoutBoundaryElementBase {
1200
+ type: LayoutBoundarySlabType;
1201
+ parameters: LayoutBoundarySlabParameters;
1202
+ space: LayoutSpace | null;
1203
+ constructor(id: string, type: LayoutBoundarySlabType, boundaries: LayoutBoundary[]);
1204
+ setParameters(parameters: RecursivePartial<LayoutBoundarySlabParameters>): void;
1205
+ getSpaces(): LayoutSpace[];
1206
+ }
1207
+
1208
+ declare interface LayoutBoundarySlabJson extends LayoutBoundaryElementBaseJson {
1209
+ type: LayoutBoundarySlabType;
1210
+ parameters?: LayoutBoundarySlabParametersJson;
1211
+ }
1212
+
1213
+ declare interface LayoutBoundarySlabMaterials {
1214
+ top: SpaceGraphMaterialJson;
1215
+ bottom: SpaceGraphMaterialJson;
1216
+ sides: SpaceGraphMaterialJson;
1217
+ }
1218
+
1219
+ declare interface LayoutBoundarySlabParameters {
1220
+ height: number;
1221
+ elevation: number;
1222
+ materials: LayoutBoundarySlabMaterials;
1223
+ }
1224
+
1225
+ declare type LayoutBoundarySlabParametersJson = Partial<LayoutBoundarySlabParameters>;
1226
+
1227
+ declare type LayoutBoundarySlabType = LayoutFloorType | LayoutCeilingType;
1228
+
1229
+ declare class LayoutBoundaryWall extends LayoutBoundaryElementBase {
1230
+ type: LayoutBoundaryWallType;
1231
+ parameters: LayoutBoundaryWallParameters;
1232
+ constructor(id: string, boundaries: LayoutBoundary[]);
1233
+ setParameters(parameters: RecursivePartial<LayoutBoundaryWallParameters>): void;
1234
+ }
1235
+
1236
+ declare interface LayoutBoundaryWallJson extends LayoutBoundaryElementBaseJson {
1237
+ type: LayoutBoundaryWallType;
1238
+ parameters?: LayoutBoundaryWallParametersJson;
1239
+ }
1240
+
1241
+ declare interface LayoutBoundaryWallMaterials {
1242
+ top: SpaceGraphMaterialJson;
1243
+ bottom: SpaceGraphMaterialJson;
1244
+ sides: SpaceGraphMaterialJson;
1245
+ }
1246
+
1247
+ declare interface LayoutBoundaryWallParameters {
1248
+ height: number;
1249
+ elevation: number;
1250
+ surfaces: {
1251
+ top: [0];
1252
+ bottom: [1];
1253
+ sides: '...';
1254
+ };
1255
+ materials: LayoutBoundaryWallMaterials;
1256
+ }
1257
+
1258
+ declare type LayoutBoundaryWallParametersJson = Partial<LayoutBoundaryWallParameters>;
1259
+
1260
+ declare type LayoutBoundaryWallType = typeof LayoutBoundaryWallTypeValue;
1261
+
1262
+ declare const LayoutBoundaryWallTypeValue = "element:boundaryWall";
1263
+
1264
+ declare class LayoutCasework extends LayoutTransformElementBase {
1265
+ type: LayoutCaseworkType;
1266
+ parameters: LayoutCaseworkParameters;
1267
+ constructor(id: string);
1268
+ setParameters(parameters: RecursivePartial<LayoutCaseworkParameters>): void;
1269
+ }
1270
+
1271
+ declare interface LayoutCaseworkJson extends LayoutTransformElementBaseJson {
1272
+ type: LayoutCaseworkType;
1273
+ parameters?: LayoutCaseworkParametersJson;
1274
+ }
1275
+
1276
+ declare interface LayoutCaseworkMaterials {
1277
+ cabinet: SpaceGraphMaterialJson;
1278
+ cabinetDoors: SpaceGraphMaterialJson;
1279
+ counter: SpaceGraphMaterialJson;
1280
+ }
1281
+
1282
+ declare type LayoutCaseworkParameters = DimensionParameters & CommonParameters$5;
1283
+
1284
+ declare type LayoutCaseworkParametersJson = DimensionParameters & Partial<CommonParameters$5>;
1285
+
1286
+ declare type LayoutCaseworkType = typeof LayoutCaseworkTypeValue;
1287
+
1288
+ declare const LayoutCaseworkTypeValue = "element:casework";
1289
+
1290
+ declare type LayoutCeilingType = typeof LayoutCeilingTypeValue;
1291
+
1292
+ declare const LayoutCeilingTypeValue = "element:ceiling";
1293
+
1294
+ declare class LayoutColumn extends LayoutTransformElementBase {
1295
+ type: LayoutColumnType;
1296
+ parameters: LayoutColumnParameters;
1297
+ constructor(id: string);
1298
+ setParameters(parameters: RecursivePartial<LayoutColumnParameters>): void;
1299
+ }
1300
+
1301
+ declare interface LayoutColumnJson extends LayoutTransformElementBaseJson {
1302
+ type: LayoutColumnType;
1303
+ parameters?: LayoutColumnParametersJson;
1304
+ }
1305
+
1306
+ declare interface LayoutColumnMaterials {
1307
+ top: SpaceGraphMaterialJson;
1308
+ bottom: SpaceGraphMaterialJson;
1309
+ sides: SpaceGraphMaterialJson;
1310
+ }
1311
+
1312
+ declare interface LayoutColumnParameters {
1313
+ profile: LayoutColumnProfile;
1314
+ height: number;
1315
+ materials: LayoutColumnMaterials;
1316
+ }
1317
+
1318
+ declare type LayoutColumnParametersJson = Partial<LayoutColumnParameters>;
1319
+
1320
+ declare type LayoutColumnProfile = RectangleCurve | CircleCurve | PolygonCurve;
1321
+
1322
+ declare type LayoutColumnType = typeof LayoutColumnTypeValue;
1323
+
1324
+ declare const LayoutColumnTypeValue = "element:column";
1325
+
1326
+ declare class LayoutCurtainWall extends LayoutEdgeElementBase {
1327
+ type: LayoutCurtainWallType;
1328
+ parameters: LayoutCurtainWallParameters;
1329
+ constructor(id: string, edges: SpatialGraphEdge[]);
1330
+ setParameters(parameters: RecursivePartial<LayoutCurtainWallParameters>): void;
1331
+ }
1332
+
1333
+ declare interface LayoutCurtainWallJson extends LayoutEdgeElementBaseJson {
1334
+ type: LayoutCurtainWallType;
1335
+ parameters?: LayoutCurtainWallParametersJson;
1336
+ }
1337
+
1338
+ declare interface LayoutCurtainWallParameters {
1339
+ }
1340
+
1341
+ declare type LayoutCurtainWallParametersJson = Partial<LayoutCurtainWallParameters>;
1342
+
1343
+ declare type LayoutCurtainWallType = typeof LayoutCurtainWallTypeValue;
1344
+
1345
+ declare const LayoutCurtainWallTypeValue = "element:curtainWall";
1346
+
1347
+ declare class LayoutDoor extends LayoutTransformElementBase {
1348
+ type: LayoutDoorType;
1349
+ parameters: LayoutDoorParameters;
1350
+ constructor(id: string);
1351
+ setParameters(parameters: RecursivePartial<LayoutDoorParameters>): void;
1352
+ getBoundingBox(localTransform?: boolean): {
1353
+ min: Vector3;
1354
+ max: Vector3;
1355
+ transform: Transform3d;
1356
+ };
1357
+ }
1358
+
1359
+ declare interface LayoutDoorJson extends LayoutTransformElementBaseJson {
1360
+ type: LayoutDoorType;
1361
+ parameters?: LayoutDoorParametersJson;
1362
+ }
1363
+
1364
+ declare interface LayoutDoorMaterials {
1365
+ frame: SpaceGraphMaterialJson;
1366
+ leaf: SpaceGraphMaterialJson;
1367
+ }
1368
+
1369
+ declare type LayoutDoorParameters = DimensionParameters$2 & CommonParameters$4;
1370
+
1371
+ declare type LayoutDoorParametersJson = DimensionParameters$2 & Partial<CommonParameters$4>;
1372
+
1373
+ declare type LayoutDoorType = typeof LayoutDoorTypeValue;
1374
+
1375
+ declare const LayoutDoorTypeValue = "element:door";
1376
+
1377
+ declare type LayoutEdgeElement = LayoutCurtainWall | LayoutSpaceDivider | LayoutWall;
1378
+
1379
+ declare class LayoutEdgeElementBase extends LayoutElementBase {
1380
+ type: LayoutEdgeElementType;
1381
+ parameters: LayoutEdgeElementParameters;
1382
+ private edges;
1383
+ private vertices;
1384
+ edgesChanged: boolean;
1385
+ constructor(id: string, type: LayoutEdgeElementType, edges: SpatialGraphEdge[]);
1386
+ setEdges(edges: SpatialGraphEdge[]): void;
1387
+ private verifyEdges;
1388
+ getEdges(): SpatialGraphEdge[];
1389
+ getVertices(): SpatialGraphVertex[];
1390
+ getStartVertex(): SpatialGraphVertex;
1391
+ getEndVertex(): SpatialGraphVertex;
1392
+ getAxisPoints(): [Vector2, Vector2];
1393
+ getAxisLength(): number;
1394
+ getEdgeAtLinearPosition(u: number): SpatialGraphEdge | undefined;
1395
+ getEdgesAtLinearSegment(u: number, v: number): SpatialGraphEdge[];
1396
+ /**
1397
+ * @deprecated Use getEdges() instead of edge
1398
+ */
1399
+ get edge(): SpatialGraphEdge;
1400
+ getAdjacentElementsByVertex(): [LayoutEdgeElement[], LayoutEdgeElement[]];
1401
+ getAdjacentSpacesBySide(): [LayoutSpace[], LayoutSpace[]];
1402
+ getSpaces(): LayoutSpace[];
1403
+ getElementsAtLinearPosition(u: number): LayoutElement[];
1404
+ }
1405
+
1406
+ declare interface LayoutEdgeElementBaseJson extends LayoutElementBaseJson {
1407
+ type: LayoutEdgeElementType;
1408
+ edge: string | string[];
1409
+ parameters?: LayoutEdgeElementParametersJson;
1410
+ }
1411
+
1412
+ declare type LayoutEdgeElementJson = LayoutCurtainWallJson | LayoutSpaceDividerJson | LayoutWallJson;
1413
+
1414
+ declare type LayoutEdgeElementParameters = LayoutCurtainWallParameters | LayoutSpaceDividerParameters | LayoutWallParameters;
1415
+
1416
+ declare type LayoutEdgeElementParametersJson = LayoutCurtainWallParametersJson | LayoutSpaceDividerParametersJson | LayoutWallParametersJson;
1417
+
1418
+ declare type LayoutEdgeElementType = LayoutCurtainWallType | LayoutSpaceDividerType | LayoutWallType;
1419
+
1420
+ declare type LayoutElement = LayoutBoundaryElement | LayoutEdgeElement | LayoutOpeningElement | LayoutTransformElement;
1421
+
1422
+ declare class LayoutElementBase extends LayoutNodeBase {
1423
+ type: LayoutElementType;
1424
+ parameters: LayoutElementParameters;
1425
+ parent: LayoutElement | null;
1426
+ elements: LayoutElement[];
1427
+ geometries: GeometryOperationJson[];
1428
+ insertElement(element: LayoutElement): void;
1429
+ getTransform(): Transform3d;
1430
+ getWorldTransform(): Transform3d;
1431
+ getBoundingBox(localTransform?: boolean): TransformBoundingBox3d;
1432
+ removeElement(element: LayoutElement): void;
1433
+ copyForClone(element: LayoutElement): void;
1434
+ setParameters(parameters: RecursivePartial<LayoutElementParameters>): void;
1435
+ getSpaces(): LayoutSpace[];
1436
+ }
1437
+
1438
+ declare interface LayoutElementBaseJson extends LayoutNodeBaseJson {
1439
+ type: LayoutElementType;
1440
+ geometries?: GeometryOperationJson[];
1441
+ parameters?: LayoutElementParametersJson;
1442
+ elements?: LayoutElementJson[];
1443
+ }
1444
+
1445
+ declare type LayoutElementJson = LayoutBoundaryElementJson | LayoutEdgeElementJson | LayoutOpeningElementJson | LayoutTransformElementJson;
1446
+
1447
+ declare type LayoutElementParameters = LayoutBoundaryElementParameters | LayoutEdgeElementParameters | LayoutOpeningElementParameters | LayoutTransformElementParameters;
1448
+
1449
+ declare type LayoutElementParametersJson = LayoutBoundaryElementParametersJson | LayoutEdgeElementParametersJson | LayoutOpeningElementParametersJson | LayoutTransformElementParametersJson;
1450
+
1451
+ declare type LayoutElementType = LayoutBoundaryElementType | LayoutEdgeElementType | LayoutOpeningElementType | LayoutTransformElementType;
1452
+
1453
+ declare class LayoutFloorPlanDxfAnnotation extends LayoutAnnotationBase {
1454
+ type: LayoutFloorPlanDxfType;
1455
+ parameters: LayoutFloorPlanDxfParameters;
1456
+ constructor(id: string);
1457
+ setParameters(parameters: RecursivePartial<LayoutFloorPlanDxfParameters>): void;
1458
+ }
1459
+
1460
+ declare interface LayoutFloorPlanDxfAnnotationJson extends LayoutAnnotationBaseJson {
1461
+ type: LayoutFloorPlanDxfType;
1462
+ parameters?: LayoutFloorPlanDxfParametersJson;
1463
+ }
1464
+
1465
+ declare interface LayoutFloorPlanDxfParameters {
1466
+ uri: string;
1467
+ drawingOrigin: Vector2;
1468
+ hiddenLayers: string[];
1469
+ }
1470
+
1471
+ declare type LayoutFloorPlanDxfParametersJson = Partial<LayoutFloorPlanDxfParameters>;
1472
+
1473
+ declare type LayoutFloorPlanDxfType = typeof LayoutFloorPlanDxfTypeValue;
1474
+
1475
+ declare const LayoutFloorPlanDxfTypeValue = "annotation:floorPlanDxf";
1476
+
1477
+ declare class LayoutFloorPlanImageAnnotation extends LayoutAnnotationBase {
1478
+ type: LayoutFloorPlanImageType;
1479
+ parameters: LayoutFloorPlanImageParameters;
1480
+ constructor(id: string);
1481
+ setParameters(parameters: RecursivePartial<LayoutFloorPlanImageParameters>): void;
1482
+ }
1483
+
1484
+ declare interface LayoutFloorPlanImageAnnotationJson extends LayoutAnnotationBaseJson {
1485
+ type: LayoutFloorPlanImageType;
1486
+ parameters?: LayoutFloorPlanImageParametersJson;
1487
+ }
1488
+
1489
+ declare interface LayoutFloorPlanImageParameters {
1490
+ uri: string;
1491
+ length: number;
1492
+ width: number;
1493
+ }
1494
+
1495
+ declare type LayoutFloorPlanImageParametersJson = Partial<LayoutFloorPlanImageParameters>;
1496
+
1497
+ declare type LayoutFloorPlanImageType = typeof LayoutFloorPlanImageTypeValue;
1498
+
1499
+ declare const LayoutFloorPlanImageTypeValue = "annotation:floorPlanImage";
1500
+
1501
+ declare type LayoutFloorType = typeof LayoutFloorTypeValue;
1502
+
1503
+ declare const LayoutFloorTypeValue = "element:floor";
1504
+
1505
+ declare class LayoutGeneric extends LayoutTransformElementBase {
1506
+ type: LayoutGenericType;
1507
+ parameters: LayoutGenericParameters;
1508
+ constructor(id: string);
1509
+ setParameters(parameters: RecursivePartial<LayoutGenericParameters>): void;
1510
+ }
1511
+
1512
+ declare interface LayoutGenericJson extends LayoutTransformElementBaseJson {
1513
+ type: LayoutGenericType;
1514
+ parameters?: LayoutGenericParametersJson;
1515
+ }
1516
+
1517
+ declare interface LayoutGenericMaterials {
1518
+ top: SpaceGraphMaterialJson;
1519
+ bottom: SpaceGraphMaterialJson;
1520
+ sides: SpaceGraphMaterialJson;
1521
+ }
1522
+
1523
+ declare interface LayoutGenericParameters {
1524
+ profile: LayoutGenericProfile;
1525
+ height: number;
1526
+ materials: LayoutGenericMaterials;
1527
+ }
1528
+
1529
+ declare type LayoutGenericParametersJson = Partial<LayoutGenericParameters>;
1530
+
1531
+ declare type LayoutGenericProfile = 'none' | RectangleCurve | CircleCurve | PolygonCurve;
1532
+
1533
+ declare type LayoutGenericType = typeof LayoutGenericTypeValue;
1534
+
1535
+ declare const LayoutGenericTypeValue = "element:generic";
1536
+
1537
+ declare class LayoutKitchen extends LayoutTransformElementBase {
1538
+ type: LayoutKitchenType;
1539
+ parameters: LayoutKitchenParameters;
1540
+ constructor(id: string);
1541
+ setParameters(parameters: RecursivePartial<LayoutKitchenParameters>, skipElementCreation?: boolean): void;
1542
+ }
1543
+
1544
+ declare interface LayoutKitchenJson extends LayoutTransformElementBaseJson {
1545
+ type: LayoutKitchenType;
1546
+ parameters?: LayoutKitchenParametersJson;
1547
+ }
1548
+
1549
+ declare interface LayoutKitchenMaterials {
1550
+ cabinet: SpaceGraphMaterialJson;
1551
+ cabinetDoors: SpaceGraphMaterialJson;
1552
+ counter: SpaceGraphMaterialJson;
1553
+ }
1554
+
1555
+ declare type LayoutKitchenParameters = DimensionParameters & CommonParameters$3;
1556
+
1557
+ declare type LayoutKitchenParametersJson = DimensionParameters & Partial<CommonParameters$3>;
1558
+
1559
+ declare type LayoutKitchenType = typeof LayoutKitchenTypeValue;
1560
+
1561
+ declare const LayoutKitchenTypeValue = "element:kitchen";
1562
+
1563
+ declare type LayoutNode = SpatialGraphNode | LayoutSpace | LayoutElement | LayoutAnnotation | LayoutView;
1564
+
1565
+ declare class LayoutNodeBase extends SpaceGraphNodeBase {
1566
+ type: LayoutNodeType;
1567
+ layout: SpaceGraphLayout;
1568
+ constructor(id: string, type: LayoutNodeType);
1569
+ }
1570
+
1571
+ declare interface LayoutNodeBaseJson extends SpaceGraphNodeBaseJson {
1572
+ type: LayoutNodeType;
1573
+ }
1574
+
1575
+ declare type LayoutNodeType = SpatialGraphNodeType | LayoutSpaceType | LayoutElementType | LayoutAnnotationType | LayoutViewType;
1576
+
1577
+ declare class LayoutOpening extends LayoutOpeningElementBase {
1578
+ type: LayoutOpeningType;
1579
+ parameters: LayoutOpeningParameters;
1580
+ constructor(id: string);
1581
+ getTransform(): Transform3d;
1582
+ get position(): Vector3;
1583
+ get rotation(): number;
1584
+ setParameters(parameters: RecursivePartial<LayoutOpeningParameters>): void;
1585
+ getBoundingBox(localTransform?: boolean): {
1586
+ min: Vector3;
1587
+ max: Vector3;
1588
+ transform: Transform3d;
1589
+ };
1590
+ getSpaces(): LayoutSpace[];
1591
+ }
1592
+
1593
+ declare type LayoutOpeningElement = LayoutOpening;
1594
+
1595
+ declare class LayoutOpeningElementBase extends LayoutElementBase {
1596
+ type: LayoutOpeningElementType;
1597
+ parameters: LayoutOpeningElementParameters;
1598
+ constructor(id: string, type: LayoutOpeningElementType);
1599
+ }
1600
+
1601
+ declare interface LayoutOpeningElementBaseJson extends LayoutElementBaseJson {
1602
+ type: LayoutOpeningElementType;
1603
+ parameters?: LayoutOpeningElementParametersJson;
1604
+ }
1605
+
1606
+ declare type LayoutOpeningElementJson = LayoutOpeningJson;
1607
+
1608
+ declare type LayoutOpeningElementParameters = LayoutOpeningParameters;
1609
+
1610
+ declare type LayoutOpeningElementParametersJson = LayoutOpeningParametersJson;
1611
+
1612
+ declare type LayoutOpeningElementType = LayoutOpeningType;
1613
+
1614
+ declare interface LayoutOpeningJson extends LayoutOpeningElementBaseJson {
1615
+ type: LayoutOpeningType;
1616
+ parameters?: LayoutOpeningParametersJson;
1617
+ }
1618
+
1619
+ declare interface LayoutOpeningMaterials {
1620
+ top: SpaceGraphMaterialJson;
1621
+ bottom: SpaceGraphMaterialJson;
1622
+ sides: SpaceGraphMaterialJson;
1623
+ }
1624
+
1625
+ declare interface LayoutOpeningParameters {
1626
+ position: Vector2;
1627
+ dimensions: Vector2;
1628
+ materials: LayoutOpeningMaterials;
1629
+ }
1630
+
1631
+ declare type LayoutOpeningParametersJson = Partial<LayoutOpeningParameters>;
1632
+
1633
+ declare type LayoutOpeningType = typeof LayoutOpeningTypeValue;
1634
+
1635
+ declare const LayoutOpeningTypeValue = "element:opening";
1636
+
1637
+ declare class LayoutRailing extends LayoutTransformElementBase {
1638
+ type: LayoutRailingType;
1639
+ parameters: LayoutRailingParameters;
1640
+ constructor(id: string);
1641
+ setParameters(parameters: RecursivePartial<LayoutRailingParameters>): void;
1642
+ }
1643
+
1644
+ declare interface LayoutRailingJson extends LayoutTransformElementBaseJson {
1645
+ type: LayoutRailingType;
1646
+ parameters?: LayoutRailingParametersJson;
1647
+ }
1648
+
1649
+ declare interface LayoutRailingMaterials {
1650
+ surface: SpaceGraphMaterialJson;
1651
+ }
1652
+
1653
+ declare type LayoutRailingParameters = DimensionParameters & CommonParameters$2;
1654
+
1655
+ declare type LayoutRailingParametersJson = DimensionParameters & Partial<CommonParameters$2>;
1656
+
1657
+ declare type LayoutRailingType = typeof LayoutRailingTypeValue;
1658
+
1659
+ declare const LayoutRailingTypeValue = "element:railing";
1660
+
1661
+ declare class LayoutRamp extends LayoutTransformElementBase {
1662
+ type: LayoutRampType;
1663
+ parameters: LayoutRampParameters;
1664
+ constructor(id: string);
1665
+ }
1666
+
1667
+ declare interface LayoutRampJson extends LayoutTransformElementBaseJson {
1668
+ type: LayoutRampType;
1669
+ parameters?: LayoutRampParametersJson;
1670
+ }
1671
+
1672
+ declare interface LayoutRampMaterials {
1673
+ top: SpaceGraphMaterialJson;
1674
+ bottom: SpaceGraphMaterialJson;
1675
+ sides: SpaceGraphMaterialJson;
1676
+ }
1677
+
1678
+ declare type LayoutRampParameters = DimensionParameters & CommonParameters$1;
1679
+
1680
+ declare type LayoutRampParametersJson = DimensionParameters & Partial<CommonParameters$1>;
1681
+
1682
+ declare type LayoutRampType = typeof LayoutRampTypeValue;
1683
+
1684
+ declare const LayoutRampTypeValue = "element:ramp";
1685
+
1686
+ declare class LayoutRoof extends LayoutTransformElementBase {
1687
+ type: LayoutRoofType;
1688
+ parameters: LayoutRoofParameters;
1689
+ constructor(id: string);
1690
+ }
1691
+
1692
+ declare interface LayoutRoofJson extends LayoutTransformElementBaseJson {
1693
+ type: LayoutRoofType;
1694
+ parameters?: LayoutRoofParametersJson;
1695
+ }
1696
+
1697
+ declare interface LayoutRoofMaterials {
1698
+ }
1699
+
1700
+ declare interface LayoutRoofParameters {
1701
+ materials: LayoutRoofMaterials;
1702
+ }
1703
+
1704
+ declare type LayoutRoofParametersJson = Partial<LayoutRoofParameters>;
1705
+
1706
+ declare type LayoutRoofType = typeof LayoutRoofTypeValue;
1707
+
1708
+ declare const LayoutRoofTypeValue = "element:roof";
1709
+
1710
+ declare class LayoutSlab extends LayoutTransformElementBase {
1711
+ type: LayoutSlabType;
1712
+ parameters: LayoutSlabParameters;
1713
+ constructor(id: string);
1714
+ setParameters(parameters: RecursivePartial<LayoutSlabParameters>): void;
1715
+ }
1716
+
1717
+ declare interface LayoutSlabJson extends LayoutTransformElementBaseJson {
1718
+ type: LayoutSlabType;
1719
+ parameters?: LayoutSlabParametersJson;
1720
+ }
1721
+
1722
+ declare interface LayoutSlabMaterials {
1723
+ top: SpaceGraphMaterialJson;
1724
+ bottom: SpaceGraphMaterialJson;
1725
+ sides: SpaceGraphMaterialJson;
1726
+ }
1727
+
1728
+ declare interface LayoutSlabParameters {
1729
+ profile: LayoutSlabProfile;
1730
+ height: number;
1731
+ materials: LayoutSlabMaterials;
1732
+ }
1733
+
1734
+ declare type LayoutSlabParametersJson = Partial<LayoutSlabParameters>;
1735
+
1736
+ declare type LayoutSlabProfile = RectangleCurve | CircleCurve | PolygonCurve;
1737
+
1738
+ declare type LayoutSlabType = typeof LayoutSlabTypeValue;
1739
+
1740
+ declare const LayoutSlabTypeValue = "element:slab";
1741
+
1742
+ declare class LayoutSpace extends LayoutNodeBase {
1743
+ type: LayoutSpaceType;
1744
+ attributes: LayoutSpaceAttributes;
1745
+ boundaries: LayoutBoundary[];
1746
+ geometry: LayoutSpaceGeometry;
1747
+ slabs: LayoutBoundarySlab[];
1748
+ constructor(id: string, boundaries: LayoutBoundary[]);
1749
+ copyForClone(space: LayoutSpace): void;
1750
+ setId(id: string): void;
1751
+ setAttributes(attributes: LayoutSpaceAttributesJson): void;
1752
+ getArea(): number;
1753
+ getAdjacentSpaces(graph: Graph, { connectivity }?: {
1754
+ connectivity?: number;
1755
+ }): LayoutSpace[];
1756
+ getElements(types?: string | string[]): LayoutElement[];
1757
+ getBoundaryFromVertex(vertex: SpatialGraphVertex): {
1758
+ boundary: LayoutBoundary | undefined;
1759
+ itemIndex: number;
1760
+ };
1761
+ getBoundaryFromEdge(edge: SpatialGraphEdge): {
1762
+ boundary: LayoutBoundary | undefined;
1763
+ edgeIndex: number;
1764
+ };
1765
+ getBoundingBox(): TransformBoundingBox3d;
1766
+ attachSlab(slab: LayoutBoundarySlab): void;
1767
+ detachSlab(slab: LayoutBoundarySlab): void;
1768
+ }
1769
+
1770
+ declare interface LayoutSpaceAttributes {
1771
+ usage: string;
1772
+ program: string;
1773
+ }
1774
+
1775
+ declare interface LayoutSpaceAttributesJson {
1776
+ usage?: string;
1777
+ program?: string;
1778
+ }
1779
+
1780
+ declare class LayoutSpaceDivider extends LayoutEdgeElementBase {
1781
+ type: LayoutSpaceDividerType;
1782
+ parameters: LayoutSpaceDividerParameters;
1783
+ constructor(id: string, edges: SpatialGraphEdge[]);
1784
+ setParameters(parameters: RecursivePartial<LayoutSpaceDividerParameters>): void;
1785
+ getBoundingBox(): {
1786
+ min: Vector3;
1787
+ max: Vector3;
1788
+ transform: Transform3d;
1789
+ };
1790
+ }
1791
+
1792
+ declare interface LayoutSpaceDividerJson extends LayoutEdgeElementBaseJson {
1793
+ type: LayoutSpaceDividerType;
1794
+ parameters?: LayoutSpaceDividerParametersJson;
1795
+ }
1796
+
1797
+ declare interface LayoutSpaceDividerParameters {
1798
+ }
1799
+
1800
+ declare type LayoutSpaceDividerParametersJson = Partial<LayoutSpaceDividerParameters>;
1801
+
1802
+ declare type LayoutSpaceDividerType = typeof LayoutSpaceDividerTypeValue;
1803
+
1804
+ declare const LayoutSpaceDividerTypeValue = "element:spaceDivider";
1805
+
1806
+ declare interface LayoutSpaceGeometry {
1807
+ polygons: Vector2[][];
1808
+ }
1809
+
1810
+ declare interface LayoutSpaceJson extends LayoutNodeBaseJson {
1811
+ type: LayoutSpaceType;
1812
+ boundaries: LayoutBoundaryJson[];
1813
+ attributes?: LayoutSpaceAttributesJson;
1814
+ }
1815
+
1816
+ declare type LayoutSpaceType = typeof LayoutSpaceTypeValue;
1817
+
1818
+ declare const LayoutSpaceTypeValue = "layout:space";
1819
+
1820
+ declare class LayoutSpatialGraph {
1821
+ layout: SpaceGraphLayout;
1822
+ vertices: SpatialGraphVertex[];
1823
+ verticesById: Record<string, SpatialGraphVertex>;
1824
+ edges: SpatialGraphEdge[];
1825
+ edgesById: Record<string, SpatialGraphEdge>;
1826
+ graphChanged: boolean;
1827
+ debugVertexCount: number;
1828
+ debugEdgeCount: number;
1829
+ constructor(layout: SpaceGraphLayout);
1830
+ emit<EventType extends keyof SpaceGraphEventMap>(event: EventType, ...args: SpaceGraphEventMap[EventType]): void;
1831
+ copyForClone(spatialGraph: LayoutSpatialGraph): void;
1832
+ deleteVertexAtIndex(vertexIndex: number, removeNodes: boolean): SpatialGraphVertex | undefined;
1833
+ deleteEdgeAtIndex(edgeIndex: number, removeNodes: boolean): SpatialGraphEdge | undefined;
1834
+ insertVertex(vertex: SpatialGraphVertex): void;
1835
+ removeVertex(vertex: SpatialGraphVertex, removeNodes?: boolean): SpatialGraphVertex | undefined;
1836
+ removeVertexAtIndex(vertexIndex: number, removeNodes?: boolean): SpatialGraphVertex | undefined;
1837
+ removeVertexById(id: string, removeNodes?: boolean): SpatialGraphVertex | undefined;
1838
+ insertEdge(edge: SpatialGraphEdge, splitSpace?: boolean): void;
1839
+ removeEdge(edge: SpatialGraphEdge, removeNodes?: boolean): SpatialGraphEdge | undefined;
1840
+ removeEdgeAtIndex(edgeIndex: number, removeNodes?: boolean): SpatialGraphEdge | undefined;
1841
+ removeEdgeById(id: string, removeNodes?: boolean): SpatialGraphEdge | undefined;
1842
+ getEdgeFromVertices(vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex): SpatialGraphEdge | undefined;
1843
+ getVertexId(prefix?: string): string;
1844
+ getEdgeId(prefix?: string): string;
1845
+ createVertex(id: string, x: number, y: number): SpatialGraphVertex;
1846
+ createEdge(id: string, vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex, splitSpace?: boolean): SpatialGraphEdge;
1847
+ createEdgeByVertexIds(id: string, vertexId1: string, vertexId2: string, splitSpace?: boolean): SpatialGraphEdge;
1848
+ }
1849
+
1850
+ declare interface LayoutSpatialGraphJson {
1851
+ vertices: SpatialGraphVertexJson[];
1852
+ edges: SpatialGraphEdgeJson[];
1853
+ }
1854
+
1855
+ declare class LayoutStairFlight extends LayoutTransformElementBase {
1856
+ type: LayoutStairFlightType;
1857
+ parameters: LayoutStairFlightParameters;
1858
+ constructor(id: string);
1859
+ setParameters(parameters: RecursivePartial<LayoutStairFlightParameters>): void;
1860
+ }
1861
+
1862
+ declare interface LayoutStairFlightJson extends LayoutTransformElementBaseJson {
1863
+ type: LayoutStairFlightType;
1864
+ parameters?: LayoutStairFlightParametersJson;
1865
+ }
1866
+
1867
+ declare interface LayoutStairFlightMaterials {
1868
+ steps: SpaceGraphMaterialJson;
1869
+ tread: SpaceGraphMaterialJson;
1870
+ }
1871
+
1872
+ declare type LayoutStairFlightParameters = StraightStairFlightParameters | SpiralStairFlightParameters;
1873
+
1874
+ declare type LayoutStairFlightParametersJson = StraightStairFlightParametersJson | SpiralStairFlightParametersJson;
1875
+
1876
+ declare type LayoutStairFlightType = typeof LayoutStairFlightTypeValue;
1877
+
1878
+ declare const LayoutStairFlightTypeValue = "element:stairFlight";
1879
+
1880
+ declare class LayoutStairs extends LayoutTransformElementBase {
1881
+ type: LayoutStairsType;
1882
+ parameters: LayoutStairsParameters;
1883
+ constructor(id: string);
1884
+ setParameters(parameters: RecursivePartial<LayoutStairsParameters>, skipElementCreation?: boolean): void;
1885
+ getBoundingBox(localTransform?: boolean): {
1886
+ min: Vector3;
1887
+ max: Vector3;
1888
+ transform: Transform3d;
1889
+ };
1890
+ }
1891
+
1892
+ declare interface LayoutStairsJson extends LayoutTransformElementBaseJson {
1893
+ type: LayoutStairsType;
1894
+ parameters?: LayoutStairsParametersJson;
1895
+ }
1896
+
1897
+ declare interface LayoutStairsMaterials {
1898
+ steps: SpaceGraphMaterialJson;
1899
+ tread: SpaceGraphMaterialJson;
1900
+ railing: SpaceGraphMaterialJson;
1901
+ }
1902
+
1903
+ declare type LayoutStairsParameters = StraightStairsParameters | OrthogonalStairsParameters | SpiralStairsParameters | CustomStairsParameters;
1904
+
1905
+ declare type LayoutStairsParametersJson = StraightStairsParametersJson | OrthogonalStairsParametersJson | SpiralStairsParametersJson | CustomStairsParametersJson;
1906
+
1907
+ declare type LayoutStairsType = typeof LayoutStairsTypeValue;
1908
+
1909
+ declare const LayoutStairsTypeValue = "element:stairs";
1910
+
1911
+ declare type LayoutTransformElement = LayoutAsset | LayoutBeam | LayoutCasework | LayoutColumn | LayoutDoor | LayoutGeneric | LayoutKitchen | LayoutRailing | LayoutRamp | LayoutRoof | LayoutSlab | LayoutStairs | LayoutStairFlight | LayoutWindow;
1912
+
1913
+ declare class LayoutTransformElementBase extends LayoutElementBase {
1914
+ type: LayoutTransformElementType;
1915
+ parameters: LayoutTransformElementParameters;
1916
+ position: Vector3;
1917
+ rotation: number;
1918
+ rotationAxis: Vector3;
1919
+ constructor(id: string, type: LayoutTransformElementType);
1920
+ copyForClone(transformElement: LayoutTransformElement): void;
1921
+ setPosition(position: Vector3): void;
1922
+ setRotation(rotation: number, rotationAxis?: Vector3): void;
1923
+ setTransform(position: Vector3, rotation: number, rotationAxis?: Vector3): void;
1924
+ getSpaces(): LayoutSpace[];
1925
+ getTransform(): Transform3d;
1926
+ getWorldTransform(): Transform3d;
1927
+ getBoundingBox(localTransform?: boolean): {
1928
+ min: Vector3;
1929
+ max: Vector3;
1930
+ transform: Transform3d;
1931
+ };
1932
+ setParameters(parameters: RecursivePartial<LayoutTransformElementParameters>): void;
1933
+ }
1934
+
1935
+ declare interface LayoutTransformElementBaseJson extends LayoutElementBaseJson {
1936
+ type: LayoutTransformElementType;
1937
+ position: Vector3;
1938
+ rotation?: number;
1939
+ rotationAxis?: Vector3;
1940
+ parameters?: LayoutTransformElementParametersJson;
1941
+ }
1942
+
1943
+ declare type LayoutTransformElementJson = LayoutAssetJson | LayoutBeamJson | LayoutCaseworkJson | LayoutColumnJson | LayoutDoorJson | LayoutGenericJson | LayoutKitchenJson | LayoutRailingJson | LayoutRampJson | LayoutRoofJson | LayoutSlabJson | LayoutStairFlightJson | LayoutStairsJson | LayoutWindowJson;
1944
+
1945
+ declare type LayoutTransformElementParameters = LayoutAssetParameters | LayoutBeamParameters | LayoutCaseworkParameters | LayoutColumnParameters | LayoutDoorParameters | LayoutGenericParameters | LayoutKitchenParameters | LayoutRailingParameters | LayoutRampParameters | LayoutRoofParameters | LayoutSlabParameters | LayoutStairsParameters | LayoutStairFlightParameters | LayoutWindowParameters;
1946
+
1947
+ declare type LayoutTransformElementParametersJson = LayoutBeamParametersJson | LayoutCaseworkParametersJson | LayoutColumnParametersJson | LayoutDoorParametersJson | LayoutGenericParametersJson | LayoutKitchenParametersJson | LayoutRailingParametersJson | LayoutRampParametersJson | LayoutRoofParametersJson | LayoutSlabParametersJson | LayoutStairFlightParametersJson | LayoutStairsParametersJson | LayoutWindowParametersJson;
1948
+
1949
+ declare type LayoutTransformElementType = LayoutAssetType | LayoutBeamType | LayoutCaseworkType | LayoutColumnType | LayoutDoorType | LayoutGenericType | LayoutKitchenType | LayoutRailingType | LayoutRampType | LayoutRoofType | LayoutSlabType | LayoutStairsType | LayoutStairFlightType | LayoutWindowType;
1950
+
1951
+ declare type LayoutType = typeof LayoutTypeValue;
1952
+
1953
+ declare const LayoutTypeValue = "spatialStructure:layout";
1954
+
1955
+ declare type LayoutView = Layout2dView | Layout3dView;
1956
+
1957
+ declare class LayoutViewBase extends LayoutNodeBase {
1958
+ type: LayoutViewType;
1959
+ parameters: LayoutViewParameters;
1960
+ copyForClone(view: LayoutView): void;
1961
+ setParameters(parameters: RecursivePartial<LayoutViewParameters>): void;
1962
+ }
1963
+
1964
+ declare interface LayoutViewBaseJson extends LayoutNodeBaseJson {
1965
+ type: LayoutViewType;
1966
+ parameters?: LayoutViewParametersJson;
1967
+ }
1968
+
1969
+ declare type LayoutViewJson = Layout2dViewJson | Layout3dViewJson;
1970
+
1971
+ declare type LayoutViewParameters = Layout2dViewParameters | Layout3dViewParameters;
1972
+
1973
+ declare type LayoutViewParametersJson = Layout2dViewParametersJson | Layout3dViewParametersJson;
1974
+
1975
+ declare type LayoutViewType = Layout2dViewType | Layout3dViewType;
1976
+
1977
+ declare class LayoutWall extends LayoutEdgeElementBase {
1978
+ type: LayoutWallType;
1979
+ parameters: LayoutWallParameters;
1980
+ geometryProfile: LayoutWallGeometryProfile;
1981
+ constructor(id: string, edges: SpatialGraphEdge[]);
1982
+ copyForClone(wall: LayoutWall): void;
1983
+ setParameters(parameters: RecursivePartial<LayoutWallParameters>): void;
1984
+ getBoundingBox(): {
1985
+ min: Vector3;
1986
+ max: Vector3;
1987
+ transform: Transform3d;
1988
+ };
1989
+ }
1990
+
1991
+ declare interface LayoutWallGeometryProfile {
1992
+ valid: boolean;
1993
+ skipped: boolean;
1994
+ selfIntersecting: boolean;
1995
+ sidePoints1: Vector2[];
1996
+ sidePoints2: Vector2[];
1997
+ joinPoints1: Vector2[];
1998
+ joinPoints2: Vector2[];
1999
+ points: Vector2[];
2000
+ }
2001
+
2002
+ declare interface LayoutWallJson extends LayoutEdgeElementBaseJson {
2003
+ type: LayoutWallType;
2004
+ parameters?: LayoutWallParametersJson;
2005
+ }
2006
+
2007
+ declare interface LayoutWallMaterials {
2008
+ top: SpaceGraphMaterialJson;
2009
+ bottom: SpaceGraphMaterialJson;
2010
+ side1: SpaceGraphMaterialJson;
2011
+ side2: SpaceGraphMaterialJson;
2012
+ join1: SpaceGraphMaterialJson;
2013
+ join2: SpaceGraphMaterialJson;
2014
+ }
2015
+
2016
+ declare interface LayoutWallParameters {
2017
+ width: number;
2018
+ height: number;
2019
+ offset: number;
2020
+ elevation: number;
2021
+ materials: LayoutWallMaterials;
2022
+ }
2023
+
2024
+ declare type LayoutWallParametersJson = Partial<LayoutWallParameters>;
2025
+
2026
+ declare type LayoutWallType = typeof LayoutWallTypeValue;
2027
+
2028
+ declare const LayoutWallTypeValue = "element:wall";
2029
+
2030
+ declare class LayoutWindow extends LayoutTransformElementBase {
2031
+ type: LayoutWindowType;
2032
+ parameters: LayoutWindowParameters;
2033
+ constructor(id: string);
2034
+ setParameters(parameters: RecursivePartial<LayoutWindowParameters>): void;
2035
+ }
2036
+
2037
+ declare interface LayoutWindowJson extends LayoutTransformElementBaseJson {
2038
+ type: LayoutWindowType;
2039
+ parameters?: LayoutWindowParametersJson;
2040
+ }
2041
+
2042
+ declare interface LayoutWindowMaterials {
2043
+ frame: SpaceGraphMaterialJson;
2044
+ panel: SpaceGraphMaterialJson;
2045
+ }
2046
+
2047
+ declare type LayoutWindowParameters = DimensionParameters$1 & CommonParameters;
2048
+
2049
+ declare type LayoutWindowParametersJson = DimensionParameters$1 & Partial<CommonParameters>;
2050
+
2051
+ declare type LayoutWindowType = typeof LayoutWindowTypeValue;
2052
+
2053
+ declare const LayoutWindowTypeValue = "element:window";
2054
+
2055
+ declare interface LineCurve extends CurveBase {
2056
+ type: LineCurveType;
2057
+ start: Vector2;
2058
+ end: Vector2;
2059
+ }
2060
+
2061
+ declare interface LineCurve_2 extends BaseShape {
2062
+ type: 'curve:line';
2063
+ start: Vector2_2;
2064
+ end: Vector2_2;
2065
+ }
2066
+
2067
+ declare type LineCurveType = typeof LineCurveTypeValue;
2068
+
2069
+ declare const LineCurveTypeValue = "curve:line";
2070
+
2071
+ declare type LoadingEvent = 'loading-done' | 'loading-status' | 'resource-loaded' | 'product-load-texture' | 'spaces-loaded' | 'assets-loaded';
2072
+
2073
+ declare interface MarkerArgs {
2074
+ /** coordinates of the marker in meters */
2075
+ position?: Vector2_2;
2076
+ /** color of the marker, hex code */
2077
+ color?: string;
2078
+ /** size in pixels */
2079
+ size?: number;
2080
+ floorPlan?: FloorPlanEngine;
2081
+ }
2082
+
2083
+ declare class MarkerPin {
2084
+ position: Vector2_2;
2085
+ color: string;
2086
+ size: number;
2087
+ id: string;
2088
+ layer: PlanLayer;
2089
+ graphic: PlanGraphic;
2090
+ private floorPlan;
2091
+ constructor({ position, color, size, floorPlan }: MarkerArgs);
2092
+ draw(): void;
2093
+ remove(): void;
2094
+ on(eventType: string, callback: any, context?: any): void;
2095
+ off(eventType?: string, callback?: any): void;
2096
+ set(updateArgs: MarkerUpdateArgs): void;
2097
+ }
2098
+
2099
+ declare interface MarkerUpdateArgs {
2100
+ events?: {
2101
+ [event: string]: {
2102
+ callback: any;
2103
+ context: any;
2104
+ };
2105
+ };
2106
+ }
2107
+
2108
+ declare class MeshGeometry extends GeometryBase {
2109
+ type: MeshGeometryType;
2110
+ vertices: number[];
2111
+ indices: number[];
2112
+ normals: ParametricNormals | number[];
2113
+ uvs: ParametricUvs | number[];
2114
+ constructor(id: string);
2115
+ }
2116
+
2117
+ declare interface MeshGeometryJson extends GeometryBaseJson {
2118
+ type: MeshGeometryType;
2119
+ vertices: number[];
2120
+ indices: number[];
2121
+ normals?: ParametricNormals | number[];
2122
+ uvs?: ParametricUvs | number[];
2123
+ }
2124
+
2125
+ declare type MeshGeometryType = typeof MeshGeometryTypeValue;
2126
+
2127
+ declare const MeshGeometryTypeValue = "geometry:mesh";
2128
+
2129
+ declare type NodesByType<NodeMap extends NodeTypeMap = {}> = {
2130
+ -readonly [K in keyof NodeMap]: InstanceType<NodeMap[K]>[];
2131
+ };
2132
+
2133
+ declare type NodeTypeMap = Record<string, any>;
2134
+
2135
+ declare interface NumberList extends SpaceGraphTypedValueJson {
2136
+ type: 'number:list';
2137
+ list: number[];
2138
+ }
2139
+
2140
+ declare interface NumberRange extends SpaceGraphTypedValueJson {
2141
+ type: 'number:range';
2142
+ range: {
2143
+ start: number;
2144
+ step: number;
2145
+ count: number;
2146
+ };
2147
+ }
2148
+
2149
+ declare type OpenCurve = LineCurve | PolylineCurve | ArcCurve;
2150
+
2151
+ declare type OpenCurves = LineCurve_2 | ArcCurve_2 | PolylineCurve_2 | BezierCurve;
2152
+
2153
+ declare type OpenCurveType = LineCurveType | PolylineCurveType | ArcCurveType;
2154
+
2155
+ declare interface OrthogonalStairsParameters {
2156
+ stairsType: OrthogonalStairsType;
2157
+ length: number;
2158
+ width: number;
2159
+ height: number;
2160
+ stepWidth: number;
2161
+ circulation: 'left' | 'right';
2162
+ railing: 'none' | 'left' | 'right' | 'both';
2163
+ materials: LayoutStairsMaterials;
2164
+ }
2165
+
2166
+ declare type OrthogonalStairsParametersJson = Partial<OrthogonalStairsParameters>;
2167
+
2168
+ declare type OrthogonalStairsType = 'halfLanding' | 'quarterLanding' | 'twoQuarterLanding' | 'winder' | 'doubleWinder';
2169
+
2170
+ declare type ParametricGeometry = PlaneGeometry | CuboidGeometry | SphereGeometry | ExtrusionGeometry;
2171
+
2172
+ declare class ParametricGeometryBase extends GeometryBase {
2173
+ normals: ParametricNormals | 'generator';
2174
+ uvs: ParametricUvs | 'generator';
2175
+ geometries: GeometryOperation[];
2176
+ constructor(id: string, type: ParametricGeometryType);
2177
+ }
2178
+
2179
+ declare interface ParametricGeometryBaseJson extends GeometryBaseJson {
2180
+ normals?: ParametricNormals | 'generator';
2181
+ uvs?: ParametricUvs | 'generator';
2182
+ geometries?: GeometryOperationJson[];
2183
+ }
2184
+
2185
+ declare type ParametricGeometryJson = PlaneGeometryJson | CuboidGeometryJson | SphereGeometryJson | ExtrusionGeometryJson;
2186
+
2187
+ declare type ParametricGeometryType = PlaneGeometryType | CuboidGeometryType | SphereGeometryType | ExtrusionGeometryType;
2188
+
2189
+ declare type ParametricNormals = 'none' | 'flat' | 'smooth';
2190
+
2191
+ declare type ParametricUvs = 'none' | 'automatic' | 'spherical';
2192
+
2193
+ declare interface Plane {
2194
+ position: Vector3;
2195
+ normal: Vector3;
2196
+ }
2197
+
2198
+ declare class PlaneGeometry extends ParametricGeometryBase {
2199
+ type: PlaneGeometryType;
2200
+ normal: Vector3;
2201
+ size: number;
2202
+ doubleSided: boolean;
2203
+ constructor(id: string);
2204
+ }
2205
+
2206
+ declare interface PlaneGeometryJson extends ParametricGeometryBaseJson {
2207
+ type: PlaneGeometryType;
2208
+ normal: Vector3;
2209
+ size: number;
2210
+ doubleSided: boolean;
2211
+ }
2212
+
2213
+ declare type PlaneGeometryType = typeof PlaneGeometryTypeValue;
2214
+
2215
+ declare const PlaneGeometryTypeValue = "geometry:plane";
2216
+
2217
+ declare class PlanGraphic {
2218
+ shapes: Shape[];
2219
+ /* Excluded from this release type: gfx */
2220
+ scaleOnZoom: boolean;
2221
+ /* Excluded from this release type: container */
2222
+ gfxScale: number;
2223
+ private floorPlan;
2224
+ constructor({ shapes, position, alpha, scale, clearLayer, interactive, id, isHandler, scaleOnZoom, updatePositionOnDrag, baseLayer, container, floorPlan }: PlanGraphicArgs);
2225
+ set({ position, style, shapes }?: GraphicUpdate): void;
2226
+ private doUpdatePositionOnDrag;
2227
+ on(event: string, callback: any, context?: any): this;
2228
+ off(event: string, callback?: any): this;
2229
+ destroy(): void;
2230
+ private addDragEvent;
2231
+ private removeDragEvent;
2232
+ }
2233
+
2234
+ declare interface PlanGraphicArgs extends GraphicArgs {
2235
+ floorPlan: FloorPlanEngine;
2236
+ /* Excluded from this release type: baseLayer */
2237
+ /* Excluded from this release type: container */
2238
+ [key: string]: any;
2239
+ }
2240
+
2241
+ declare class PlanLayer {
2242
+ /* Excluded from this release type: container */
2243
+ graphics: Set<PlanGraphic>;
2244
+ id: string;
2245
+ private baseLayer;
2246
+ private floorPlan;
2247
+ constructor(floorPlan: FloorPlanEngine, baseLayer?: BaseLayers, id?: string);
2248
+ addGraphic(args: GraphicArgs): PlanGraphic;
2249
+ deleteGraphic(graphic: PlanGraphic): void;
2250
+ /**
2251
+ * clear all shapes from the layer
2252
+ */
2253
+ clear(): void;
2254
+ /**
2255
+ * destroy layer and all shapes
2256
+ */
2257
+ destroy(): void;
2258
+ }
2259
+
2260
+ declare type Polygon = Vector2_2[];
2261
+
2262
+ declare interface PolygonCurve extends CurveBase {
2263
+ type: PolygonCurveType;
2264
+ points: Vector2[];
2265
+ }
2266
+
2267
+ declare interface PolygonCurve_2 extends BaseShape {
2268
+ type: 'curve:polygon';
2269
+ points: Polygon;
2270
+ }
2271
+
2272
+ declare type PolygonCurveType = typeof PolygonCurveTypeValue;
2273
+
2274
+ declare const PolygonCurveTypeValue = "curve:polygon";
2275
+
2276
+ /** outer ring counter clockwise, inner rings ( holes ) clockwise */
2277
+ declare type PolygonWithHoles = Polygon[];
2278
+
2279
+ declare interface PolygonWithHolesCurve extends BaseShape {
2280
+ type: 'curve:polygonWithHoles';
2281
+ polygons: PolygonWithHoles;
2282
+ }
2283
+
2284
+ declare interface PolylineCurve extends CurveBase {
2285
+ type: PolylineCurveType;
2286
+ points: Vector2[];
2287
+ }
2288
+
2289
+ declare interface PolylineCurve_2 extends BaseShape {
2290
+ type: 'curve:polyline';
2291
+ points: Polygon;
2292
+ }
2293
+
2294
+ declare type PolylineCurveType = typeof PolylineCurveTypeValue;
2295
+
2296
+ declare const PolylineCurveTypeValue = "curve:polyline";
2297
+
2298
+ declare type PositionEntry = Vector3 | Vector3List | Vector3Range;
2299
+
2300
+ declare type ProductAttributes = SpaceGraphProduct['attributes'];
2301
+
2302
+ declare interface RectangleCurve extends CurveBase {
2303
+ type: RectangleCurveType;
2304
+ dimensions: Vector2;
2305
+ }
2306
+
2307
+ declare interface RectangleCurve_2 extends BaseShape {
2308
+ type: 'curve:rectangle';
2309
+ position: Vector2_2;
2310
+ dimensions: [number, number];
2311
+ }
2312
+
2313
+ declare type RectangleCurveType = typeof RectangleCurveTypeValue;
2314
+
2315
+ declare const RectangleCurveTypeValue = "curve:rectangle";
2316
+
2317
+ declare type RecursivePartial<T> = T extends Array<any> ? {
2318
+ [K in keyof T]: RecursivePartial<T[K]>;
2319
+ } : T extends object ? {
2320
+ [P in keyof T]?: RecursivePartial<T[P]>;
2321
+ } : T;
2322
+
2323
+ declare type ResourceFormats = 'productJson' | 'productContour' | 'texture';
2324
+
2325
+ /**
2326
+ * This interface was referenced by `AuthJson`'s JSON-Schema
2327
+ * via the `definition` "resourceScope".
2328
+ */
2329
+ declare type ResourceScope =
2330
+ | "customFields"
2331
+ | "customAttributes"
2332
+ | "customAttributeValues"
2333
+ | "organization"
2334
+ | "dxf"
2335
+ | "floor"
2336
+ | "job"
2337
+ | "order"
2338
+ | "product"
2339
+ | "user"
2340
+ | "team"
2341
+ | "superadmin"
2342
+ | "token"
2343
+ | "subscription"
2344
+ | "graphql";
2345
+
2346
+ declare type Rgb = [number, number, number];
2347
+
2348
+ declare type RgbA = [number, number, number, number];
2349
+
2350
+ declare type RotationEntry = number | NumberList | NumberRange;
2351
+
2352
+ /**
2353
+ * This interface was referenced by `AuthJson`'s JSON-Schema
2354
+ * via the `definition` "scopeDefinition".
2355
+ */
2356
+ declare interface ScopeDefinition {
2357
+ resource: ResourceScope;
2358
+ action?: ActionScope;
2359
+ resourceId?: string;
2360
+ }
2361
+
2362
+ /**
2363
+ * This interface was referenced by `AuthJson`'s JSON-Schema
2364
+ * via the `definition` "scopeDefinitionArray".
2365
+ */
2366
+ declare type ScopeDefinitionArray = ScopeDefinition[];
2367
+
2368
+ declare type ScreenPosition = {
2369
+ x: number;
2370
+ y: number;
2371
+ };
2372
+
2373
+ export declare const setApiUrls: ({ apiStorageUrl: newApiStorageUrl, spaceApiUrl, apiProductDataPath: newApiProductDataPath }?: ApiUrls) => void;
2374
+
2375
+ export declare type Shape = PolygonCurve_2 | PolygonWithHolesCurve | PolylineCurve_2 | RectangleCurve_2 | CircleCurve_2 | LineCurve_2 | GroupShape | TextShape | ArcCurve_2 | BezierCurve | CompositeCurve_2;
2376
+
2377
+ declare type ShapeLayers = Record<string, Shape[]>;
2378
+
2379
+ declare interface ShapeStyle {
2380
+ stroke?: string | number | number[];
2381
+ strokeWidth?: number | 'native';
2382
+ strokeOpacity?: number;
2383
+ fill?: string | number | number[] | false;
2384
+ fillOpacity?: number;
2385
+ dash?: boolean;
2386
+ }
2387
+
2388
+ declare class SpaceGraph {
2389
+ spatialStructure: SpaceGraphSpatialStructure;
2390
+ products: SpaceGraphProduct[];
2391
+ productsById: Record<string, SpaceGraphProduct>;
2392
+ productsByType: NodesByType<{
2393
+ readonly 'product:static': typeof SpaceGraphProduct;
2394
+ }>;
2395
+ geometries: SpaceGraphGeometryJson[];
2396
+ geometriesById: Record<string, SpaceGraphGeometryJson>;
2397
+ geometriesByType: NodesByType<{
2398
+ readonly 'geometry:plane': typeof PlaneGeometry;
2399
+ readonly 'geometry:cuboid': typeof CuboidGeometry;
2400
+ readonly 'geometry:sphere': typeof SphereGeometry;
2401
+ readonly 'geometry:extrusion': typeof ExtrusionGeometry;
2402
+ readonly 'geometry:mesh': typeof MeshGeometry;
2403
+ readonly 'geometry:uri': typeof UriGeometry;
2404
+ }>;
2405
+ materials: SpaceGraphMaterial[];
2406
+ materialsById: Record<string, SpaceGraphMaterial>;
2407
+ materialsByType: NodesByType<{
2408
+ readonly 'material:embedded': typeof SpaceGraphEmbeddedMaterial;
2409
+ readonly 'material:basic': typeof SpaceGraphBasicMaterial;
2410
+ readonly 'material:color': typeof SpaceGraphColorMaterial;
2411
+ readonly 'material:standard': typeof SpaceGraphStandardMaterial;
2412
+ }>;
2413
+ relations: SpaceGraphRelation[];
2414
+ relationsById: Record<string, SpaceGraphRelation>;
2415
+ relationsByType: NodesByType<{
2416
+ readonly 'relation:group': typeof GroupRelation;
2417
+ }>;
2418
+ nodes: SpaceGraphNode[];
2419
+ nodesById: Record<string, SpaceGraphNode>;
2420
+ nodesByType: NodesByType<{
2421
+ readonly 'spatialStructure:building': typeof SpaceGraphBuilding;
2422
+ readonly 'spatialStructure:floor': typeof SpaceGraphFloor;
2423
+ readonly 'spatialStructure:layout': typeof SpaceGraphLayout;
2424
+ readonly 'relation:group': typeof GroupRelation;
2425
+ readonly 'product:static': typeof SpaceGraphProduct;
2426
+ readonly 'material:embedded': typeof SpaceGraphEmbeddedMaterial;
2427
+ readonly 'material:basic': typeof SpaceGraphBasicMaterial;
2428
+ readonly 'material:color': typeof SpaceGraphColorMaterial;
2429
+ readonly 'material:standard': typeof SpaceGraphStandardMaterial;
2430
+ readonly 'geometry:plane': typeof PlaneGeometry;
2431
+ readonly 'geometry:cuboid': typeof CuboidGeometry;
2432
+ readonly 'geometry:sphere': typeof SphereGeometry;
2433
+ readonly 'geometry:extrusion': typeof ExtrusionGeometry;
2434
+ readonly 'geometry:mesh': typeof MeshGeometry;
2435
+ readonly 'geometry:uri': typeof UriGeometry;
2436
+ readonly 'spatialGraph:edge': typeof SpatialGraphEdge;
2437
+ readonly 'spatialGraph:vertex': typeof SpatialGraphVertex;
2438
+ readonly 'layout:space': typeof LayoutSpace;
2439
+ readonly 'view:2d': typeof Layout2dView;
2440
+ readonly 'view:3d': typeof Layout3dView;
2441
+ readonly 'annotation:floorPlanDxf': typeof LayoutFloorPlanDxfAnnotation;
2442
+ readonly 'annotation:floorPlanImage': typeof LayoutFloorPlanImageAnnotation;
2443
+ readonly 'element:ceiling': typeof LayoutBoundarySlab;
2444
+ readonly 'element:floor': typeof LayoutBoundarySlab;
2445
+ readonly 'element:boundaryWall': typeof LayoutBoundaryWall;
2446
+ readonly 'element:curtainWall': typeof LayoutCurtainWall;
2447
+ readonly 'element:spaceDivider': typeof LayoutSpaceDivider;
2448
+ readonly 'element:wall': typeof LayoutWall;
2449
+ readonly 'element:opening': typeof LayoutOpening;
2450
+ readonly 'element:asset': typeof LayoutAsset;
2451
+ readonly 'element:beam': typeof LayoutBeam;
2452
+ readonly 'element:casework': typeof LayoutCasework;
2453
+ readonly 'element:column': typeof LayoutColumn;
2454
+ readonly 'element:door': typeof LayoutDoor;
2455
+ readonly 'element:generic': typeof LayoutGeneric;
2456
+ readonly 'element:kitchen': typeof LayoutKitchen;
2457
+ readonly 'element:railing': typeof LayoutRailing;
2458
+ readonly 'element:ramp': typeof LayoutRamp;
2459
+ readonly 'element:roof': typeof LayoutRoof;
2460
+ readonly 'element:slab': typeof LayoutSlab;
2461
+ readonly 'element:stairs': typeof LayoutStairs;
2462
+ readonly 'element:stairFlight': typeof LayoutStairFlight;
2463
+ readonly 'element:window': typeof LayoutWindow;
2464
+ }>;
2465
+ private emitter;
2466
+ constructor();
2467
+ getEvents(): Record<string, Function>;
2468
+ copyEvents(spaceGraph: SpaceGraph): void;
2469
+ deleteNodeAtIndex(nodeIndex: number, nodes: SpaceGraphNode[], nodesById: Record<string, SpaceGraphNode>, nodesByType: NodesByType<Record<string, SpaceGraphNode>>): SpaceGraphNode | undefined;
2470
+ insertNode(node: SpaceGraphNode, nodes: SpaceGraphNode[], nodesById: Record<string, SpaceGraphNode>, nodesByType: NodesByType<Record<string, SpaceGraphNode>>): void;
2471
+ removeNode(node: SpaceGraphNode, nodes: SpaceGraphNode[], nodesById: Record<string, SpaceGraphNode>, nodesByType: NodesByType<Record<string, SpaceGraphNode>>): SpaceGraphNode | undefined;
2472
+ registerNode(node: SpaceGraphNode): void;
2473
+ unregisterNode(node: SpaceGraphNode): void;
2474
+ insertSpatialStructure(spatialStructure: SpaceGraphSpatialStructure): void;
2475
+ removeSpatialStructure(): SpaceGraphSpatialStructure | undefined;
2476
+ createSpatialStructure(type: SpaceGraphBuildingType, id: string): SpaceGraphBuilding;
2477
+ createSpatialStructure(type: SpaceGraphFloorType, id: string): SpaceGraphFloor;
2478
+ createSpatialStructure(type: LayoutType, id: string): SpaceGraphLayout;
2479
+ createSpatialStructure(type: SpaceGraphSpatialStructureType, id: string): SpaceGraphSpatialStructure;
2480
+ insertProduct(product: SpaceGraphProduct): void;
2481
+ removeProduct(product: SpaceGraphProduct): void;
2482
+ createProduct(id: string): SpaceGraphProduct;
2483
+ insertGeometry(geometryJson: SpaceGraphGeometryJson): void;
2484
+ removeGeometry(geometryJson: SpaceGraphGeometryJson): void;
2485
+ insertMaterial(material: SpaceGraphMaterial): void;
2486
+ removeMaterial(material: SpaceGraphMaterial): void;
2487
+ createMaterial(type: SpaceGraphColorMaterialType, id: string, color: Rgb, opacity: number): SpaceGraphColorMaterial;
2488
+ createMaterial(type: SpaceGraphStandardMaterialType, id: string, reference: string): SpaceGraphStandardMaterial;
2489
+ createMaterial(type: SpaceGraphEmbeddedMaterialType, id: string, reference: string, format: SpaceGraphEmbeddedMaterialFormat): SpaceGraphEmbeddedMaterial;
2490
+ createMaterial(type: SpaceGraphBasicMaterialType, id: string): SpaceGraphBasicMaterial;
2491
+ insertRelation(relation: SpaceGraphRelation): void;
2492
+ removeRelation(relation: SpaceGraphRelation): void;
2493
+ createRelation(type: SpaceGraphRelationType, id: string): SpaceGraphRelation;
2494
+ getId(): string;
2495
+ emit<EventType extends keyof SpaceGraphEventMap>(event: EventType, ...args: SpaceGraphEventMap[EventType]): void;
2496
+ on<EventType extends keyof SpaceGraphEventMap>(event: EventType, handler: (...args: SpaceGraphEventMap[EventType]) => void, context?: any): void;
2497
+ once<EventType extends keyof SpaceGraphEventMap>(event: EventType, handler: (...args: SpaceGraphEventMap[EventType]) => void, context?: any): void;
2498
+ off<EventType extends keyof SpaceGraphEventMap>(event: EventType, handler?: (...args: SpaceGraphEventMap[EventType]) => void): void;
2499
+ }
2500
+
2501
+ declare class SpaceGraphBasicMaterial extends SpaceGraphNodeBase {
2502
+ type: SpaceGraphBasicMaterialType;
2503
+ colorDiffuse: Rgb;
2504
+ colorSpecular: Rgb;
2505
+ specularCoefficient: number;
2506
+ opacity: number;
2507
+ constructor(id: string);
2508
+ copyForClone(material: SpaceGraphBasicMaterial): void;
2509
+ }
2510
+
2511
+ declare interface SpaceGraphBasicMaterialJson extends SpaceGraphMaterialBaseJson {
2512
+ type: SpaceGraphBasicMaterialType;
2513
+ colorDiffuse: Rgb;
2514
+ colorSpecular?: Rgb;
2515
+ specularCoefficient?: number;
2516
+ opacity?: number;
2517
+ }
2518
+
2519
+ declare type SpaceGraphBasicMaterialType = typeof SpaceGraphBasicMaterialTypeValue;
2520
+
2521
+ declare const SpaceGraphBasicMaterialTypeValue = "material:basic";
2522
+
2523
+ declare class SpaceGraphBuilding extends SpaceGraphSpatialStructureBase {
2524
+ type: SpaceGraphBuildingType;
2525
+ location: SpaceGraphLocation;
2526
+ floors: SpaceGraphFloor[];
2527
+ constructor(id: string);
2528
+ copyForClone(building: SpaceGraphBuilding): void;
2529
+ insertFloor(floor: SpaceGraphFloor): void;
2530
+ removeFloor(floor: SpaceGraphFloor): void;
2531
+ createFloor(id: string): SpaceGraphFloor;
2532
+ }
2533
+
2534
+ declare interface SpaceGraphBuildingJson extends SpaceGraphSpatialStructureBaseJson {
2535
+ type: SpaceGraphBuildingType;
2536
+ location?: SpaceGraphLocation;
2537
+ floors: SpaceGraphFloorJson[];
2538
+ }
2539
+
2540
+ declare type SpaceGraphBuildingType = typeof SpaceGraphBuildingTypeValue;
2541
+
2542
+ declare const SpaceGraphBuildingTypeValue = "spatialStructure:building";
2543
+
2544
+ declare class SpaceGraphColorMaterial extends SpaceGraphNodeBase {
2545
+ type: SpaceGraphColorMaterialType;
2546
+ color: Rgb;
2547
+ opacity: number;
2548
+ constructor(id: string, color?: Rgb, opacity?: number);
2549
+ }
2550
+
2551
+ declare interface SpaceGraphColorMaterialJson extends SpaceGraphMaterialBaseJson {
2552
+ type: SpaceGraphColorMaterialType;
2553
+ value: Rgb | RgbA | string;
2554
+ }
2555
+
2556
+ declare type SpaceGraphColorMaterialType = typeof SpaceGraphColorMaterialTypeValue;
2557
+
2558
+ declare const SpaceGraphColorMaterialTypeValue = "material:color";
2559
+
2560
+ declare class SpaceGraphEmbeddedMaterial extends SpaceGraphNodeBase {
2561
+ type: SpaceGraphEmbeddedMaterialType;
2562
+ reference: string;
2563
+ format: SpaceGraphEmbeddedMaterialFormat;
2564
+ constructor(id: string, reference: string, format: SpaceGraphEmbeddedMaterialFormat);
2565
+ }
2566
+
2567
+ declare type SpaceGraphEmbeddedMaterialFormat = 'data3d';
2568
+
2569
+ declare type SpaceGraphEmbeddedMaterialType = typeof SpaceGraphEmbeddedMaterialTypeValue;
2570
+
2571
+ declare const SpaceGraphEmbeddedMaterialTypeValue = "material:embedded";
2572
+
2573
+ declare interface SpaceGraphEventMap {
2574
+ 'spatial-structure-create': [SpaceGraphSpatialStructure];
2575
+ 'spatial-structure-delete': [SpaceGraphSpatialStructure];
2576
+ 'product-create': [SpaceGraphProduct];
2577
+ 'product-delete': [SpaceGraphProduct];
2578
+ 'material-create': [SpaceGraphMaterial];
2579
+ 'material-delete': [SpaceGraphMaterial];
2580
+ 'relation-create': [SpaceGraphRelation];
2581
+ 'relation-delete': [SpaceGraphRelation];
2582
+ 'node-id-change': [SpaceGraphNodeBase, string];
2583
+ 'node-property-change': [SpaceGraphNodeBase, string];
2584
+ 'vertex-create': [SpatialGraphVertex];
2585
+ 'vertex-delete': [SpatialGraphVertex];
2586
+ 'vertex-add-edge': [SpatialGraphVertex, SpatialGraphEdge];
2587
+ 'vertex-remove-edge': [SpatialGraphVertex, SpatialGraphEdge];
2588
+ 'vertex-set-position': [SpatialGraphVertex];
2589
+ 'edge-create': [SpatialGraphEdge];
2590
+ 'edge-delete': [SpatialGraphEdge];
2591
+ 'edge-set-vertices': [SpatialGraphEdge, {
2592
+ previousVertices: [SpatialGraphVertex, SpatialGraphVertex];
2593
+ }];
2594
+ 'space-create': [LayoutSpace];
2595
+ 'space-delete': [LayoutSpace];
2596
+ 'space-split': [LayoutSpace, [LayoutSpace, LayoutSpace]];
2597
+ 'space-attributes-change': [LayoutSpace];
2598
+ 'element-create': [LayoutElement];
2599
+ 'element-delete': [LayoutElement];
2600
+ 'element-parameters-change': [LayoutElementBase];
2601
+ 'element-transform-change': [LayoutTransformElementBase];
2602
+ 'annotation-create': [LayoutAnnotation];
2603
+ 'annotation-delete': [LayoutAnnotation];
2604
+ 'annotation-transform-change': [LayoutAnnotationBase];
2605
+ 'annotation-parameters-change': [LayoutAnnotationBase];
2606
+ 'view-create': [LayoutView];
2607
+ 'view-delete': [LayoutView];
2608
+ 'view-parameters-change': [LayoutViewBase];
2609
+ 'geometry-update': [LayoutElement];
2610
+ 'geometry-profile-update': [LayoutSpace | LayoutElement];
2611
+ }
2612
+
2613
+ declare class SpaceGraphFloor extends SpaceGraphSpatialStructureBase {
2614
+ type: SpaceGraphFloorType;
2615
+ parent: SpaceGraphBuilding | null;
2616
+ position: Vector3;
2617
+ rotation: number;
2618
+ layouts: SpaceGraphLayout[];
2619
+ constructor(id: string);
2620
+ copyForClone(floor: SpaceGraphFloor): void;
2621
+ insertLayout(layout: SpaceGraphLayout): void;
2622
+ removeLayout(layout: SpaceGraphLayout): void;
2623
+ createLayout(id: string): SpaceGraphLayout;
2624
+ }
2625
+
2626
+ declare interface SpaceGraphFloorJson extends SpaceGraphSpatialStructureBaseJson {
2627
+ type: SpaceGraphFloorType;
2628
+ position: Vector3;
2629
+ rotation: number;
2630
+ layouts: SpaceGraphLayoutJson[];
2631
+ }
2632
+
2633
+ declare type SpaceGraphFloorType = typeof SpaceGraphFloorTypeValue;
2634
+
2635
+ declare const SpaceGraphFloorTypeValue = "spatialStructure:floor";
2636
+
2637
+ declare type SpaceGraphGeometry = ParametricGeometry | MeshGeometry | UriGeometry;
2638
+
2639
+ declare type SpaceGraphGeometryJson = ParametricGeometryJson | MeshGeometryJson | UriGeometryJson;
2640
+
2641
+ declare type SpaceGraphGeometryType = ParametricGeometryType | MeshGeometryType | UriGeometryType;
2642
+
2643
+ declare interface SpaceGraphJson {
2644
+ schemaVersion: string;
2645
+ spatialStructure: SpaceGraphSpatialStructureJson;
2646
+ sharedResources: SpaceGraphSharedResourcesJson;
2647
+ }
2648
+
2649
+ declare class SpaceGraphLayout extends SpaceGraphSpatialStructureBase {
2650
+ type: LayoutType;
2651
+ parent: SpaceGraphFloor | null;
2652
+ spatialGraph: LayoutSpatialGraph;
2653
+ spaces: LayoutSpace[];
2654
+ spacesById: Record<string, LayoutSpace>;
2655
+ elements: LayoutElement[];
2656
+ elementsById: Record<string, LayoutElement>;
2657
+ elementsByType: NodesByType<{
2658
+ readonly 'element:ceiling': typeof LayoutBoundarySlab;
2659
+ readonly 'element:floor': typeof LayoutBoundarySlab;
2660
+ readonly 'element:boundaryWall': typeof LayoutBoundaryWall;
2661
+ readonly 'element:curtainWall': typeof LayoutCurtainWall;
2662
+ readonly 'element:spaceDivider': typeof LayoutSpaceDivider;
2663
+ readonly 'element:wall': typeof LayoutWall;
2664
+ readonly 'element:opening': typeof LayoutOpening;
2665
+ readonly 'element:asset': typeof LayoutAsset;
2666
+ readonly 'element:beam': typeof LayoutBeam;
2667
+ readonly 'element:casework': typeof LayoutCasework;
2668
+ readonly 'element:column': typeof LayoutColumn;
2669
+ readonly 'element:door': typeof LayoutDoor;
2670
+ readonly 'element:generic': typeof LayoutGeneric;
2671
+ readonly 'element:kitchen': typeof LayoutKitchen;
2672
+ readonly 'element:railing': typeof LayoutRailing;
2673
+ readonly 'element:ramp': typeof LayoutRamp;
2674
+ readonly 'element:roof': typeof LayoutRoof;
2675
+ readonly 'element:slab': typeof LayoutSlab;
2676
+ readonly 'element:stairs': typeof LayoutStairs;
2677
+ readonly 'element:stairFlight': typeof LayoutStairFlight;
2678
+ readonly 'element:window': typeof LayoutWindow;
2679
+ }>;
2680
+ annotations: LayoutAnnotation[];
2681
+ annotationsById: Record<string, LayoutAnnotation>;
2682
+ annotationsByType: NodesByType<{
2683
+ readonly 'annotation:floorPlanDxf': typeof LayoutFloorPlanDxfAnnotation;
2684
+ readonly 'annotation:floorPlanImage': typeof LayoutFloorPlanImageAnnotation;
2685
+ }>;
2686
+ views: LayoutView[];
2687
+ viewsById: Record<string, LayoutView>;
2688
+ viewsByType: NodesByType<{
2689
+ readonly 'view:2d': typeof Layout2dView;
2690
+ readonly 'view:3d': typeof Layout3dView;
2691
+ }>;
2692
+ debugIds: boolean;
2693
+ suggestedIds: Record<string, boolean>;
2694
+ constructor(id: string);
2695
+ copyForClone(layout: SpaceGraphLayout): void;
2696
+ insertSpace(space: LayoutSpace): void;
2697
+ removeSpace(space: LayoutSpace): LayoutSpace | undefined;
2698
+ createSpace(id: string, boundaries: LayoutBoundary[]): LayoutSpace;
2699
+ insertElement(element: LayoutElement): void;
2700
+ removeElement(element: LayoutElement): LayoutElement | undefined;
2701
+ createElement(type: LayoutOpeningType, id: string): LayoutOpening;
2702
+ createElement(type: LayoutBoundarySlabType, id: string, boundaries: LayoutBoundary[]): LayoutBoundarySlab;
2703
+ createElement(type: LayoutBoundaryWallType, id: string, boundaries: LayoutBoundary[]): LayoutBoundaryWall;
2704
+ createElement<T extends LayoutEdgeElementType>(type: T, id: string, edges: SpatialGraphEdge[]): EdgeElementMap[T];
2705
+ createElement<T extends LayoutTransformElementType>(type: T, id: string): TransformElementMap[T];
2706
+ insertNode(node: LayoutAnnotation | LayoutView): void;
2707
+ removeNode(node: LayoutAnnotation | LayoutView): void;
2708
+ insertAnnotation(annotation: LayoutAnnotation): void;
2709
+ removeAnnotation(annotation: LayoutAnnotation): LayoutAnnotation | undefined;
2710
+ createAnnotation(type: LayoutAnnotationType, id: string): LayoutAnnotation;
2711
+ insertView(view: LayoutView): void;
2712
+ removeView(view: LayoutView): LayoutView;
2713
+ createView(type: LayoutViewType, id: string): LayoutView;
2714
+ clearSpaces(): void;
2715
+ getElementList(): LayoutElement[];
2716
+ getArea(filter?: {
2717
+ program?: {
2718
+ exclude?: string[];
2719
+ include?: string[];
2720
+ };
2721
+ }): number;
2722
+ getLayoutGraph(): Graph;
2723
+ getUniqueId(prefix: string, nodesById: Record<string, SpaceGraphNode>): string;
2724
+ getSpaceId(prefix?: string): string;
2725
+ getElementId(element: LayoutElement, prefix?: string): string;
2726
+ getBoundingBox(): TransformBoundingBox3d;
2727
+ }
2728
+
2729
+ declare interface SpaceGraphLayoutJson extends SpaceGraphSpatialStructureBaseJson {
2730
+ type: LayoutType;
2731
+ spatialGraph: LayoutSpatialGraphJson;
2732
+ spaces: LayoutSpaceJson[];
2733
+ elements: LayoutElementJson[];
2734
+ annotations?: LayoutAnnotationJson[];
2735
+ views?: LayoutViewJson[];
2736
+ }
2737
+
2738
+ declare type SpaceGraphLocation = {
2739
+ latLong: Vector2;
2740
+ rotation: number;
2741
+ };
2742
+
2743
+ declare type SpaceGraphMaterial = SpaceGraphColorMaterial | SpaceGraphStandardMaterial | SpaceGraphEmbeddedMaterial | SpaceGraphBasicMaterial;
2744
+
2745
+ declare interface SpaceGraphMaterialBaseJson extends SpaceGraphNodeBaseJson {
2746
+ id: string;
2747
+ }
2748
+
2749
+ declare type SpaceGraphMaterialJson = Rgb | RgbA | string | SpaceGraphMaterialResourceJson;
2750
+
2751
+ declare type SpaceGraphMaterialResourceJson = SpaceGraphColorMaterialJson | SpaceGraphStandardMaterialJson | SpaceGraphBasicMaterialJson;
2752
+
2753
+ declare type SpaceGraphNode = SpaceGraphProduct | SpaceGraphGeometry | SpaceGraphMaterial | SpaceGraphRelation | SpaceGraphBuilding | SpaceGraphFloor | LayoutNode | SpaceGraphLayout | LayoutAnnotation;
2754
+
2755
+ declare class SpaceGraphNodeBase extends SpaceGraphTypedValue {
2756
+ id: string;
2757
+ name: string;
2758
+ customId: string;
2759
+ constructor(id: string, type: string);
2760
+ copyForClone(node: SpaceGraphNode): void;
2761
+ setName(name: string): void;
2762
+ setCustomId(customId: string): void;
2763
+ emit<EventType extends keyof SpaceGraphEventMap>(event: EventType, ...args: SpaceGraphEventMap[EventType]): void;
2764
+ }
2765
+
2766
+ declare interface SpaceGraphNodeBaseJson extends SpaceGraphTypedValueJson {
2767
+ /** @format uuid */
2768
+ id: string;
2769
+ name?: string;
2770
+ customId?: string;
2771
+ }
2772
+
2773
+ declare class SpaceGraphProduct extends SpaceGraphNodeBase {
2774
+ type: SpaceGraphProductType;
2775
+ attributes: SpaceGraphProductAttributes;
2776
+ geometries: GeometryOperationJson[];
2777
+ constructor(id: string);
2778
+ copyForClone(product: SpaceGraphProduct): void;
2779
+ setAttributes(attributesJson: SpaceGraphProductAttributesJson): void;
2780
+ }
2781
+
2782
+ declare type SpaceGraphProductAttributes = {
2783
+ manufacturer: string;
2784
+ categories: string[];
2785
+ subCategories: string[];
2786
+ thumbnail: string;
2787
+ boundingBox: BoundingBox3d;
2788
+ seatCapacity: number;
2789
+ updatedAt: string;
2790
+ };
2791
+
2792
+ declare type SpaceGraphProductAttributesJson = {
2793
+ manufacturer?: string;
2794
+ categories?: string[];
2795
+ subCategories?: string[];
2796
+ thumbnail?: string;
2797
+ boundingBox?: BoundingBox3d;
2798
+ seatCapacity?: number;
2799
+ updatedAt?: string;
2800
+ };
2801
+
2802
+ declare interface SpaceGraphProductJson extends SpaceGraphNodeBaseJson {
2803
+ type: SpaceGraphProductType;
2804
+ attributes?: SpaceGraphProductAttributesJson;
2805
+ geometries: GeometryOperationJson[];
2806
+ }
2807
+
2808
+ declare type SpaceGraphProductType = typeof SpaceGraphProductTypeValue;
2809
+
2810
+ declare const SpaceGraphProductTypeValue = "product:static";
2811
+
2812
+ declare type SpaceGraphRelation = GroupRelation;
2813
+
2814
+ declare type SpaceGraphRelationJson = GroupRelationJson;
2815
+
2816
+ declare type SpaceGraphRelationType = GroupRelationType;
2817
+
2818
+ declare interface SpaceGraphSharedResourcesJson {
2819
+ products: SpaceGraphProductJson[];
2820
+ geometries: SpaceGraphGeometryJson[];
2821
+ materials: SpaceGraphMaterialResourceJson[];
2822
+ relations: SpaceGraphRelationJson[];
2823
+ }
2824
+
2825
+ declare type SpaceGraphSpatialStructure = SpaceGraphBuilding | SpaceGraphFloor | SpaceGraphLayout;
2826
+
2827
+ declare class SpaceGraphSpatialStructureBase extends SpaceGraphNodeBase {
2828
+ type: SpaceGraphSpatialStructureType;
2829
+ constructor(id: string, type: SpaceGraphSpatialStructureType);
2830
+ }
2831
+
2832
+ declare interface SpaceGraphSpatialStructureBaseJson extends SpaceGraphNodeBaseJson {
2833
+ type: SpaceGraphSpatialStructureType;
2834
+ }
2835
+
2836
+ declare type SpaceGraphSpatialStructureJson = SpaceGraphBuildingJson | SpaceGraphFloorJson | SpaceGraphLayoutJson;
2837
+
2838
+ declare type SpaceGraphSpatialStructureType = SpaceGraphBuildingType | SpaceGraphFloorType | LayoutType;
2839
+
2840
+ declare class SpaceGraphStandardMaterial extends SpaceGraphNodeBase {
2841
+ type: SpaceGraphStandardMaterialType;
2842
+ reference: string;
2843
+ constructor(id: string, reference: string);
2844
+ }
2845
+
2846
+ declare interface SpaceGraphStandardMaterialJson extends SpaceGraphMaterialBaseJson {
2847
+ type: SpaceGraphStandardMaterialType;
2848
+ reference: string;
2849
+ }
2850
+
2851
+ declare type SpaceGraphStandardMaterialType = typeof SpaceGraphStandardMaterialTypeValue;
2852
+
2853
+ declare const SpaceGraphStandardMaterialTypeValue = "material:standard";
2854
+
2855
+ declare class SpaceGraphTypedValue {
2856
+ spaceGraph: SpaceGraph;
2857
+ type: string;
2858
+ constructor(type: string);
2859
+ }
2860
+
2861
+ declare interface SpaceGraphTypedValueJson {
2862
+ type: string;
2863
+ }
2864
+
2865
+ /**
2866
+ * Map space labels by space usage or space id to a custom name
2867
+ * @example { kitchen: 'cuisine' }
2868
+ */
2869
+ declare type SpaceLabelMapping = {
2870
+ [label: string]: string;
2871
+ };
2872
+
2873
+ declare interface SpaceShapeStyle extends ShapeStyle {
2874
+ usage?: {
2875
+ [key: string]: ShapeStyle;
2876
+ };
2877
+ program?: {
2878
+ [key: string]: ShapeStyle;
2879
+ };
2880
+ }
2881
+
2882
+ declare class SpatialGraphEdge extends SpatialGraphNodeBase {
2883
+ type: SpatialGraphEdgeType;
2884
+ vertices: [SpatialGraphVertex, SpatialGraphVertex];
2885
+ spaces: [LayoutSpace | null | undefined, LayoutSpace | null | undefined];
2886
+ boundaryWalls: [LayoutBoundaryWall | null, LayoutBoundaryWall | null];
2887
+ element: LayoutEdgeElement | null;
2888
+ constructor(id: string, vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex);
2889
+ getPoints(): [Vector2_2, Vector2_2];
2890
+ setVertices(vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex): void;
2891
+ setVerticesByIds(vertexId1: string, vertexId2: string): void;
2892
+ canSplit(u: number, options?: EdgeCanSplitOptions): boolean;
2893
+ split(u: number, options?: EdgeSplitOptions, updateSpaceBoundaries?: boolean): EdgeSplitReturnValue;
2894
+ canMerge(edge: SpatialGraphEdge): boolean;
2895
+ merge(edge: SpatialGraphEdge, updateSpaceBoundaries?: boolean): void;
2896
+ }
2897
+
2898
+ declare interface SpatialGraphEdgeJson extends SpatialGraphNodeBaseJson {
2899
+ type: SpatialGraphEdgeType;
2900
+ vertices: [string, string];
2901
+ }
2902
+
2903
+ declare type SpatialGraphEdgeType = typeof SpatialGraphEdgeTypeValue;
2904
+
2905
+ declare const SpatialGraphEdgeTypeValue = "spatialGraph:edge";
2906
+
2907
+ declare type SpatialGraphNode = SpatialGraphVertex | SpatialGraphEdge;
2908
+
2909
+ declare class SpatialGraphNodeBase extends LayoutNodeBase {
2910
+ }
2911
+
2912
+ declare interface SpatialGraphNodeBaseJson extends LayoutNodeBaseJson {
2913
+ }
2914
+
2915
+ declare type SpatialGraphNodeType = SpatialGraphVertexType | SpatialGraphEdgeType;
2916
+
2917
+ declare class SpatialGraphVertex extends SpatialGraphNodeBase {
2918
+ type: SpatialGraphVertexType;
2919
+ position: Vector2;
2920
+ edges: SpatialGraphEdge[];
2921
+ constructor(id: string, x: number, y: number);
2922
+ sortVertexEdges(): void;
2923
+ addEdge(edge: SpatialGraphEdge): void;
2924
+ removeEdge(edge: SpatialGraphEdge): void;
2925
+ setPosition(x: number, y: number): void;
2926
+ }
2927
+
2928
+ declare interface SpatialGraphVertexJson extends SpatialGraphNodeBaseJson {
2929
+ type: SpatialGraphVertexType;
2930
+ position: Vector2;
2931
+ }
2932
+
2933
+ declare type SpatialGraphVertexType = typeof SpatialGraphVertexTypeValue;
2934
+
2935
+ declare const SpatialGraphVertexTypeValue = "spatialGraph:vertex";
2936
+
2937
+ declare class SphereGeometry extends ParametricGeometryBase {
2938
+ type: SphereGeometryType;
2939
+ radius: number;
2940
+ constructor(id: string);
2941
+ }
2942
+
2943
+ declare interface SphereGeometryJson extends ParametricGeometryBaseJson {
2944
+ type: SphereGeometryType;
2945
+ radius: number;
2946
+ }
2947
+
2948
+ declare type SphereGeometryType = typeof SphereGeometryTypeValue;
2949
+
2950
+ declare const SphereGeometryTypeValue = "geometry:sphere";
2951
+
2952
+ declare interface SpiralStairFlightParameters {
2953
+ stairFlightType: 'spiral';
2954
+ angle: number;
2955
+ radius: number;
2956
+ width: number;
2957
+ height: number;
2958
+ circulation: 'left' | 'right';
2959
+ materials: LayoutStairFlightMaterials;
2960
+ }
2961
+
2962
+ declare type SpiralStairFlightParametersJson = Partial<SpiralStairFlightParameters>;
2963
+
2964
+ declare interface SpiralStairsParameters {
2965
+ stairsType: SpiralStairsType;
2966
+ radius: number;
2967
+ angle: number;
2968
+ height: number;
2969
+ stepWidth: number;
2970
+ circulation: 'left' | 'right';
2971
+ railing: 'none' | 'left' | 'right' | 'both';
2972
+ materials: LayoutStairsMaterials;
2973
+ }
2974
+
2975
+ declare type SpiralStairsParametersJson = Partial<SpiralStairsParameters>;
2976
+
2977
+ declare type SpiralStairsType = 'spiral';
2978
+
2979
+ declare interface StartupOptions {
2980
+ /** do not render elements of given types (e.g. 'element:asset', 'element:door', …), or 'roomStamp' */
2981
+ hideElements?: HideableElement[];
2982
+ preserveViewbox?: string;
2983
+ /** option to disable panning and zooming */
2984
+ panZoom?: boolean;
2985
+ /** if set, panning and zooming is restricted to the scene boundingbox plus the margin */
2986
+ panZoomMargin?: number;
2987
+ /** if set room stamps have a fixed size - otherwise they adapt to the zoom level */
2988
+ roomStampSize?: number;
2989
+ /** toggle overlaying UI elements */
2990
+ ui?: UI;
2991
+ /** floor plan theming */
2992
+ theme?: FloorPlanTheme;
2993
+ /** custom shape layers */
2994
+ shapeLayers?: ShapeLayers;
2995
+ /** mapping table for custom space labels */
2996
+ spaceLabelMapping?: SpaceLabelMapping;
2997
+ /** set the unit system */
2998
+ units?: Units;
2999
+ /** min and max zooming factor. Defaults to [3, 300] */
3000
+ zoomRange?: [number, number];
3001
+ }
3002
+
3003
+ declare interface StraightStairFlightParameters {
3004
+ stairFlightType: 'straight';
3005
+ length: number;
3006
+ width: number;
3007
+ height: number;
3008
+ materials: LayoutStairFlightMaterials;
3009
+ }
3010
+
3011
+ declare type StraightStairFlightParametersJson = Partial<StraightStairFlightParameters>;
3012
+
3013
+ declare interface StraightStairsParameters {
3014
+ stairsType: StraightStairsType;
3015
+ length: number;
3016
+ width: number;
3017
+ height: number;
3018
+ railing: 'none' | 'left' | 'right' | 'both';
3019
+ materials: LayoutStairsMaterials;
3020
+ }
3021
+
3022
+ declare type StraightStairsParametersJson = Partial<StraightStairsParameters>;
3023
+
3024
+ declare type StraightStairsType = 'straight' | 'straightLanding';
3025
+
3026
+ declare interface SurfaceMaterials {
3027
+ [surface: string]: SpaceGraphMaterial;
3028
+ }
3029
+
3030
+ declare interface SurfaceMaterialsJson {
3031
+ [surface: string]: SpaceGraphMaterialJson;
3032
+ }
3033
+
3034
+ declare interface Surfaces {
3035
+ [surface: string]: GeometryFaceIndices;
3036
+ }
3037
+
3038
+ /**
3039
+ * This interface was referenced by `AuthJson`'s JSON-Schema
3040
+ * via the `definition` "temporaryAccessToken".
3041
+ */
3042
+ declare interface TemporaryAccessToken {
3043
+ authorization: string;
3044
+ expiresAt: number;
3045
+ }
3046
+
3047
+ declare type TemporaryAccessTokenFunction = (args: CreateTemporaryAccessToken) => Promise<TemporaryAccessToken>;
3048
+
3049
+ declare interface TextShape extends BaseShape {
3050
+ type: 'text';
3051
+ position: Vector2_2;
3052
+ text: string;
3053
+ rotation?: number;
3054
+ alignV?: 'center' | 'bottom' | 'top';
3055
+ alignH?: 'center' | 'left' | 'right';
3056
+ fontSize?: number;
3057
+ }
3058
+
3059
+ declare type TextureData = {
3060
+ textureUrl: string;
3061
+ applyFilter: TextureFilter;
3062
+ texture?: any;
3063
+ contourTexture?: any;
3064
+ imageData?: any;
3065
+ error?: {
3066
+ message: string;
3067
+ };
3068
+ anchor?: {
3069
+ x: number;
3070
+ y: number;
3071
+ };
3072
+ offset?: {
3073
+ x: number;
3074
+ y: number;
3075
+ };
3076
+ position?: {
3077
+ x: number;
3078
+ y: number;
3079
+ };
3080
+ };
3081
+
3082
+ declare enum TextureFilter {
3083
+ None = 0,
3084
+ Default = 1,
3085
+ Grayscale = 2
3086
+ }
3087
+
3088
+ declare class Ticker {
3089
+ methods: {
3090
+ [name: string]: {
3091
+ fn: Function;
3092
+ ctx: WebGlView;
3093
+ };
3094
+ };
3095
+ add: (name: string, fn: Function, ctx: WebGlView) => void;
3096
+ remove: (name: string) => void;
3097
+ }
3098
+
3099
+ declare class TinyEmitter {
3100
+ on(event: string, callback: Function, ctx?: any): this;
3101
+ once(event: string, callback: Function, ctx?: any): this;
3102
+ emit(event: string, ...args: any[]): this;
3103
+ off(event: string, callback?: Function): this;
3104
+ }
3105
+
3106
+ declare interface TokenOptions {
3107
+ publishableAccessToken?: string;
3108
+ secretAccessToken?: string;
3109
+ temporaryAccessToken?: TemporaryAccessToken;
3110
+ temporaryAccessTokenFunction?: TemporaryAccessTokenFunction;
3111
+ temporaryAccessTokenScopes?: ScopeDefinitionArray;
3112
+ sdkVersion?: string;
3113
+ }
3114
+
3115
+ declare type Transform3d = {
3116
+ position: Vector3;
3117
+ rotation: number;
3118
+ rotationAxis: Vector3;
3119
+ };
3120
+
3121
+ declare type TransformBoundingBox3d = {
3122
+ min: Vector3;
3123
+ max: Vector3;
3124
+ transform: Transform3d;
3125
+ };
3126
+
3127
+ declare type TransformElementMap = {
3128
+ 'element:asset': LayoutAsset;
3129
+ 'element:beam': LayoutBeam;
3130
+ 'element:casework': LayoutCasework;
3131
+ 'element:column': LayoutColumn;
3132
+ 'element:door': LayoutDoor;
3133
+ 'element:kitchen': LayoutKitchen;
3134
+ 'element:railing': LayoutRailing;
3135
+ 'element:ramp': LayoutRamp;
3136
+ 'element:roof': LayoutRoof;
3137
+ 'element:slab': LayoutSlab;
3138
+ 'element:stairs': LayoutStairs;
3139
+ 'element:stairFlight': LayoutStairFlight;
3140
+ 'element:window': LayoutWindow;
3141
+ 'element:generic': LayoutGeneric;
3142
+ };
3143
+
3144
+ declare type UI = {
3145
+ /** Show a dynamic scale indicator */
3146
+ scale?: boolean;
3147
+ /** Show the current cursor position in plan coordinates */
3148
+ coordinates?: boolean;
3149
+ };
3150
+
3151
+ /**
3152
+ * Which unit system and how to display the units
3153
+ */
3154
+ declare type Units = {
3155
+ /** meters or feet? */
3156
+ system?: 'metric' | 'imperial';
3157
+ /** how many decimals should be shown for lengths? */
3158
+ lengthDecimals?: number;
3159
+ /** how many decimals should be shown for areas? */
3160
+ areaDecimals?: number;
3161
+ /** if 'area', it displays e.g. 12 m². If 'boundingBox'it displays e.g. 4 m x 3 m */
3162
+ roomDimensions?: 'area' | 'boundingBox';
3163
+ };
3164
+
3165
+ declare class UriGeometry extends GeometryBase {
3166
+ type: UriGeometryType;
3167
+ format: UriGeometryFormat;
3168
+ uri: string;
3169
+ normals: ParametricNormals;
3170
+ constructor(id: string);
3171
+ }
3172
+
3173
+ declare type UriGeometryFormat = 'data3d';
3174
+
3175
+ declare interface UriGeometryJson extends GeometryBaseJson {
3176
+ type: UriGeometryType;
3177
+ format: UriGeometryFormat;
3178
+ uri: string;
3179
+ normals?: ParametricNormals;
3180
+ }
3181
+
3182
+ declare type UriGeometryType = typeof UriGeometryTypeValue;
3183
+
3184
+ declare const UriGeometryTypeValue = "geometry:uri";
3185
+
3186
+ declare type Vector2 = [number, number];
3187
+
3188
+ declare type Vector2_2 = [number, number];
3189
+
3190
+ declare type Vector3 = [number, number, number];
3191
+
3192
+ declare interface Vector3List extends SpaceGraphTypedValueJson {
3193
+ type: 'vector3:list';
3194
+ list: Vector3[];
3195
+ }
3196
+
3197
+ declare interface Vector3Range extends SpaceGraphTypedValueJson {
3198
+ type: 'vector3:range';
3199
+ range: {
3200
+ start: Vector3;
3201
+ step: Vector3;
3202
+ count: number;
3203
+ };
3204
+ }
3205
+
3206
+ declare type ViewEvent = 'pan' | 'zoom' | 'viewbox' | 'resize-canvas' | 'scene-rendered' | 'focus';
3207
+
3208
+ declare class WebGlView extends TinyEmitter {
3209
+ windowPos: Vector2_2;
3210
+ zoom: number;
3211
+ client: Vector2_2;
3212
+ layers: Map<string, PlanLayer>;
3213
+ viewbox: BoundingBox2d;
3214
+ styleCache: Record<string, ShapeStyle | 'selected'>;
3215
+ viewportNeedsUpdate: boolean;
3216
+ viewportPaused: boolean;
3217
+ viewportInFocus: boolean;
3218
+ wallNodesToUpdate: any[];
3219
+ wallNodeUpdateInProgress: boolean;
3220
+ parentEl: HTMLElement;
3221
+ _settings: FpeConfig;
3222
+ /* Excluded from this release type: gfxLayers */
3223
+ redrawScene: () => void;
3224
+ /* Excluded from this release type: gfxNodes */
3225
+ /* Excluded from this release type: _viewport */
3226
+ /* Excluded from this release type: _canvasMargin */
3227
+ /* Excluded from this release type: _renderer */
3228
+ /* Excluded from this release type: _stage */
3229
+ _dummyTexture: any;
3230
+ /* Excluded from this release type: _zoomTarget */
3231
+ _oldTime: number;
3232
+ ticker?: Ticker;
3233
+ on: (event: ViewEvent, callback: Function, ctx?: any) => this;
3234
+ once: (event: ViewEvent, callback: Function, ctx?: any) => this;
3235
+ off: (event: ViewEvent, callback?: Function) => this;
3236
+ emit: (event: ViewEvent, ...args: any[]) => this;
3237
+ constructor(loader: FpeLoader, settings: FpeConfig, parentEl: HTMLElement);
3238
+ /**
3239
+ * main animation loop
3240
+ */
3241
+ draw(): void;
3242
+ startAnimationLoop(): void;
3243
+ stopAnimationLoop(): void;
3244
+ updateView(): void;
3245
+ watchResize(): Promise<void>;
3246
+ get gfxNodeCount(): number;
3247
+ reset(): void;
3248
+ pause(interaction?: string): void;
3249
+ resume(interaction?: string): void;
3250
+ }
3251
+
3252
+ export { }