@archilogic/floor-plan-sdk 5.0.2 → 5.1.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 +115 -16
- package/dist/fpe.js +2325 -2018
- package/dist/fpe.umd.cjs +4 -4
- package/package.json +1 -1
package/dist/fpe.d.ts
CHANGED
|
@@ -77,7 +77,7 @@ export declare interface BezierCurve extends BaseShape {
|
|
|
77
77
|
points: Polygon;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
declare type BoundingBox2d = {
|
|
80
|
+
export declare type BoundingBox2d = {
|
|
81
81
|
min: Vector2;
|
|
82
82
|
max: Vector2;
|
|
83
83
|
};
|
|
@@ -127,7 +127,9 @@ declare interface CommonParameters$3 {
|
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
declare interface CommonParameters$4 {
|
|
130
|
+
/** thickness of the frame in x direction */
|
|
130
131
|
frameThickness: number;
|
|
132
|
+
/** depth of the frame in z direction */
|
|
131
133
|
frameDepth: number;
|
|
132
134
|
doorType: DoorType;
|
|
133
135
|
doorAngle: number;
|
|
@@ -147,7 +149,9 @@ declare interface CommonParameters$6 {
|
|
|
147
149
|
}
|
|
148
150
|
|
|
149
151
|
declare interface CommonParameters {
|
|
152
|
+
/** thickness of the frame in x direction */
|
|
150
153
|
frameThickness: number;
|
|
154
|
+
/** depth of the frame in z direction */
|
|
151
155
|
frameDepth: number;
|
|
152
156
|
panelLength: number;
|
|
153
157
|
panelCount: number;
|
|
@@ -198,6 +202,10 @@ declare interface CurveBase {
|
|
|
198
202
|
|
|
199
203
|
declare type CurveType = ClosedCurveType | OpenCurveType;
|
|
200
204
|
|
|
205
|
+
declare type CustomAttributeResourceType = 'building' | 'element' | 'floor' | 'layout' | 'product' | 'space';
|
|
206
|
+
|
|
207
|
+
declare type CustomAttributeValueType = 'Text' | 'Number' | 'Boolean';
|
|
208
|
+
|
|
201
209
|
declare interface CustomStairsParameters {
|
|
202
210
|
stairsType: CustomStairsType;
|
|
203
211
|
height: number;
|
|
@@ -332,6 +340,7 @@ declare class FloorPlanCore {
|
|
|
332
340
|
* Change options after the floor plan engine instance has been created
|
|
333
341
|
*/
|
|
334
342
|
set(args?: FpeConfig): void;
|
|
343
|
+
getBoundingBox(margin?: number): BoundingBox2d;
|
|
335
344
|
/**
|
|
336
345
|
* Get a list of spaces and assets for a specific plan position
|
|
337
346
|
* @param {*} position - plan position
|
|
@@ -395,7 +404,6 @@ export declare class FloorPlanEngine extends FloorPlanCore {
|
|
|
395
404
|
initDrawingEvents(): void;
|
|
396
405
|
freeDrawingEvents(): void;
|
|
397
406
|
generateUi(): void;
|
|
398
|
-
getBoundingBox(margin?: number): BoundingBox2d;
|
|
399
407
|
/**
|
|
400
408
|
* Get a bounding box containing the layout, with some padding
|
|
401
409
|
* @param layoutBoundingBox - bounding box of the layout, in meters.
|
|
@@ -507,12 +515,8 @@ declare type FloorPlanTheme = {
|
|
|
507
515
|
grayscale: boolean;
|
|
508
516
|
};
|
|
509
517
|
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
518
|
/** show the area information in room stamps */
|
|
515
|
-
roomStampDisplay?: ('usage' | 'area' | 'customId' | 'name' | 'id')[];
|
|
519
|
+
roomStampDisplay?: ('usage' | 'area' | 'customId' | 'name' | 'id' | ['customAttribute', string])[];
|
|
516
520
|
/** text color for room stamps */
|
|
517
521
|
text?: Rgb;
|
|
518
522
|
/** whether the room stamp text should have an outline to assist with contrast issues */
|
|
@@ -866,6 +870,7 @@ export declare interface GraphicArgs {
|
|
|
866
870
|
|
|
867
871
|
declare type GraphicUpdate = {
|
|
868
872
|
position?: Vector2;
|
|
873
|
+
rotation?: number;
|
|
869
874
|
style?: ShapeStyle;
|
|
870
875
|
shapes?: Shape[];
|
|
871
876
|
};
|
|
@@ -877,6 +882,7 @@ declare class GroupRelation extends SpaceGraphNodeBase {
|
|
|
877
882
|
insertElements(elements: LayoutElement[]): void;
|
|
878
883
|
removeElements(elements: LayoutElement[]): void;
|
|
879
884
|
copyForClone(product: GroupRelation): void;
|
|
885
|
+
toJSON(): GroupRelationJson;
|
|
880
886
|
}
|
|
881
887
|
|
|
882
888
|
declare interface GroupRelationJson extends SpaceGraphNodeBaseJson {
|
|
@@ -1083,6 +1089,7 @@ declare class LayoutAnnotationBase extends LayoutNodeBase {
|
|
|
1083
1089
|
copyForClone(annotation: LayoutAnnotation): void;
|
|
1084
1090
|
setTransform(position: Vector3, rotation: number): void;
|
|
1085
1091
|
setParameters(parameters: RecursivePartial<LayoutAnnotationParameters>): void;
|
|
1092
|
+
toJSON(): LayoutAnnotationJson;
|
|
1086
1093
|
}
|
|
1087
1094
|
|
|
1088
1095
|
declare interface LayoutAnnotationBaseJson extends LayoutNodeBaseJson {
|
|
@@ -1160,6 +1167,7 @@ declare class LayoutBoundary {
|
|
|
1160
1167
|
vertices: SpatialGraphVertex[];
|
|
1161
1168
|
edges: SpatialGraphEdge[];
|
|
1162
1169
|
geometryProfile: Vector2_2[];
|
|
1170
|
+
toJSON(): LayoutBoundaryJson;
|
|
1163
1171
|
}
|
|
1164
1172
|
|
|
1165
1173
|
declare type LayoutBoundaryElement = LayoutBoundarySlab | LayoutBoundaryWall;
|
|
@@ -1399,6 +1407,7 @@ declare class LayoutEdgeElementBase extends LayoutElementBase {
|
|
|
1399
1407
|
getAdjacentSpacesBySide(): [LayoutSpace[], LayoutSpace[]];
|
|
1400
1408
|
getSpaces(): LayoutSpace[];
|
|
1401
1409
|
getElementsAtLinearPosition(u: number): LayoutElement[];
|
|
1410
|
+
get isExternal(): boolean;
|
|
1402
1411
|
}
|
|
1403
1412
|
|
|
1404
1413
|
declare interface LayoutEdgeElementBaseJson extends LayoutElementBaseJson {
|
|
@@ -1427,10 +1436,12 @@ declare class LayoutElementBase extends LayoutNodeBase {
|
|
|
1427
1436
|
getTransform(): Transform3d;
|
|
1428
1437
|
getWorldTransform(): Transform3d;
|
|
1429
1438
|
getBoundingBox(localTransform?: boolean): TransformBoundingBox3d;
|
|
1439
|
+
get isExternal(): boolean;
|
|
1430
1440
|
removeElement(element: LayoutElement): void;
|
|
1431
1441
|
copyForClone(element: LayoutElement): void;
|
|
1432
1442
|
setParameters(parameters: RecursivePartial<LayoutElementParameters>): void;
|
|
1433
1443
|
getSpaces(): LayoutSpace[];
|
|
1444
|
+
toJSON(): LayoutElementJson;
|
|
1434
1445
|
}
|
|
1435
1446
|
|
|
1436
1447
|
declare interface LayoutElementBaseJson extends LayoutNodeBaseJson {
|
|
@@ -1560,13 +1571,13 @@ declare const LayoutKitchenTypeValue = "element:kitchen";
|
|
|
1560
1571
|
|
|
1561
1572
|
declare type LayoutNode = SpatialGraphNode | LayoutSpace | LayoutElement | LayoutAnnotation | LayoutView;
|
|
1562
1573
|
|
|
1563
|
-
declare class LayoutNodeBase extends
|
|
1574
|
+
declare class LayoutNodeBase extends SpaceGraphNodeWithCustomAttributesBase {
|
|
1564
1575
|
type: LayoutNodeType;
|
|
1565
1576
|
layout: SpaceGraphLayout;
|
|
1566
1577
|
constructor(id: string, type: LayoutNodeType);
|
|
1567
1578
|
}
|
|
1568
1579
|
|
|
1569
|
-
declare interface LayoutNodeBaseJson extends
|
|
1580
|
+
declare interface LayoutNodeBaseJson extends SpaceGraphNodeWithCustomAttributesBaseJson {
|
|
1570
1581
|
type: LayoutNodeType;
|
|
1571
1582
|
}
|
|
1572
1583
|
|
|
@@ -1586,6 +1597,7 @@ declare class LayoutOpening extends LayoutOpeningElementBase {
|
|
|
1586
1597
|
transform: Transform3d;
|
|
1587
1598
|
};
|
|
1588
1599
|
getSpaces(): LayoutSpace[];
|
|
1600
|
+
get isExternal(): boolean;
|
|
1589
1601
|
}
|
|
1590
1602
|
|
|
1591
1603
|
declare type LayoutOpeningElement = LayoutOpening;
|
|
@@ -1747,6 +1759,7 @@ declare class LayoutSpace extends LayoutNodeBase {
|
|
|
1747
1759
|
copyForClone(space: LayoutSpace): void;
|
|
1748
1760
|
setId(id: string): void;
|
|
1749
1761
|
setAttributes(attributes: LayoutSpaceAttributesJson): void;
|
|
1762
|
+
get isExternal(): boolean;
|
|
1750
1763
|
getArea(): number;
|
|
1751
1764
|
getAdjacentSpaces(graph: Graph, { connectivity }?: {
|
|
1752
1765
|
connectivity?: number;
|
|
@@ -1763,6 +1776,7 @@ declare class LayoutSpace extends LayoutNodeBase {
|
|
|
1763
1776
|
getBoundingBox(): TransformBoundingBox3d;
|
|
1764
1777
|
attachSlab(slab: LayoutBoundarySlab): void;
|
|
1765
1778
|
detachSlab(slab: LayoutBoundarySlab): void;
|
|
1779
|
+
toJSON(): LayoutSpaceJson;
|
|
1766
1780
|
}
|
|
1767
1781
|
|
|
1768
1782
|
declare interface LayoutSpaceAttributes {
|
|
@@ -1843,6 +1857,7 @@ declare class LayoutSpatialGraph {
|
|
|
1843
1857
|
createVertex(id: string, x: number, y: number): SpatialGraphVertex;
|
|
1844
1858
|
createEdge(id: string, vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex, splitSpace?: boolean): SpatialGraphEdge;
|
|
1845
1859
|
createEdgeByVertexIds(id: string, vertexId1: string, vertexId2: string, splitSpace?: boolean): SpatialGraphEdge;
|
|
1860
|
+
toJSON(): LayoutSpatialGraphJson;
|
|
1846
1861
|
}
|
|
1847
1862
|
|
|
1848
1863
|
declare interface LayoutSpatialGraphJson {
|
|
@@ -1957,6 +1972,7 @@ declare class LayoutViewBase extends LayoutNodeBase {
|
|
|
1957
1972
|
parameters: LayoutViewParameters;
|
|
1958
1973
|
copyForClone(view: LayoutView): void;
|
|
1959
1974
|
setParameters(parameters: RecursivePartial<LayoutViewParameters>): void;
|
|
1975
|
+
toJSON(): LayoutViewJson;
|
|
1960
1976
|
}
|
|
1961
1977
|
|
|
1962
1978
|
declare interface LayoutViewBaseJson extends LayoutNodeBaseJson {
|
|
@@ -2220,7 +2236,7 @@ declare class PlanGraphic {
|
|
|
2220
2236
|
gfxScale: number;
|
|
2221
2237
|
private floorPlan;
|
|
2222
2238
|
constructor({ shapes, position, alpha, scale, clearLayer, interactive, id, isHandler, scaleOnZoom, updatePositionOnDrag, baseLayer, container, floorPlan }: PlanGraphicArgs);
|
|
2223
|
-
set({ position, style, shapes }?: GraphicUpdate): void;
|
|
2239
|
+
set({ position, rotation, style, shapes }?: GraphicUpdate): void;
|
|
2224
2240
|
private doUpdatePositionOnDrag;
|
|
2225
2241
|
on(event: string, callback: any, context?: any): this;
|
|
2226
2242
|
off(event: string, callback?: any): this;
|
|
@@ -2244,6 +2260,7 @@ declare class PlanLayer {
|
|
|
2244
2260
|
private floorPlan;
|
|
2245
2261
|
constructor(floorPlan: FloorPlanEngine, baseLayer?: BaseLayers, id?: string);
|
|
2246
2262
|
addGraphic(args: GraphicArgs): PlanGraphic;
|
|
2263
|
+
/* Excluded from this release type: findGraphic */
|
|
2247
2264
|
deleteGraphic(graphic: PlanGraphic): void;
|
|
2248
2265
|
/**
|
|
2249
2266
|
* clear all shapes from the layer
|
|
@@ -2390,6 +2407,7 @@ declare interface ShapeStyle {
|
|
|
2390
2407
|
fill?: string | number | number[] | false;
|
|
2391
2408
|
fillOpacity?: number;
|
|
2392
2409
|
dash?: boolean;
|
|
2410
|
+
alignment?: 0 | 0.5 | 1;
|
|
2393
2411
|
}
|
|
2394
2412
|
|
|
2395
2413
|
declare class SpaceGraph {
|
|
@@ -2399,6 +2417,11 @@ declare class SpaceGraph {
|
|
|
2399
2417
|
productsByType: NodesByType<{
|
|
2400
2418
|
readonly 'product:static': typeof SpaceGraphProduct;
|
|
2401
2419
|
}>;
|
|
2420
|
+
customAttributes: SpaceGraphCustomAttribute[];
|
|
2421
|
+
customAttributesById: Record<string, SpaceGraphCustomAttribute>;
|
|
2422
|
+
customAttributesByType: NodesByType<{
|
|
2423
|
+
readonly 'customAttribute:definition': typeof SpaceGraphCustomAttribute;
|
|
2424
|
+
}>;
|
|
2402
2425
|
geometries: SpaceGraphGeometryJson[];
|
|
2403
2426
|
geometriesById: Record<string, SpaceGraphGeometryJson>;
|
|
2404
2427
|
geometriesByType: NodesByType<{
|
|
@@ -2498,11 +2521,14 @@ declare class SpaceGraph {
|
|
|
2498
2521
|
insertRelation(relation: SpaceGraphRelation): void;
|
|
2499
2522
|
removeRelation(relation: SpaceGraphRelation): void;
|
|
2500
2523
|
createRelation(type: SpaceGraphRelationType, id: string): SpaceGraphRelation;
|
|
2524
|
+
insertCustomAttribute(customAttribute: SpaceGraphCustomAttribute): void;
|
|
2525
|
+
removeCustomAttribute(customAttribute: SpaceGraphCustomAttribute): void;
|
|
2501
2526
|
getId(): string;
|
|
2502
2527
|
emit<EventType extends keyof SpaceGraphEventMap>(event: EventType, ...args: SpaceGraphEventMap[EventType]): void;
|
|
2503
2528
|
on<EventType extends keyof SpaceGraphEventMap>(event: EventType, handler: (...args: SpaceGraphEventMap[EventType]) => void, context?: any): void;
|
|
2504
2529
|
once<EventType extends keyof SpaceGraphEventMap>(event: EventType, handler: (...args: SpaceGraphEventMap[EventType]) => void, context?: any): void;
|
|
2505
2530
|
off<EventType extends keyof SpaceGraphEventMap>(event: EventType, handler?: (...args: SpaceGraphEventMap[EventType]) => void): void;
|
|
2531
|
+
toJSON(): SpaceGraphJson;
|
|
2506
2532
|
}
|
|
2507
2533
|
|
|
2508
2534
|
declare class SpaceGraphBasicMaterial extends SpaceGraphNodeBase {
|
|
@@ -2513,6 +2539,7 @@ declare class SpaceGraphBasicMaterial extends SpaceGraphNodeBase {
|
|
|
2513
2539
|
opacity: number;
|
|
2514
2540
|
constructor(id: string);
|
|
2515
2541
|
copyForClone(material: SpaceGraphBasicMaterial): void;
|
|
2542
|
+
toJSON(): SpaceGraphMaterialResourceJson;
|
|
2516
2543
|
}
|
|
2517
2544
|
|
|
2518
2545
|
declare interface SpaceGraphBasicMaterialJson extends SpaceGraphMaterialBaseJson {
|
|
@@ -2536,6 +2563,7 @@ declare class SpaceGraphBuilding extends SpaceGraphSpatialStructureBase {
|
|
|
2536
2563
|
insertFloor(floor: SpaceGraphFloor): void;
|
|
2537
2564
|
removeFloor(floor: SpaceGraphFloor): void;
|
|
2538
2565
|
createFloor(id: string): SpaceGraphFloor;
|
|
2566
|
+
toJSON(): SpaceGraphBuildingJson;
|
|
2539
2567
|
}
|
|
2540
2568
|
|
|
2541
2569
|
declare interface SpaceGraphBuildingJson extends SpaceGraphSpatialStructureBaseJson {
|
|
@@ -2553,6 +2581,7 @@ declare class SpaceGraphColorMaterial extends SpaceGraphNodeBase {
|
|
|
2553
2581
|
color: Rgb;
|
|
2554
2582
|
opacity: number;
|
|
2555
2583
|
constructor(id: string, color?: Rgb, opacity?: number);
|
|
2584
|
+
toJSON(): SpaceGraphMaterialResourceJson;
|
|
2556
2585
|
}
|
|
2557
2586
|
|
|
2558
2587
|
declare interface SpaceGraphColorMaterialJson extends SpaceGraphMaterialBaseJson {
|
|
@@ -2564,11 +2593,53 @@ declare type SpaceGraphColorMaterialType = typeof SpaceGraphColorMaterialTypeVal
|
|
|
2564
2593
|
|
|
2565
2594
|
declare const SpaceGraphColorMaterialTypeValue = "material:color";
|
|
2566
2595
|
|
|
2596
|
+
declare class SpaceGraphCustomAttribute extends SpaceGraphNodeBase {
|
|
2597
|
+
type: SpaceGraphCustomAttributeType;
|
|
2598
|
+
attributes: SpaceGraphCustomAttributeAttributes;
|
|
2599
|
+
constructor(id: string, attributesJson?: SpaceGraphCustomAttributeAttributesJson);
|
|
2600
|
+
setAttributes(attributesJson: SpaceGraphCustomAttributeAttributesJson): void;
|
|
2601
|
+
copyForClone(customAttribute: SpaceGraphCustomAttribute): void;
|
|
2602
|
+
toJSON(): SpaceGraphCustomAttributeJson;
|
|
2603
|
+
}
|
|
2604
|
+
|
|
2605
|
+
declare type SpaceGraphCustomAttributeAttributes = {
|
|
2606
|
+
resourceType: CustomAttributeResourceType;
|
|
2607
|
+
valueType: CustomAttributeValueType;
|
|
2608
|
+
updatedAt?: string;
|
|
2609
|
+
description?: string;
|
|
2610
|
+
};
|
|
2611
|
+
|
|
2612
|
+
declare type SpaceGraphCustomAttributeAttributesJson = {
|
|
2613
|
+
resourceType: CustomAttributeResourceType;
|
|
2614
|
+
valueType: CustomAttributeValueType;
|
|
2615
|
+
updatedAt?: string;
|
|
2616
|
+
/** @minLength 3 @maxLength 200 @type string */
|
|
2617
|
+
description?: string;
|
|
2618
|
+
};
|
|
2619
|
+
|
|
2620
|
+
declare interface SpaceGraphCustomAttributeJson extends SpaceGraphNodeBaseJson {
|
|
2621
|
+
/** @type string @minLength 3 @maxLength 50 @pattern ^(?![_-])[A-Za-z0-9_-]*$ */
|
|
2622
|
+
id: string;
|
|
2623
|
+
/** @minLength 3 @maxLength 30 @type string */
|
|
2624
|
+
name: string;
|
|
2625
|
+
type: SpaceGraphCustomAttributeType;
|
|
2626
|
+
attributes: SpaceGraphCustomAttributeAttributesJson;
|
|
2627
|
+
}
|
|
2628
|
+
|
|
2629
|
+
declare type SpaceGraphCustomAttributeType = typeof SpaceGraphCustomAttributeTypeValue;
|
|
2630
|
+
|
|
2631
|
+
declare const SpaceGraphCustomAttributeTypeValue = "customAttribute:definition";
|
|
2632
|
+
|
|
2633
|
+
declare type SpaceGraphCustomAttributeValue = Record<string, string>;
|
|
2634
|
+
|
|
2635
|
+
declare type SpaceGraphCustomAttributeValueJson = Record<string, string | null>;
|
|
2636
|
+
|
|
2567
2637
|
declare class SpaceGraphEmbeddedMaterial extends SpaceGraphNodeBase {
|
|
2568
2638
|
type: SpaceGraphEmbeddedMaterialType;
|
|
2569
2639
|
reference: string;
|
|
2570
2640
|
format: SpaceGraphEmbeddedMaterialFormat;
|
|
2571
2641
|
constructor(id: string, reference: string, format: SpaceGraphEmbeddedMaterialFormat);
|
|
2642
|
+
toJSON(): SpaceGraphMaterialResourceJson;
|
|
2572
2643
|
}
|
|
2573
2644
|
|
|
2574
2645
|
declare type SpaceGraphEmbeddedMaterialFormat = 'data3d';
|
|
@@ -2586,8 +2657,11 @@ declare interface SpaceGraphEventMap {
|
|
|
2586
2657
|
'material-delete': [SpaceGraphMaterial];
|
|
2587
2658
|
'relation-create': [SpaceGraphRelation];
|
|
2588
2659
|
'relation-delete': [SpaceGraphRelation];
|
|
2660
|
+
'custom-attribute-create': [SpaceGraphCustomAttribute];
|
|
2661
|
+
'custom-attribute-delete': [SpaceGraphCustomAttribute];
|
|
2589
2662
|
'node-id-change': [SpaceGraphNodeBase, string];
|
|
2590
2663
|
'node-property-change': [SpaceGraphNodeBase, string];
|
|
2664
|
+
'node-custom-attributes-change': [SpaceGraphNodeBase];
|
|
2591
2665
|
'vertex-create': [SpatialGraphVertex];
|
|
2592
2666
|
'vertex-delete': [SpatialGraphVertex];
|
|
2593
2667
|
'vertex-add-edge': [SpatialGraphVertex, SpatialGraphEdge];
|
|
@@ -2603,9 +2677,10 @@ declare interface SpaceGraphEventMap {
|
|
|
2603
2677
|
'space-split': [LayoutSpace, [LayoutSpace, LayoutSpace]];
|
|
2604
2678
|
'space-attributes-change': [LayoutSpace];
|
|
2605
2679
|
'element-create': [LayoutElement];
|
|
2606
|
-
'element-delete': [LayoutElement];
|
|
2680
|
+
'element-delete': [LayoutElement, LayoutElement | null];
|
|
2607
2681
|
'element-parameters-change': [LayoutElementBase];
|
|
2608
2682
|
'element-transform-change': [LayoutTransformElementBase];
|
|
2683
|
+
'element-edges-change': [LayoutEdgeElementBase];
|
|
2609
2684
|
'annotation-create': [LayoutAnnotation];
|
|
2610
2685
|
'annotation-delete': [LayoutAnnotation];
|
|
2611
2686
|
'annotation-transform-change': [LayoutAnnotationBase];
|
|
@@ -2628,6 +2703,7 @@ declare class SpaceGraphFloor extends SpaceGraphSpatialStructureBase {
|
|
|
2628
2703
|
insertLayout(layout: SpaceGraphLayout): void;
|
|
2629
2704
|
removeLayout(layout: SpaceGraphLayout): void;
|
|
2630
2705
|
createLayout(id: string): SpaceGraphLayout;
|
|
2706
|
+
toJSON(): SpaceGraphFloorJson;
|
|
2631
2707
|
}
|
|
2632
2708
|
|
|
2633
2709
|
declare interface SpaceGraphFloorJson extends SpaceGraphSpatialStructureBaseJson {
|
|
@@ -2731,6 +2807,7 @@ declare class SpaceGraphLayout extends SpaceGraphSpatialStructureBase {
|
|
|
2731
2807
|
getSpaceId(prefix?: string): string;
|
|
2732
2808
|
getElementId(element: LayoutElement, prefix?: string): string;
|
|
2733
2809
|
getBoundingBox(): TransformBoundingBox3d;
|
|
2810
|
+
toJSON(): SpaceGraphLayoutJson;
|
|
2734
2811
|
}
|
|
2735
2812
|
|
|
2736
2813
|
declare interface SpaceGraphLayoutJson extends SpaceGraphSpatialStructureBaseJson {
|
|
@@ -2757,7 +2834,7 @@ declare type SpaceGraphMaterialJson = Rgb | RgbA | string | SpaceGraphMaterialRe
|
|
|
2757
2834
|
|
|
2758
2835
|
declare type SpaceGraphMaterialResourceJson = SpaceGraphColorMaterialJson | SpaceGraphStandardMaterialJson | SpaceGraphBasicMaterialJson;
|
|
2759
2836
|
|
|
2760
|
-
declare type SpaceGraphNode = SpaceGraphProduct | SpaceGraphGeometry | SpaceGraphMaterial | SpaceGraphRelation | SpaceGraphBuilding | SpaceGraphFloor | LayoutNode | SpaceGraphLayout | LayoutAnnotation;
|
|
2837
|
+
declare type SpaceGraphNode = SpaceGraphProduct | SpaceGraphGeometry | SpaceGraphMaterial | SpaceGraphRelation | SpaceGraphCustomAttribute | SpaceGraphBuilding | SpaceGraphFloor | LayoutNode | SpaceGraphLayout | LayoutAnnotation;
|
|
2761
2838
|
|
|
2762
2839
|
declare class SpaceGraphNodeBase extends SpaceGraphTypedValue {
|
|
2763
2840
|
id: string;
|
|
@@ -2768,6 +2845,7 @@ declare class SpaceGraphNodeBase extends SpaceGraphTypedValue {
|
|
|
2768
2845
|
setName(name: string): void;
|
|
2769
2846
|
setCustomId(customId: string): void;
|
|
2770
2847
|
emit<EventType extends keyof SpaceGraphEventMap>(event: EventType, ...args: SpaceGraphEventMap[EventType]): void;
|
|
2848
|
+
toJSON(): SpaceGraphNodeBaseJson;
|
|
2771
2849
|
}
|
|
2772
2850
|
|
|
2773
2851
|
declare interface SpaceGraphNodeBaseJson extends SpaceGraphTypedValueJson {
|
|
@@ -2777,13 +2855,28 @@ declare interface SpaceGraphNodeBaseJson extends SpaceGraphTypedValueJson {
|
|
|
2777
2855
|
customId?: string;
|
|
2778
2856
|
}
|
|
2779
2857
|
|
|
2780
|
-
declare
|
|
2858
|
+
declare type SpaceGraphNodeWithCustomAttributes = LayoutNode | SpaceGraphSpatialStructure | SpaceGraphProduct;
|
|
2859
|
+
|
|
2860
|
+
declare class SpaceGraphNodeWithCustomAttributesBase extends SpaceGraphNodeBase {
|
|
2861
|
+
customAttributes: SpaceGraphCustomAttributeValue;
|
|
2862
|
+
constructor(id: string, type: string);
|
|
2863
|
+
setCustomAttributes(customAttributes?: SpaceGraphCustomAttributeValueJson | null, customAttributesById?: Record<string, SpaceGraphCustomAttribute>): void;
|
|
2864
|
+
toJSON(): SpaceGraphNodeWithCustomAttributesBaseJson;
|
|
2865
|
+
copyForClone(node: SpaceGraphNodeWithCustomAttributes): void;
|
|
2866
|
+
}
|
|
2867
|
+
|
|
2868
|
+
declare interface SpaceGraphNodeWithCustomAttributesBaseJson extends SpaceGraphNodeBaseJson {
|
|
2869
|
+
customAttributes?: SpaceGraphCustomAttributeValueJson | null;
|
|
2870
|
+
}
|
|
2871
|
+
|
|
2872
|
+
declare class SpaceGraphProduct extends SpaceGraphNodeWithCustomAttributesBase {
|
|
2781
2873
|
type: SpaceGraphProductType;
|
|
2782
2874
|
attributes: SpaceGraphProductAttributes;
|
|
2783
2875
|
geometries: GeometryOperationJson[];
|
|
2784
2876
|
constructor(id: string);
|
|
2785
2877
|
copyForClone(product: SpaceGraphProduct): void;
|
|
2786
2878
|
setAttributes(attributesJson: SpaceGraphProductAttributesJson): void;
|
|
2879
|
+
toJSON(): SpaceGraphProductJson;
|
|
2787
2880
|
}
|
|
2788
2881
|
|
|
2789
2882
|
declare type SpaceGraphProductAttributes = {
|
|
@@ -2806,7 +2899,7 @@ declare type SpaceGraphProductAttributesJson = {
|
|
|
2806
2899
|
updatedAt?: string;
|
|
2807
2900
|
};
|
|
2808
2901
|
|
|
2809
|
-
declare interface SpaceGraphProductJson extends
|
|
2902
|
+
declare interface SpaceGraphProductJson extends SpaceGraphNodeWithCustomAttributesBaseJson {
|
|
2810
2903
|
type: SpaceGraphProductType;
|
|
2811
2904
|
attributes?: SpaceGraphProductAttributesJson;
|
|
2812
2905
|
geometries: GeometryOperationJson[];
|
|
@@ -2827,16 +2920,17 @@ declare interface SpaceGraphSharedResourcesJson {
|
|
|
2827
2920
|
geometries: SpaceGraphGeometryJson[];
|
|
2828
2921
|
materials: SpaceGraphMaterialResourceJson[];
|
|
2829
2922
|
relations: SpaceGraphRelationJson[];
|
|
2923
|
+
customAttributes?: SpaceGraphCustomAttributeJson[];
|
|
2830
2924
|
}
|
|
2831
2925
|
|
|
2832
2926
|
declare type SpaceGraphSpatialStructure = SpaceGraphBuilding | SpaceGraphFloor | SpaceGraphLayout;
|
|
2833
2927
|
|
|
2834
|
-
declare class SpaceGraphSpatialStructureBase extends
|
|
2928
|
+
declare class SpaceGraphSpatialStructureBase extends SpaceGraphNodeWithCustomAttributesBase {
|
|
2835
2929
|
type: SpaceGraphSpatialStructureType;
|
|
2836
2930
|
constructor(id: string, type: SpaceGraphSpatialStructureType);
|
|
2837
2931
|
}
|
|
2838
2932
|
|
|
2839
|
-
declare interface SpaceGraphSpatialStructureBaseJson extends
|
|
2933
|
+
declare interface SpaceGraphSpatialStructureBaseJson extends SpaceGraphNodeWithCustomAttributesBaseJson {
|
|
2840
2934
|
type: SpaceGraphSpatialStructureType;
|
|
2841
2935
|
}
|
|
2842
2936
|
|
|
@@ -2848,6 +2942,7 @@ declare class SpaceGraphStandardMaterial extends SpaceGraphNodeBase {
|
|
|
2848
2942
|
type: SpaceGraphStandardMaterialType;
|
|
2849
2943
|
reference: string;
|
|
2850
2944
|
constructor(id: string, reference: string);
|
|
2945
|
+
toJSON(): SpaceGraphMaterialResourceJson;
|
|
2851
2946
|
}
|
|
2852
2947
|
|
|
2853
2948
|
declare interface SpaceGraphStandardMaterialJson extends SpaceGraphMaterialBaseJson {
|
|
@@ -2894,12 +2989,15 @@ declare class SpatialGraphEdge extends SpatialGraphNodeBase {
|
|
|
2894
2989
|
element: LayoutEdgeElement | null;
|
|
2895
2990
|
constructor(id: string, vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex);
|
|
2896
2991
|
getPoints(): [Vector2, Vector2];
|
|
2992
|
+
getLength(): number;
|
|
2993
|
+
get isExternal(): boolean;
|
|
2897
2994
|
setVertices(vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex): void;
|
|
2898
2995
|
setVerticesByIds(vertexId1: string, vertexId2: string): void;
|
|
2899
2996
|
canSplit(u: number, options?: EdgeCanSplitOptions): boolean;
|
|
2900
2997
|
split(u: number, options?: EdgeSplitOptions, updateSpaceBoundaries?: boolean): EdgeSplitReturnValue;
|
|
2901
2998
|
canMerge(edge: SpatialGraphEdge): boolean;
|
|
2902
2999
|
merge(edge: SpatialGraphEdge, updateSpaceBoundaries?: boolean): void;
|
|
3000
|
+
toJSON(): SpatialGraphEdgeJson;
|
|
2903
3001
|
}
|
|
2904
3002
|
|
|
2905
3003
|
declare interface SpatialGraphEdgeJson extends SpatialGraphNodeBaseJson {
|
|
@@ -2930,6 +3028,7 @@ declare class SpatialGraphVertex extends SpatialGraphNodeBase {
|
|
|
2930
3028
|
addEdge(edge: SpatialGraphEdge): void;
|
|
2931
3029
|
removeEdge(edge: SpatialGraphEdge): void;
|
|
2932
3030
|
setPosition(x: number, y: number): void;
|
|
3031
|
+
toJSON(): SpatialGraphVertexJson;
|
|
2933
3032
|
}
|
|
2934
3033
|
|
|
2935
3034
|
declare interface SpatialGraphVertexJson extends SpatialGraphNodeBaseJson {
|