@archilogic/floor-plan-sdk 5.1.17 → 5.2.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/README.md +4 -2
- package/dist/fpe.d.ts +329 -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 = {
|
|
@@ -999,6 +1106,7 @@ declare class HtmlMarker {
|
|
|
999
1106
|
el: HTMLElement;
|
|
1000
1107
|
private _floorPlan;
|
|
1001
1108
|
private _anchorPos;
|
|
1109
|
+
private _isPanning;
|
|
1002
1110
|
constructor({ position, offset, el, floorPlan }: HtmlMarkerState);
|
|
1003
1111
|
_updateHtmlMarker: () => void;
|
|
1004
1112
|
_updateHtmlMarkerStyle(): void;
|
|
@@ -2254,6 +2362,28 @@ declare type NodesByType<NodeMap extends NodeTypeMap = {}> = {
|
|
|
2254
2362
|
|
|
2255
2363
|
declare type NodeTypeMap = Record<string, any>;
|
|
2256
2364
|
|
|
2365
|
+
declare type NullComparator = {
|
|
2366
|
+
null: boolean;
|
|
2367
|
+
};
|
|
2368
|
+
|
|
2369
|
+
declare type NumberComparator = number | {
|
|
2370
|
+
eq: number;
|
|
2371
|
+
} | {
|
|
2372
|
+
neq: number;
|
|
2373
|
+
} | {
|
|
2374
|
+
in: number[];
|
|
2375
|
+
} | {
|
|
2376
|
+
nin: number[];
|
|
2377
|
+
} | {
|
|
2378
|
+
gt: number;
|
|
2379
|
+
} | {
|
|
2380
|
+
gte: number;
|
|
2381
|
+
} | {
|
|
2382
|
+
lt: number;
|
|
2383
|
+
} | {
|
|
2384
|
+
lte: number;
|
|
2385
|
+
};
|
|
2386
|
+
|
|
2257
2387
|
declare interface NumberList extends SpaceGraphTypedValueJson {
|
|
2258
2388
|
type: 'number:list';
|
|
2259
2389
|
list: number[];
|
|
@@ -2378,6 +2508,8 @@ declare class PlanLayer {
|
|
|
2378
2508
|
|
|
2379
2509
|
export declare type Polygon = Vector2[];
|
|
2380
2510
|
|
|
2511
|
+
declare type Polygon_2 = Vector2_2[];
|
|
2512
|
+
|
|
2381
2513
|
export declare interface PolygonCurve extends BaseShape {
|
|
2382
2514
|
type: 'curve:polygon';
|
|
2383
2515
|
points: Polygon;
|
|
@@ -2395,6 +2527,8 @@ declare const PolygonCurveTypeValue = "curve:polygon";
|
|
|
2395
2527
|
/** outer ring counter clockwise, inner rings ( holes ) clockwise */
|
|
2396
2528
|
export declare type PolygonWithHoles = Polygon[];
|
|
2397
2529
|
|
|
2530
|
+
declare type PolygonWithHoles_2 = Vector2_2[][];
|
|
2531
|
+
|
|
2398
2532
|
export declare interface PolygonWithHolesCurve extends BaseShape {
|
|
2399
2533
|
type: 'curve:polygonWithHoles';
|
|
2400
2534
|
polygons: PolygonWithHoles;
|
|
@@ -2425,8 +2559,33 @@ declare const PolylineCurveTypeValue = "curve:polyline";
|
|
|
2425
2559
|
|
|
2426
2560
|
declare type PositionEntry = Vector3 | Vector3List | Vector3Range;
|
|
2427
2561
|
|
|
2562
|
+
export declare type PreserveViewbox = 'left-top' | 'left-center' | 'left-bottom' | 'center-top' | 'center-center' | 'center-bottom' | 'right-top' | 'right-center' | 'right-bottom' | 'screen-space';
|
|
2563
|
+
|
|
2428
2564
|
declare type ProductAttributes = SpaceGraphProduct['attributes'];
|
|
2429
2565
|
|
|
2566
|
+
declare interface ProductData extends BaseData {
|
|
2567
|
+
type: SpaceGraphProduct['type'];
|
|
2568
|
+
category: string;
|
|
2569
|
+
subCategory: string;
|
|
2570
|
+
seatCapacity: number;
|
|
2571
|
+
}
|
|
2572
|
+
|
|
2573
|
+
declare interface ProductFilter extends BaseFilter {
|
|
2574
|
+
category?: StringComparator;
|
|
2575
|
+
subCategory?: StringComparator;
|
|
2576
|
+
seatCapacity?: NumberComparator;
|
|
2577
|
+
}
|
|
2578
|
+
|
|
2579
|
+
declare interface ProductSelect extends BaseSelect {
|
|
2580
|
+
category?: boolean;
|
|
2581
|
+
subCategory?: boolean;
|
|
2582
|
+
seatCapacity?: boolean;
|
|
2583
|
+
}
|
|
2584
|
+
|
|
2585
|
+
export declare type QueryPick<T, S> = {
|
|
2586
|
+
[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;
|
|
2587
|
+
};
|
|
2588
|
+
|
|
2430
2589
|
export declare interface RectangleCurve extends BaseShape {
|
|
2431
2590
|
type: 'curve:rectangle';
|
|
2432
2591
|
position: Vector2;
|
|
@@ -2515,6 +2674,36 @@ declare interface ShapeStyle {
|
|
|
2515
2674
|
alignment?: 0 | 0.5 | 1;
|
|
2516
2675
|
}
|
|
2517
2676
|
|
|
2677
|
+
declare type SimpleTransform3d = {
|
|
2678
|
+
position: Vector3;
|
|
2679
|
+
rotation: number;
|
|
2680
|
+
};
|
|
2681
|
+
|
|
2682
|
+
export declare interface SpaceData extends BaseData {
|
|
2683
|
+
type: LayoutSpaceJson['type'];
|
|
2684
|
+
isExternal: boolean;
|
|
2685
|
+
category: string;
|
|
2686
|
+
subCategory: string;
|
|
2687
|
+
seatCapacity: number;
|
|
2688
|
+
area: number;
|
|
2689
|
+
elements: ElementData[];
|
|
2690
|
+
}
|
|
2691
|
+
|
|
2692
|
+
export declare interface SpaceFilter extends BaseFilter {
|
|
2693
|
+
category?: StringComparator;
|
|
2694
|
+
subCategory?: StringComparator;
|
|
2695
|
+
seatCapacity?: NumberComparator;
|
|
2696
|
+
isExternal?: BooleanComparator;
|
|
2697
|
+
area?: NumberComparator;
|
|
2698
|
+
/** point query */
|
|
2699
|
+
at?: Vector2_2;
|
|
2700
|
+
/** 2d bounding box intersection */
|
|
2701
|
+
within?: {
|
|
2702
|
+
min: Vector2_2;
|
|
2703
|
+
max: Vector2_2;
|
|
2704
|
+
};
|
|
2705
|
+
}
|
|
2706
|
+
|
|
2518
2707
|
declare class SpaceGraph {
|
|
2519
2708
|
spatialStructure: SpaceGraphSpatialStructure;
|
|
2520
2709
|
products: SpaceGraphProduct[];
|
|
@@ -3154,13 +3343,13 @@ declare type SpaceLabelMapping = {
|
|
|
3154
3343
|
[label: string]: string;
|
|
3155
3344
|
};
|
|
3156
3345
|
|
|
3157
|
-
declare interface
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3346
|
+
export declare interface SpaceSelect extends BaseSelect {
|
|
3347
|
+
category?: boolean;
|
|
3348
|
+
subCategory?: boolean;
|
|
3349
|
+
isExternal?: boolean;
|
|
3350
|
+
area?: boolean;
|
|
3351
|
+
seatCapacity?: boolean;
|
|
3352
|
+
elements?: ElementQuery | boolean;
|
|
3164
3353
|
}
|
|
3165
3354
|
|
|
3166
3355
|
declare class SpatialGraphEdge extends SpatialGraphNodeBase {
|
|
@@ -3312,13 +3501,21 @@ declare type SpiralStairsType = 'spiral';
|
|
|
3312
3501
|
declare interface StartupOptions {
|
|
3313
3502
|
/** do not render elements of given types (e.g. 'element:asset', 'element:door', …), or 'roomStamp' */
|
|
3314
3503
|
hideElements?: HideableElement[];
|
|
3315
|
-
|
|
3504
|
+
/**
|
|
3505
|
+
* Controls how the viewport adjusts when the canvas container is resized.
|
|
3506
|
+
*
|
|
3507
|
+
* Alignment pairs anchor the viewport to a fixed point within the canvas:
|
|
3508
|
+
* - `'center-center'` (default), `'left-top'`, `'right-top'`, `'left-bottom'`, `'right-bottom'`
|
|
3509
|
+
*
|
|
3510
|
+
* Screen-space mode keeps the floor plan at the same absolute screen position:
|
|
3511
|
+
* - `'screen-space'` – compensates for the canvas element moving on screen
|
|
3512
|
+
* (e.g. when a sidebar opens/closes) so the plan stays visually stationary.
|
|
3513
|
+
*/
|
|
3514
|
+
preserveViewbox?: PreserveViewbox;
|
|
3316
3515
|
/** option to disable panning and zooming */
|
|
3317
3516
|
panZoom?: boolean;
|
|
3318
3517
|
/** if set, panning and zooming is restricted to the scene boundingbox plus the margin */
|
|
3319
3518
|
panZoomMargin?: number;
|
|
3320
|
-
/** if set room stamps have a fixed size - otherwise they adapt to the zoom level */
|
|
3321
|
-
roomStampSize?: number;
|
|
3322
3519
|
/** toggle overlaying UI elements */
|
|
3323
3520
|
ui?: UI;
|
|
3324
3521
|
/** floor plan theming */
|
|
@@ -3348,6 +3545,27 @@ declare type StraightStairsParametersJson = Partial<StraightStairsParameters>;
|
|
|
3348
3545
|
|
|
3349
3546
|
declare type StraightStairsType = 'straight' | 'straightLanding';
|
|
3350
3547
|
|
|
3548
|
+
declare type StringComparator = string | {
|
|
3549
|
+
eq: string;
|
|
3550
|
+
} | {
|
|
3551
|
+
neq: string;
|
|
3552
|
+
} | {
|
|
3553
|
+
in: string[];
|
|
3554
|
+
} | {
|
|
3555
|
+
nin: string[];
|
|
3556
|
+
} | {
|
|
3557
|
+
contains: string;
|
|
3558
|
+
};
|
|
3559
|
+
|
|
3560
|
+
declare type StyleByKey = Record<string, ShapeStyle>;
|
|
3561
|
+
|
|
3562
|
+
declare type StyledFilter = {
|
|
3563
|
+
where: ElementFilter | SpaceFilter;
|
|
3564
|
+
style: ShapeStyle;
|
|
3565
|
+
};
|
|
3566
|
+
|
|
3567
|
+
declare type StyleFilter = StyledFilter;
|
|
3568
|
+
|
|
3351
3569
|
declare interface SurfaceMaterials {
|
|
3352
3570
|
[surface: string]: SpaceGraphMaterial;
|
|
3353
3571
|
}
|
|
@@ -3386,6 +3604,8 @@ declare type TextureData = {
|
|
|
3386
3604
|
applyFilter: TextureFilter;
|
|
3387
3605
|
texture?: any;
|
|
3388
3606
|
contourTexture?: any;
|
|
3607
|
+
themeOverlayTexture?: any;
|
|
3608
|
+
themeOverlayStyleKey?: string;
|
|
3389
3609
|
imageData?: any;
|
|
3390
3610
|
error?: {
|
|
3391
3611
|
message: string;
|
|
@@ -3410,6 +3630,39 @@ declare enum TextureFilter {
|
|
|
3410
3630
|
Grayscale = 2
|
|
3411
3631
|
}
|
|
3412
3632
|
|
|
3633
|
+
declare type ThemeStyles = {
|
|
3634
|
+
byId?: StyleByKey;
|
|
3635
|
+
byType?: {
|
|
3636
|
+
'element:asset'?: ShapeStyle;
|
|
3637
|
+
'element:beam'?: ShapeStyle;
|
|
3638
|
+
'element:boundaryWall'?: ShapeStyle;
|
|
3639
|
+
'element:casework'?: ShapeStyle;
|
|
3640
|
+
'element:ceiling'?: ShapeStyle;
|
|
3641
|
+
'element:column'?: ShapeStyle;
|
|
3642
|
+
'element:curtainWall'?: ShapeStyle;
|
|
3643
|
+
'element:door'?: ShapeStyle;
|
|
3644
|
+
'element:floor'?: ShapeStyle;
|
|
3645
|
+
'element:generic'?: ShapeStyle;
|
|
3646
|
+
'element:kitchen'?: ShapeStyle;
|
|
3647
|
+
'element:opening'?: ShapeStyle;
|
|
3648
|
+
'element:railing'?: ShapeStyle;
|
|
3649
|
+
'element:ramp'?: ShapeStyle;
|
|
3650
|
+
'element:roof'?: ShapeStyle;
|
|
3651
|
+
'element:slab'?: ShapeStyle;
|
|
3652
|
+
'element:spaceDivider'?: ShapeStyle;
|
|
3653
|
+
'element:stairFlight'?: ShapeStyle;
|
|
3654
|
+
'element:stairs'?: ShapeStyle;
|
|
3655
|
+
'element:wall'?: ShapeStyle;
|
|
3656
|
+
'element:window'?: ShapeStyle;
|
|
3657
|
+
'layout:space'?: ShapeStyle;
|
|
3658
|
+
'spatialGraph:edge'?: ShapeStyle;
|
|
3659
|
+
'annotation:floorPlanImage'?: ShapeStyle & {
|
|
3660
|
+
grayscale?: boolean;
|
|
3661
|
+
};
|
|
3662
|
+
};
|
|
3663
|
+
byFilter?: StyleFilter[];
|
|
3664
|
+
};
|
|
3665
|
+
|
|
3413
3666
|
declare class Ticker {
|
|
3414
3667
|
methods: {
|
|
3415
3668
|
[name: string]: {
|
|
@@ -3512,7 +3765,7 @@ export declare type Vector2 = [number, number];
|
|
|
3512
3765
|
|
|
3513
3766
|
declare type Vector2_2 = [number, number];
|
|
3514
3767
|
|
|
3515
|
-
declare type Vector3 = [number, number, number];
|
|
3768
|
+
export declare type Vector3 = [number, number, number];
|
|
3516
3769
|
|
|
3517
3770
|
declare interface Vector3List extends SpaceGraphTypedValueJson {
|
|
3518
3771
|
type: 'vector3:list';
|
|
@@ -3542,11 +3795,12 @@ declare class WebGlView extends TinyEmitter {
|
|
|
3542
3795
|
viewportInFocus: boolean;
|
|
3543
3796
|
wallNodesToUpdate: any[];
|
|
3544
3797
|
wallNodeUpdateInProgress: boolean;
|
|
3545
|
-
|
|
3798
|
+
/* Excluded from this release type: floorContainers */
|
|
3546
3799
|
roomStampLayers: Map<string, PlanLayer>;
|
|
3547
3800
|
parentEl: HTMLElement;
|
|
3548
|
-
|
|
3801
|
+
/* Excluded from this release type: _settings */
|
|
3549
3802
|
/* Excluded from this release type: gfxLayers */
|
|
3803
|
+
/* Excluded from this release type: textureCache */
|
|
3550
3804
|
redrawScene: () => void;
|
|
3551
3805
|
/* Excluded from this release type: gfxNodes */
|
|
3552
3806
|
/* Excluded from this release type: _viewport */
|
|
@@ -3557,7 +3811,9 @@ declare class WebGlView extends TinyEmitter {
|
|
|
3557
3811
|
/* Excluded from this release type: _zoomTarget */
|
|
3558
3812
|
_oldTime: number;
|
|
3559
3813
|
ticker?: Ticker;
|
|
3814
|
+
_lastCanvasRect?: DOMRect;
|
|
3560
3815
|
_resizeObserver?: ResizeObserver;
|
|
3816
|
+
_resizeRafId: number | null;
|
|
3561
3817
|
on: (event: ViewEvent, callback: Function, ctx?: any) => this;
|
|
3562
3818
|
once: (event: ViewEvent, callback: Function, ctx?: any) => this;
|
|
3563
3819
|
off: (event: ViewEvent, callback?: Function) => this;
|