@archilogic/floor-plan-sdk 5.1.17 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/fpe.d.ts +325 -73
- package/dist/fpe.js +1 -1
- package/dist/fpe.umd.cjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
The @archilogic/floor-plan-sdk package enables you to create and embed interactive, customizable floor plans in the browser
|
|
4
4
|
|
|
5
|
+
> **Note:** The SDK uses ES 2022 features and may require transpilation for older browser support.
|
|
6
|
+
|
|
7
|
+
Check the detailed [documentation](https://developers.archilogic.com/floor-plan-engine/guide).
|
|
8
|
+
|
|
5
9
|
## Install
|
|
6
10
|
|
|
7
11
|
```bash
|
|
@@ -34,5 +38,3 @@ import { FloorPlanEngine } from 'https://esm.sh/@archilogic/floor-plan-sdk'
|
|
|
34
38
|
const { FloorPlanEngine } = FloorPlanSdk
|
|
35
39
|
</script>
|
|
36
40
|
```
|
|
37
|
-
|
|
38
|
-
Check the detailed [documentation](https://developers.archilogic.com/floor-plan-engine/guide).
|
package/dist/fpe.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Container } from '@pixi/display';
|
|
2
1
|
import { default as default_2 } from 'rbush';
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -68,8 +67,65 @@ declare type BackgroundOptions = {
|
|
|
68
67
|
showGrid?: boolean;
|
|
69
68
|
};
|
|
70
69
|
|
|
70
|
+
declare interface BaseData {
|
|
71
|
+
id: string;
|
|
72
|
+
name: string;
|
|
73
|
+
type: string;
|
|
74
|
+
customId: string;
|
|
75
|
+
customAttributes: SpaceGraphCustomAttributeValue;
|
|
76
|
+
/** dimensions in meters */
|
|
77
|
+
dimensions: {
|
|
78
|
+
width: number;
|
|
79
|
+
length: number;
|
|
80
|
+
height: number;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* axis alignend bounding box in root space
|
|
84
|
+
* @example
|
|
85
|
+
* {
|
|
86
|
+
* min: [0, 0, 0],
|
|
87
|
+
* max: [1, 2, 1]
|
|
88
|
+
* }
|
|
89
|
+
* */
|
|
90
|
+
boundingBox: BoundingBox3d;
|
|
91
|
+
/** contour of the object aligned bounding box in root space */
|
|
92
|
+
boundingBoxContour: Polygon_2;
|
|
93
|
+
labelPoint: Vector2_2;
|
|
94
|
+
contour: PolygonWithHoles_2;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
declare interface BaseFilter {
|
|
98
|
+
id?: StringComparator;
|
|
99
|
+
type?: StringComparator;
|
|
100
|
+
name?: StringComparator | NullComparator;
|
|
101
|
+
customId?: StringComparator | NullComparator;
|
|
102
|
+
customAttributes?: Record<string, StringComparator | NumberComparator | BooleanComparator | NullComparator>;
|
|
103
|
+
dimensions?: {
|
|
104
|
+
width?: NumberComparator;
|
|
105
|
+
length?: NumberComparator;
|
|
106
|
+
height?: NumberComparator;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
71
110
|
declare type BaseLayers = 'base' | 'scene' | 'preview' | 'annotation' | 'helper';
|
|
72
111
|
|
|
112
|
+
declare interface BaseSelect {
|
|
113
|
+
id?: boolean;
|
|
114
|
+
type?: boolean;
|
|
115
|
+
name?: boolean;
|
|
116
|
+
customId?: boolean;
|
|
117
|
+
customAttributes?: boolean | Record<string, boolean>;
|
|
118
|
+
dimensions?: boolean | {
|
|
119
|
+
width?: boolean;
|
|
120
|
+
length?: boolean;
|
|
121
|
+
height?: boolean;
|
|
122
|
+
};
|
|
123
|
+
boundingBox?: boolean;
|
|
124
|
+
boundingBoxContour?: boolean;
|
|
125
|
+
labelPoint?: boolean;
|
|
126
|
+
contour?: boolean;
|
|
127
|
+
}
|
|
128
|
+
|
|
73
129
|
declare interface BaseShape {
|
|
74
130
|
type: string;
|
|
75
131
|
style?: ShapeStyle;
|
|
@@ -80,6 +136,12 @@ export declare interface BezierCurve extends BaseShape {
|
|
|
80
136
|
points: Polygon;
|
|
81
137
|
}
|
|
82
138
|
|
|
139
|
+
declare type BooleanComparator = boolean | {
|
|
140
|
+
eq: boolean;
|
|
141
|
+
} | {
|
|
142
|
+
neq: boolean;
|
|
143
|
+
};
|
|
144
|
+
|
|
83
145
|
export declare type BoundingBox2d = {
|
|
84
146
|
min: Vector2;
|
|
85
147
|
max: Vector2;
|
|
@@ -252,6 +314,11 @@ declare type CustomStairsParametersJson = Partial<CustomStairsParameters>;
|
|
|
252
314
|
|
|
253
315
|
declare type CustomStairsType = 'custom';
|
|
254
316
|
|
|
317
|
+
declare type DefaultSelect = {
|
|
318
|
+
id: true;
|
|
319
|
+
type: true;
|
|
320
|
+
};
|
|
321
|
+
|
|
255
322
|
declare type DimensionParameters = {
|
|
256
323
|
/** @minimum 0.01 */
|
|
257
324
|
length: number;
|
|
@@ -314,6 +381,54 @@ declare interface EdgeSplitReturnValue {
|
|
|
314
381
|
element?: LayoutEdgeElement;
|
|
315
382
|
}
|
|
316
383
|
|
|
384
|
+
export declare interface ElementData extends BaseData {
|
|
385
|
+
type: LayoutElementJson['type'];
|
|
386
|
+
isExternal: boolean;
|
|
387
|
+
parameters: LayoutElementJson['parameters'];
|
|
388
|
+
category: string;
|
|
389
|
+
subCategory: string;
|
|
390
|
+
product: ProductData;
|
|
391
|
+
/** local transform for nested elements like openings, windows */
|
|
392
|
+
localTransform: SimpleTransform3d;
|
|
393
|
+
/** transform in root space */
|
|
394
|
+
transform: SimpleTransform3d;
|
|
395
|
+
/** local object aligned bounding box */
|
|
396
|
+
localBoundingBox: BoundingBox3d;
|
|
397
|
+
elements: ElementData[];
|
|
398
|
+
parent: ElementData;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
export declare interface ElementFilter extends BaseFilter {
|
|
402
|
+
product?: ProductFilter;
|
|
403
|
+
category?: StringComparator;
|
|
404
|
+
subCategory?: StringComparator;
|
|
405
|
+
/** point query */
|
|
406
|
+
at?: Vector2_2;
|
|
407
|
+
/** 2d bounding box intersection */
|
|
408
|
+
within?: {
|
|
409
|
+
min: Vector2_2;
|
|
410
|
+
max: Vector2_2;
|
|
411
|
+
};
|
|
412
|
+
isExternal?: BooleanComparator;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
declare type ElementQuery = {
|
|
416
|
+
select?: ElementSelect;
|
|
417
|
+
where?: ElementFilter;
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
export declare interface ElementSelect extends BaseSelect {
|
|
421
|
+
product?: ProductSelect | boolean;
|
|
422
|
+
category?: boolean;
|
|
423
|
+
subCategory?: boolean;
|
|
424
|
+
isExternal?: boolean;
|
|
425
|
+
localBoundingBox?: boolean;
|
|
426
|
+
localTransform?: boolean;
|
|
427
|
+
transform?: boolean;
|
|
428
|
+
parent?: ElementSelect | boolean;
|
|
429
|
+
elements?: ElementQuery | boolean;
|
|
430
|
+
}
|
|
431
|
+
|
|
317
432
|
declare interface ExportImage {
|
|
318
433
|
/** output format: png, jpg */
|
|
319
434
|
format?: 'png' | 'jpg';
|
|
@@ -356,10 +471,9 @@ declare class FloorPlanCore {
|
|
|
356
471
|
computed: FpeComputed;
|
|
357
472
|
loader: FpeLoader;
|
|
358
473
|
layout: SpaceGraphLayout;
|
|
359
|
-
|
|
360
|
-
|
|
474
|
+
/* Excluded from this release type: spaceGraph */
|
|
475
|
+
/* Excluded from this release type: building */
|
|
361
476
|
isBrowser: boolean;
|
|
362
|
-
utils: any;
|
|
363
477
|
location: {
|
|
364
478
|
latitude: number;
|
|
365
479
|
longitude: number;
|
|
@@ -389,15 +503,37 @@ declare class FloorPlanCore {
|
|
|
389
503
|
* @returns {Promise.<Boolean, Error>} returns promise which resolves when loading is done
|
|
390
504
|
*/
|
|
391
505
|
loadFloorById(floorId: string, accessTokenOptions?: TokenOptions): Promise<boolean | Error>;
|
|
506
|
+
/**
|
|
507
|
+
* Load a layout with its unique identifier the layoutId
|
|
508
|
+
* @param {string} layoutId id of the floor to load
|
|
509
|
+
* @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
|
|
510
|
+
* @returns {Promise.<Boolean, Error>} returns promise which resolves when loading is done
|
|
511
|
+
*/
|
|
512
|
+
loadLayoutById(layoutId: string, accessTokenOptions?: TokenOptions): Promise<boolean | Error>;
|
|
392
513
|
/**
|
|
393
514
|
* Change options after the floor plan engine instance has been created
|
|
394
515
|
*/
|
|
395
516
|
set(args?: FpeConfig): void;
|
|
517
|
+
/* Excluded from this release type: updateThemeFilter */
|
|
396
518
|
getBoundingBox(margin?: number): BoundingBox2d;
|
|
519
|
+
getElements<S extends ElementSelect = DefaultSelect>(args?: {
|
|
520
|
+
select?: S;
|
|
521
|
+
where?: ElementFilter;
|
|
522
|
+
}): QueryPick<ElementData, S>[];
|
|
523
|
+
getElementsById<S extends ElementSelect = DefaultSelect>(args: {
|
|
524
|
+
select?: S;
|
|
525
|
+
id: string;
|
|
526
|
+
}): QueryPick<ElementData, S>;
|
|
527
|
+
getSpaces<S extends SpaceSelect = DefaultSelect>(args?: {
|
|
528
|
+
select?: S;
|
|
529
|
+
where?: SpaceFilter;
|
|
530
|
+
}): QueryPick<SpaceData, S>[];
|
|
531
|
+
getSpacesById<S extends SpaceSelect = DefaultSelect>(args: {
|
|
532
|
+
select?: S;
|
|
533
|
+
id: string;
|
|
534
|
+
}): QueryPick<SpaceData, S>;
|
|
397
535
|
/**
|
|
398
|
-
*
|
|
399
|
-
* @param {*} position - plan position
|
|
400
|
-
* @returns {Object} - list of spaces and assets
|
|
536
|
+
* @deprecated getResourcesFromPosition is deprecated and will be removed in the next version. use `floorPlan.getElements({ where: { at: [1, 4 ]}})`
|
|
401
537
|
*/
|
|
402
538
|
getResourcesFromPosition(position: Vector2): {
|
|
403
539
|
spaces: LayoutSpace[];
|
|
@@ -417,13 +553,15 @@ export declare class FloorPlanEngine extends FloorPlanCore {
|
|
|
417
553
|
fpeNode?: HTMLElement;
|
|
418
554
|
view: WebGlView;
|
|
419
555
|
interaction: FpeInteraction;
|
|
556
|
+
/** @deprecated the layout property is deprecated and will be removed in the next version. use `floorPlan.getElements()` or `floorPlan.getSpaces()` */
|
|
557
|
+
layout: SpaceGraphLayout;
|
|
420
558
|
availableHelpers: {
|
|
421
559
|
[name: string]: typeof Helper;
|
|
422
560
|
};
|
|
423
561
|
helper: {
|
|
424
562
|
[name: string]: Helper;
|
|
425
563
|
};
|
|
426
|
-
|
|
564
|
+
/* Excluded from this release type: preventUpdateOnSpaceGraphEvent */
|
|
427
565
|
constructor({ container, options }?: {
|
|
428
566
|
container?: Element;
|
|
429
567
|
options?: FpeConfig;
|
|
@@ -442,7 +580,7 @@ export declare class FloorPlanEngine extends FloorPlanCore {
|
|
|
442
580
|
*/
|
|
443
581
|
off<EventType extends FpeEvent, Context>(event: EventType, handler?: FpeEventHandler<EventType>, ctx?: Context): this;
|
|
444
582
|
emit<EventType extends FpeEvent>(event: EventType, ...args: FpeEventMap[EventType]): this;
|
|
445
|
-
|
|
583
|
+
/* Excluded from this release type: handleDrop */
|
|
446
584
|
/**
|
|
447
585
|
* Change options after the floor plan engine instance has been created
|
|
448
586
|
* @param args - Startup options
|
|
@@ -450,14 +588,12 @@ export declare class FloorPlanEngine extends FloorPlanCore {
|
|
|
450
588
|
set(args: FpeConfig): void;
|
|
451
589
|
drawNodePreview(id: string, layout: SpaceGraphLayout, layer: PlanLayer, style?: ShapeStyle): void;
|
|
452
590
|
drawNodeUpdate(id: string, style?: 'selected' | ShapeStyle | false): void;
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
freeDrawingEvents(): void;
|
|
460
|
-
generateUi(): void;
|
|
591
|
+
/* Excluded from this release type: drawResourceUpdate */
|
|
592
|
+
/* Excluded from this release type: mountFloorPlan */
|
|
593
|
+
/* Excluded from this release type: initDrawing */
|
|
594
|
+
/* Excluded from this release type: initDrawingEvents */
|
|
595
|
+
/* Excluded from this release type: freeDrawingEvents */
|
|
596
|
+
/* Excluded from this release type: generateUi */
|
|
461
597
|
/**
|
|
462
598
|
* Get a bounding box containing the layout, with some padding
|
|
463
599
|
* @param layoutBoundingBox - bounding box of the layout, in meters.
|
|
@@ -531,12 +667,6 @@ export declare class FloorPlanEngine extends FloorPlanCore {
|
|
|
531
667
|
* get plan layer by name
|
|
532
668
|
*/
|
|
533
669
|
getLayer(id: any): PlanLayer;
|
|
534
|
-
/**
|
|
535
|
-
* create plan graphic
|
|
536
|
-
* @deprecated use floorPlan.addLayer(<name>)
|
|
537
|
-
* @returns
|
|
538
|
-
*/
|
|
539
|
-
addPlanGraphic(): PlanLayer;
|
|
540
670
|
/**
|
|
541
671
|
* Adds a helper and removes previous instances of it
|
|
542
672
|
*/
|
|
@@ -555,7 +685,7 @@ export declare class FloorPlanEngine extends FloorPlanCore {
|
|
|
555
685
|
/**
|
|
556
686
|
* This is the place to give the floor plan your own style
|
|
557
687
|
*/
|
|
558
|
-
declare type FloorPlanTheme = {
|
|
688
|
+
export declare type FloorPlanTheme = {
|
|
559
689
|
/** define the background */
|
|
560
690
|
background?: BackgroundOptions;
|
|
561
691
|
/** wall contours are merged to one continuous outline, needed if you want white walls */
|
|
@@ -563,43 +693,20 @@ declare type FloorPlanTheme = {
|
|
|
563
693
|
/** render assets with textures rather than solid colors */
|
|
564
694
|
showAssetTextures?: boolean;
|
|
565
695
|
fontFamily?: string;
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
text?: Rgb;
|
|
576
|
-
/** whether the room stamp text should have an outline to assist with contrast issues */
|
|
577
|
-
textOutline?: boolean;
|
|
578
|
-
};
|
|
579
|
-
'element:asset'?: ShapeStyle;
|
|
580
|
-
'element:beam'?: ShapeStyle;
|
|
581
|
-
'element:boundaryWall'?: ShapeStyle;
|
|
582
|
-
'element:casework'?: ShapeStyle;
|
|
583
|
-
'element:ceiling'?: ShapeStyle;
|
|
584
|
-
'element:column'?: ShapeStyle;
|
|
585
|
-
'element:curtainWall'?: ShapeStyle;
|
|
586
|
-
'element:door'?: ShapeStyle;
|
|
587
|
-
'element:floor'?: ShapeStyle;
|
|
588
|
-
'element:generic'?: ShapeStyle;
|
|
589
|
-
'element:kitchen'?: ShapeStyle;
|
|
590
|
-
'element:opening'?: ShapeStyle;
|
|
591
|
-
'element:railing'?: ShapeStyle;
|
|
592
|
-
'element:ramp'?: ShapeStyle;
|
|
593
|
-
'element:roof'?: ShapeStyle;
|
|
594
|
-
'element:slab'?: ShapeStyle;
|
|
595
|
-
'element:spaceDivider'?: ShapeStyle;
|
|
596
|
-
'element:stairFlight'?: ShapeStyle;
|
|
597
|
-
'element:stairs'?: ShapeStyle;
|
|
598
|
-
'element:wall'?: ShapeStyle;
|
|
599
|
-
'element:window'?: ShapeStyle;
|
|
600
|
-
'layout:space'?: SpaceShapeStyle;
|
|
601
|
-
'spatialGraph:edge'?: ShapeStyle;
|
|
696
|
+
roomStamps?: {
|
|
697
|
+
/** show the area information in room stamps */
|
|
698
|
+
roomStampDisplay?: ('usage' | 'area' | 'customId' | 'name' | 'id' | ['customAttribute', string])[];
|
|
699
|
+
/** text color for room stamps */
|
|
700
|
+
text?: Rgb;
|
|
701
|
+
/** whether the room stamp text should have an outline to assist with contrast issues */
|
|
702
|
+
textOutline?: boolean;
|
|
703
|
+
/** if set room stamps have a fixed size - otherwise they adapt to the zoom level */
|
|
704
|
+
fontSize?: number;
|
|
602
705
|
};
|
|
706
|
+
byId?: StyleByKey;
|
|
707
|
+
byFilter?: ThemeStyles['byFilter'];
|
|
708
|
+
/* Excluded from this release type: byResolvedFilter */
|
|
709
|
+
byType?: ThemeStyles['byType'];
|
|
603
710
|
};
|
|
604
711
|
|
|
605
712
|
declare type FpeComputed = {
|
|
@@ -2254,6 +2361,28 @@ declare type NodesByType<NodeMap extends NodeTypeMap = {}> = {
|
|
|
2254
2361
|
|
|
2255
2362
|
declare type NodeTypeMap = Record<string, any>;
|
|
2256
2363
|
|
|
2364
|
+
declare type NullComparator = {
|
|
2365
|
+
null: boolean;
|
|
2366
|
+
};
|
|
2367
|
+
|
|
2368
|
+
declare type NumberComparator = number | {
|
|
2369
|
+
eq: number;
|
|
2370
|
+
} | {
|
|
2371
|
+
neq: number;
|
|
2372
|
+
} | {
|
|
2373
|
+
in: number[];
|
|
2374
|
+
} | {
|
|
2375
|
+
nin: number[];
|
|
2376
|
+
} | {
|
|
2377
|
+
gt: number;
|
|
2378
|
+
} | {
|
|
2379
|
+
gte: number;
|
|
2380
|
+
} | {
|
|
2381
|
+
lt: number;
|
|
2382
|
+
} | {
|
|
2383
|
+
lte: number;
|
|
2384
|
+
};
|
|
2385
|
+
|
|
2257
2386
|
declare interface NumberList extends SpaceGraphTypedValueJson {
|
|
2258
2387
|
type: 'number:list';
|
|
2259
2388
|
list: number[];
|
|
@@ -2378,6 +2507,8 @@ declare class PlanLayer {
|
|
|
2378
2507
|
|
|
2379
2508
|
export declare type Polygon = Vector2[];
|
|
2380
2509
|
|
|
2510
|
+
declare type Polygon_2 = Vector2_2[];
|
|
2511
|
+
|
|
2381
2512
|
export declare interface PolygonCurve extends BaseShape {
|
|
2382
2513
|
type: 'curve:polygon';
|
|
2383
2514
|
points: Polygon;
|
|
@@ -2395,6 +2526,8 @@ declare const PolygonCurveTypeValue = "curve:polygon";
|
|
|
2395
2526
|
/** outer ring counter clockwise, inner rings ( holes ) clockwise */
|
|
2396
2527
|
export declare type PolygonWithHoles = Polygon[];
|
|
2397
2528
|
|
|
2529
|
+
declare type PolygonWithHoles_2 = Vector2_2[][];
|
|
2530
|
+
|
|
2398
2531
|
export declare interface PolygonWithHolesCurve extends BaseShape {
|
|
2399
2532
|
type: 'curve:polygonWithHoles';
|
|
2400
2533
|
polygons: PolygonWithHoles;
|
|
@@ -2425,8 +2558,33 @@ declare const PolylineCurveTypeValue = "curve:polyline";
|
|
|
2425
2558
|
|
|
2426
2559
|
declare type PositionEntry = Vector3 | Vector3List | Vector3Range;
|
|
2427
2560
|
|
|
2561
|
+
export declare type PreserveViewbox = 'left-top' | 'left-center' | 'left-bottom' | 'center-top' | 'center-center' | 'center-bottom' | 'right-top' | 'right-center' | 'right-bottom' | 'screen-space';
|
|
2562
|
+
|
|
2428
2563
|
declare type ProductAttributes = SpaceGraphProduct['attributes'];
|
|
2429
2564
|
|
|
2565
|
+
declare interface ProductData extends BaseData {
|
|
2566
|
+
type: SpaceGraphProduct['type'];
|
|
2567
|
+
category: string;
|
|
2568
|
+
subCategory: string;
|
|
2569
|
+
seatCapacity: number;
|
|
2570
|
+
}
|
|
2571
|
+
|
|
2572
|
+
declare interface ProductFilter extends BaseFilter {
|
|
2573
|
+
category?: StringComparator;
|
|
2574
|
+
subCategory?: StringComparator;
|
|
2575
|
+
seatCapacity?: NumberComparator;
|
|
2576
|
+
}
|
|
2577
|
+
|
|
2578
|
+
declare interface ProductSelect extends BaseSelect {
|
|
2579
|
+
category?: boolean;
|
|
2580
|
+
subCategory?: boolean;
|
|
2581
|
+
seatCapacity?: boolean;
|
|
2582
|
+
}
|
|
2583
|
+
|
|
2584
|
+
export declare type QueryPick<T, S> = {
|
|
2585
|
+
[K in keyof S as S[K] extends false | undefined ? never : K]: K extends keyof T ? S[K] extends true ? T[K] : S[K] extends ElementQuery ? QueryPick<ElementData, S[K]['select'] extends undefined ? DefaultSelect : NonNullable<S[K]['select']>>[] : S[K] extends object ? T[K] extends any[] ? QueryPick<T[K][number], S[K]>[] : QueryPick<T[K], S[K]> : never : never;
|
|
2586
|
+
};
|
|
2587
|
+
|
|
2430
2588
|
export declare interface RectangleCurve extends BaseShape {
|
|
2431
2589
|
type: 'curve:rectangle';
|
|
2432
2590
|
position: Vector2;
|
|
@@ -2515,6 +2673,36 @@ declare interface ShapeStyle {
|
|
|
2515
2673
|
alignment?: 0 | 0.5 | 1;
|
|
2516
2674
|
}
|
|
2517
2675
|
|
|
2676
|
+
declare type SimpleTransform3d = {
|
|
2677
|
+
position: Vector3;
|
|
2678
|
+
rotation: number;
|
|
2679
|
+
};
|
|
2680
|
+
|
|
2681
|
+
export declare interface SpaceData extends BaseData {
|
|
2682
|
+
type: LayoutSpaceJson['type'];
|
|
2683
|
+
isExternal: boolean;
|
|
2684
|
+
category: string;
|
|
2685
|
+
subCategory: string;
|
|
2686
|
+
seatCapacity: number;
|
|
2687
|
+
area: number;
|
|
2688
|
+
elements: ElementData[];
|
|
2689
|
+
}
|
|
2690
|
+
|
|
2691
|
+
export declare interface SpaceFilter extends BaseFilter {
|
|
2692
|
+
category?: StringComparator;
|
|
2693
|
+
subCategory?: StringComparator;
|
|
2694
|
+
seatCapacity?: NumberComparator;
|
|
2695
|
+
isExternal?: BooleanComparator;
|
|
2696
|
+
area?: NumberComparator;
|
|
2697
|
+
/** point query */
|
|
2698
|
+
at?: Vector2_2;
|
|
2699
|
+
/** 2d bounding box intersection */
|
|
2700
|
+
within?: {
|
|
2701
|
+
min: Vector2_2;
|
|
2702
|
+
max: Vector2_2;
|
|
2703
|
+
};
|
|
2704
|
+
}
|
|
2705
|
+
|
|
2518
2706
|
declare class SpaceGraph {
|
|
2519
2707
|
spatialStructure: SpaceGraphSpatialStructure;
|
|
2520
2708
|
products: SpaceGraphProduct[];
|
|
@@ -3154,13 +3342,13 @@ declare type SpaceLabelMapping = {
|
|
|
3154
3342
|
[label: string]: string;
|
|
3155
3343
|
};
|
|
3156
3344
|
|
|
3157
|
-
declare interface
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3345
|
+
export declare interface SpaceSelect extends BaseSelect {
|
|
3346
|
+
category?: boolean;
|
|
3347
|
+
subCategory?: boolean;
|
|
3348
|
+
isExternal?: boolean;
|
|
3349
|
+
area?: boolean;
|
|
3350
|
+
seatCapacity?: boolean;
|
|
3351
|
+
elements?: ElementQuery | boolean;
|
|
3164
3352
|
}
|
|
3165
3353
|
|
|
3166
3354
|
declare class SpatialGraphEdge extends SpatialGraphNodeBase {
|
|
@@ -3312,13 +3500,21 @@ declare type SpiralStairsType = 'spiral';
|
|
|
3312
3500
|
declare interface StartupOptions {
|
|
3313
3501
|
/** do not render elements of given types (e.g. 'element:asset', 'element:door', …), or 'roomStamp' */
|
|
3314
3502
|
hideElements?: HideableElement[];
|
|
3315
|
-
|
|
3503
|
+
/**
|
|
3504
|
+
* Controls how the viewport adjusts when the canvas container is resized.
|
|
3505
|
+
*
|
|
3506
|
+
* Alignment pairs anchor the viewport to a fixed point within the canvas:
|
|
3507
|
+
* - `'center-center'` (default), `'left-top'`, `'right-top'`, `'left-bottom'`, `'right-bottom'`
|
|
3508
|
+
*
|
|
3509
|
+
* Screen-space mode keeps the floor plan at the same absolute screen position:
|
|
3510
|
+
* - `'screen-space'` – compensates for the canvas element moving on screen
|
|
3511
|
+
* (e.g. when a sidebar opens/closes) so the plan stays visually stationary.
|
|
3512
|
+
*/
|
|
3513
|
+
preserveViewbox?: PreserveViewbox;
|
|
3316
3514
|
/** option to disable panning and zooming */
|
|
3317
3515
|
panZoom?: boolean;
|
|
3318
3516
|
/** if set, panning and zooming is restricted to the scene boundingbox plus the margin */
|
|
3319
3517
|
panZoomMargin?: number;
|
|
3320
|
-
/** if set room stamps have a fixed size - otherwise they adapt to the zoom level */
|
|
3321
|
-
roomStampSize?: number;
|
|
3322
3518
|
/** toggle overlaying UI elements */
|
|
3323
3519
|
ui?: UI;
|
|
3324
3520
|
/** floor plan theming */
|
|
@@ -3348,6 +3544,27 @@ declare type StraightStairsParametersJson = Partial<StraightStairsParameters>;
|
|
|
3348
3544
|
|
|
3349
3545
|
declare type StraightStairsType = 'straight' | 'straightLanding';
|
|
3350
3546
|
|
|
3547
|
+
declare type StringComparator = string | {
|
|
3548
|
+
eq: string;
|
|
3549
|
+
} | {
|
|
3550
|
+
neq: string;
|
|
3551
|
+
} | {
|
|
3552
|
+
in: string[];
|
|
3553
|
+
} | {
|
|
3554
|
+
nin: string[];
|
|
3555
|
+
} | {
|
|
3556
|
+
contains: string;
|
|
3557
|
+
};
|
|
3558
|
+
|
|
3559
|
+
declare type StyleByKey = Record<string, ShapeStyle>;
|
|
3560
|
+
|
|
3561
|
+
declare type StyledFilter = {
|
|
3562
|
+
where: ElementFilter | SpaceFilter;
|
|
3563
|
+
style: ShapeStyle;
|
|
3564
|
+
};
|
|
3565
|
+
|
|
3566
|
+
declare type StyleFilter = StyledFilter;
|
|
3567
|
+
|
|
3351
3568
|
declare interface SurfaceMaterials {
|
|
3352
3569
|
[surface: string]: SpaceGraphMaterial;
|
|
3353
3570
|
}
|
|
@@ -3410,6 +3627,39 @@ declare enum TextureFilter {
|
|
|
3410
3627
|
Grayscale = 2
|
|
3411
3628
|
}
|
|
3412
3629
|
|
|
3630
|
+
declare type ThemeStyles = {
|
|
3631
|
+
byId?: StyleByKey;
|
|
3632
|
+
byType?: {
|
|
3633
|
+
'element:asset'?: ShapeStyle;
|
|
3634
|
+
'element:beam'?: ShapeStyle;
|
|
3635
|
+
'element:boundaryWall'?: ShapeStyle;
|
|
3636
|
+
'element:casework'?: ShapeStyle;
|
|
3637
|
+
'element:ceiling'?: ShapeStyle;
|
|
3638
|
+
'element:column'?: ShapeStyle;
|
|
3639
|
+
'element:curtainWall'?: ShapeStyle;
|
|
3640
|
+
'element:door'?: ShapeStyle;
|
|
3641
|
+
'element:floor'?: ShapeStyle;
|
|
3642
|
+
'element:generic'?: ShapeStyle;
|
|
3643
|
+
'element:kitchen'?: ShapeStyle;
|
|
3644
|
+
'element:opening'?: ShapeStyle;
|
|
3645
|
+
'element:railing'?: ShapeStyle;
|
|
3646
|
+
'element:ramp'?: ShapeStyle;
|
|
3647
|
+
'element:roof'?: ShapeStyle;
|
|
3648
|
+
'element:slab'?: ShapeStyle;
|
|
3649
|
+
'element:spaceDivider'?: ShapeStyle;
|
|
3650
|
+
'element:stairFlight'?: ShapeStyle;
|
|
3651
|
+
'element:stairs'?: ShapeStyle;
|
|
3652
|
+
'element:wall'?: ShapeStyle;
|
|
3653
|
+
'element:window'?: ShapeStyle;
|
|
3654
|
+
'layout:space'?: ShapeStyle;
|
|
3655
|
+
'spatialGraph:edge'?: ShapeStyle;
|
|
3656
|
+
'annotation:floorPlanImage'?: ShapeStyle & {
|
|
3657
|
+
grayscale?: boolean;
|
|
3658
|
+
};
|
|
3659
|
+
};
|
|
3660
|
+
byFilter?: StyleFilter[];
|
|
3661
|
+
};
|
|
3662
|
+
|
|
3413
3663
|
declare class Ticker {
|
|
3414
3664
|
methods: {
|
|
3415
3665
|
[name: string]: {
|
|
@@ -3512,7 +3762,7 @@ export declare type Vector2 = [number, number];
|
|
|
3512
3762
|
|
|
3513
3763
|
declare type Vector2_2 = [number, number];
|
|
3514
3764
|
|
|
3515
|
-
declare type Vector3 = [number, number, number];
|
|
3765
|
+
export declare type Vector3 = [number, number, number];
|
|
3516
3766
|
|
|
3517
3767
|
declare interface Vector3List extends SpaceGraphTypedValueJson {
|
|
3518
3768
|
type: 'vector3:list';
|
|
@@ -3542,10 +3792,10 @@ declare class WebGlView extends TinyEmitter {
|
|
|
3542
3792
|
viewportInFocus: boolean;
|
|
3543
3793
|
wallNodesToUpdate: any[];
|
|
3544
3794
|
wallNodeUpdateInProgress: boolean;
|
|
3545
|
-
|
|
3795
|
+
/* Excluded from this release type: floorContainers */
|
|
3546
3796
|
roomStampLayers: Map<string, PlanLayer>;
|
|
3547
3797
|
parentEl: HTMLElement;
|
|
3548
|
-
|
|
3798
|
+
/* Excluded from this release type: _settings */
|
|
3549
3799
|
/* Excluded from this release type: gfxLayers */
|
|
3550
3800
|
redrawScene: () => void;
|
|
3551
3801
|
/* Excluded from this release type: gfxNodes */
|
|
@@ -3557,7 +3807,9 @@ declare class WebGlView extends TinyEmitter {
|
|
|
3557
3807
|
/* Excluded from this release type: _zoomTarget */
|
|
3558
3808
|
_oldTime: number;
|
|
3559
3809
|
ticker?: Ticker;
|
|
3810
|
+
_lastCanvasRect?: DOMRect;
|
|
3560
3811
|
_resizeObserver?: ResizeObserver;
|
|
3812
|
+
_resizeRafId: number | null;
|
|
3561
3813
|
on: (event: ViewEvent, callback: Function, ctx?: any) => this;
|
|
3562
3814
|
once: (event: ViewEvent, callback: Function, ctx?: any) => this;
|
|
3563
3815
|
off: (event: ViewEvent, callback?: Function) => this;
|