@archilogic/floor-plan-sdk 5.0.0 → 5.0.2
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 +6 -10
- package/dist/fpe.d.ts +239 -118
- package/dist/fpe.js +3275 -2847
- package/dist/fpe.umd.cjs +3 -3
- package/package.json +2 -2
package/dist/fpe.d.ts
CHANGED
|
@@ -36,16 +36,16 @@ declare interface ApiUrls {
|
|
|
36
36
|
apiProductDataPath?: string;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
declare interface ArcCurve extends
|
|
40
|
-
type:
|
|
39
|
+
export declare interface ArcCurve extends BaseShape {
|
|
40
|
+
type: 'curve:arc';
|
|
41
|
+
position: Vector2;
|
|
41
42
|
radius: number;
|
|
42
43
|
startAngle: number;
|
|
43
44
|
endAngle: number;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
|
-
declare interface ArcCurve_2 extends
|
|
47
|
-
type:
|
|
48
|
-
position: Vector2_2;
|
|
47
|
+
declare interface ArcCurve_2 extends CurveBase {
|
|
48
|
+
type: ArcCurveType;
|
|
49
49
|
radius: number;
|
|
50
50
|
startAngle: number;
|
|
51
51
|
endAngle: number;
|
|
@@ -72,14 +72,14 @@ declare interface BaseShape {
|
|
|
72
72
|
style?: ShapeStyle;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
declare interface BezierCurve extends BaseShape {
|
|
75
|
+
export declare interface BezierCurve extends BaseShape {
|
|
76
76
|
type: 'curve:quadraticBezier';
|
|
77
77
|
points: Polygon;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
declare type BoundingBox2d = {
|
|
81
|
-
min:
|
|
82
|
-
max:
|
|
81
|
+
min: Vector2;
|
|
82
|
+
max: Vector2;
|
|
83
83
|
};
|
|
84
84
|
|
|
85
85
|
declare type BoundingBox3d = {
|
|
@@ -87,14 +87,14 @@ declare type BoundingBox3d = {
|
|
|
87
87
|
max: Vector3;
|
|
88
88
|
};
|
|
89
89
|
|
|
90
|
-
declare interface CircleCurve extends
|
|
91
|
-
type:
|
|
90
|
+
export declare interface CircleCurve extends BaseShape {
|
|
91
|
+
type: 'curve:circle';
|
|
92
|
+
position: Vector2;
|
|
92
93
|
radius: number;
|
|
93
94
|
}
|
|
94
95
|
|
|
95
|
-
declare interface CircleCurve_2 extends
|
|
96
|
-
type:
|
|
97
|
-
position: Vector2_2;
|
|
96
|
+
declare interface CircleCurve_2 extends CurveBase {
|
|
97
|
+
type: CircleCurveType;
|
|
98
98
|
radius: number;
|
|
99
99
|
}
|
|
100
100
|
|
|
@@ -102,9 +102,9 @@ declare type CircleCurveType = typeof CircleCurveTypeValue;
|
|
|
102
102
|
|
|
103
103
|
declare const CircleCurveTypeValue = "curve:circle";
|
|
104
104
|
|
|
105
|
-
declare type ClosedCurve =
|
|
105
|
+
declare type ClosedCurve = RectangleCurve_2 | PolygonCurve_2 | PolygonWithHolesCurve_2 | CircleCurve_2 | CompositeCurve_2;
|
|
106
106
|
|
|
107
|
-
declare type ClosedCurveType = RectangleCurveType | PolygonCurveType | CircleCurveType | CompositeCurveType;
|
|
107
|
+
declare type ClosedCurveType = RectangleCurveType | PolygonCurveType | PolygonWithHolesCurveType | CircleCurveType | CompositeCurveType;
|
|
108
108
|
|
|
109
109
|
declare interface CommonParameters$1 {
|
|
110
110
|
materials: LayoutRampMaterials;
|
|
@@ -154,16 +154,16 @@ declare interface CommonParameters {
|
|
|
154
154
|
materials: LayoutWindowMaterials;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
declare interface CompositeCurve extends
|
|
158
|
-
type: CompositeCurveType;
|
|
159
|
-
segments: OpenCurve[];
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
declare interface CompositeCurve_2 extends BaseShape {
|
|
157
|
+
export declare interface CompositeCurve extends BaseShape {
|
|
163
158
|
type: 'curve:composite';
|
|
164
159
|
segments: OpenCurves[];
|
|
165
160
|
}
|
|
166
161
|
|
|
162
|
+
declare interface CompositeCurve_2 extends CurveBase {
|
|
163
|
+
type: CompositeCurveType;
|
|
164
|
+
segments: OpenCurve[];
|
|
165
|
+
}
|
|
166
|
+
|
|
167
167
|
declare type CompositeCurveType = typeof CompositeCurveTypeValue;
|
|
168
168
|
|
|
169
169
|
declare const CompositeCurveTypeValue = "curve:composite";
|
|
@@ -337,7 +337,7 @@ declare class FloorPlanCore {
|
|
|
337
337
|
* @param {*} position - plan position
|
|
338
338
|
* @returns {Object} - list of spaces and assets
|
|
339
339
|
*/
|
|
340
|
-
getResourcesFromPosition(position:
|
|
340
|
+
getResourcesFromPosition(position: Vector2): {
|
|
341
341
|
spaces: LayoutSpace[];
|
|
342
342
|
assets: LayoutAsset[];
|
|
343
343
|
};
|
|
@@ -453,11 +453,11 @@ export declare class FloorPlanEngine extends FloorPlanCore {
|
|
|
453
453
|
/**
|
|
454
454
|
* Convert screen coordinates to plan coordinates
|
|
455
455
|
*/
|
|
456
|
-
getPlanPosition(point:
|
|
456
|
+
getPlanPosition(point: Vector2): Vector2;
|
|
457
457
|
/**
|
|
458
458
|
* Convert plan coordinates to screen coordinates
|
|
459
459
|
*/
|
|
460
|
-
getScreenPosition(point:
|
|
460
|
+
getScreenPosition(point: Vector2): Vector2;
|
|
461
461
|
/**
|
|
462
462
|
* create plan layer or return existing by id
|
|
463
463
|
*/
|
|
@@ -546,11 +546,11 @@ declare type FloorPlanTheme = {
|
|
|
546
546
|
|
|
547
547
|
declare type FpeComputed = {
|
|
548
548
|
wallContours: PolygonWithHoles[];
|
|
549
|
-
snapPoints:
|
|
549
|
+
snapPoints: Vector2[];
|
|
550
550
|
snapMargin: number;
|
|
551
551
|
};
|
|
552
552
|
|
|
553
|
-
declare interface FpeConfig extends StartupOptions {
|
|
553
|
+
export declare interface FpeConfig extends StartupOptions {
|
|
554
554
|
api?: {
|
|
555
555
|
productDataCacheAge?: number;
|
|
556
556
|
productContourCacheAge?: number;
|
|
@@ -575,14 +575,14 @@ declare type FpeCoreEventMap = {
|
|
|
575
575
|
};
|
|
576
576
|
|
|
577
577
|
export declare type FpeDragEvent = {
|
|
578
|
-
position:
|
|
579
|
-
screenPos:
|
|
578
|
+
position: Vector2;
|
|
579
|
+
screenPos: Vector2;
|
|
580
580
|
sourceEvent: FpeInteractionEvent;
|
|
581
581
|
};
|
|
582
582
|
|
|
583
583
|
export declare type FpeDropEvent = {
|
|
584
|
-
position:
|
|
585
|
-
screenPos:
|
|
584
|
+
position: Vector2;
|
|
585
|
+
screenPos: Vector2;
|
|
586
586
|
verticalPos: number;
|
|
587
587
|
sourceEvent: DragEvent;
|
|
588
588
|
};
|
|
@@ -617,8 +617,8 @@ export declare type FpeEventMap = FpeCoreEventMap & {
|
|
|
617
617
|
};
|
|
618
618
|
|
|
619
619
|
declare interface FpeInteraction {
|
|
620
|
-
lastSceneClick:
|
|
621
|
-
cursor:
|
|
620
|
+
lastSceneClick: Vector2;
|
|
621
|
+
cursor: Vector2;
|
|
622
622
|
cursorTarget: LayoutElement | LayoutSpace;
|
|
623
623
|
isDragging: boolean;
|
|
624
624
|
isPanning: boolean;
|
|
@@ -630,7 +630,7 @@ declare interface FpeInteraction {
|
|
|
630
630
|
ctrlKey: boolean;
|
|
631
631
|
altKey: boolean;
|
|
632
632
|
shiftKey: boolean;
|
|
633
|
-
dragOffset:
|
|
633
|
+
dragOffset: Vector2;
|
|
634
634
|
cursorAction: 'split-wall' | 'duplicate' | 'move' | 'select' | 'none';
|
|
635
635
|
_dragStart: ScreenPosition;
|
|
636
636
|
preventFocusoutOnAltKeyup: boolean;
|
|
@@ -682,7 +682,7 @@ declare class FpeLoader extends TinyEmitter {
|
|
|
682
682
|
|
|
683
683
|
export declare type FpePointerEvent = {
|
|
684
684
|
nodeId?: string;
|
|
685
|
-
position:
|
|
685
|
+
position: Vector2;
|
|
686
686
|
isDoubleClick?: boolean;
|
|
687
687
|
sourceEvent: FpeInteractionEvent;
|
|
688
688
|
};
|
|
@@ -853,7 +853,7 @@ declare class Graph {
|
|
|
853
853
|
|
|
854
854
|
export declare interface GraphicArgs {
|
|
855
855
|
shapes: Shape[];
|
|
856
|
-
position?:
|
|
856
|
+
position?: Vector2;
|
|
857
857
|
alpha?: number;
|
|
858
858
|
clearLayer?: boolean;
|
|
859
859
|
scale?: number;
|
|
@@ -865,7 +865,7 @@ export declare interface GraphicArgs {
|
|
|
865
865
|
}
|
|
866
866
|
|
|
867
867
|
declare type GraphicUpdate = {
|
|
868
|
-
position?:
|
|
868
|
+
position?: Vector2;
|
|
869
869
|
style?: ShapeStyle;
|
|
870
870
|
shapes?: Shape[];
|
|
871
871
|
};
|
|
@@ -888,9 +888,9 @@ declare type GroupRelationType = typeof GroupRelationTypeValue;
|
|
|
888
888
|
|
|
889
889
|
declare const GroupRelationTypeValue = "relation:group";
|
|
890
890
|
|
|
891
|
-
declare interface GroupShape extends BaseShape {
|
|
891
|
+
export declare interface GroupShape extends BaseShape {
|
|
892
892
|
type: 'group';
|
|
893
|
-
position?:
|
|
893
|
+
position?: Vector2;
|
|
894
894
|
rotation?: number;
|
|
895
895
|
children: Shape[];
|
|
896
896
|
}
|
|
@@ -913,9 +913,9 @@ declare type HideableElement = LayoutElement['type'] | LayoutSpace['type'] | Spa
|
|
|
913
913
|
declare type HingeSide = 'left' | 'right';
|
|
914
914
|
|
|
915
915
|
declare class HtmlMarker {
|
|
916
|
-
position:
|
|
917
|
-
size:
|
|
918
|
-
offset:
|
|
916
|
+
position: Vector2;
|
|
917
|
+
size: Vector2;
|
|
918
|
+
offset: Vector2;
|
|
919
919
|
isHidden: boolean;
|
|
920
920
|
id: string;
|
|
921
921
|
el: HTMLElement;
|
|
@@ -930,12 +930,10 @@ declare class HtmlMarker {
|
|
|
930
930
|
|
|
931
931
|
declare interface HtmlMarkerArgs {
|
|
932
932
|
/** coordinates of the window in meters */
|
|
933
|
-
position?:
|
|
934
|
-
offset?:
|
|
933
|
+
position?: Vector2;
|
|
934
|
+
offset?: Vector2;
|
|
935
935
|
/** html string as content of the info window */
|
|
936
936
|
el?: HTMLElement;
|
|
937
|
-
/** If true , a close button will appear in the top right corner of the info window. */
|
|
938
|
-
closeButton?: boolean;
|
|
939
937
|
}
|
|
940
938
|
|
|
941
939
|
declare interface HtmlMarkerState extends HtmlMarkerArgs {
|
|
@@ -950,7 +948,7 @@ declare type IndexRange = {
|
|
|
950
948
|
|
|
951
949
|
declare class InfoWindow {
|
|
952
950
|
private _floorPlan;
|
|
953
|
-
position:
|
|
951
|
+
position: Vector2;
|
|
954
952
|
height: number;
|
|
955
953
|
width: number;
|
|
956
954
|
closeButton: any;
|
|
@@ -978,7 +976,7 @@ declare interface InfoWindowArgs {
|
|
|
978
976
|
/** pixel height of the window - default 80 */
|
|
979
977
|
height?: number;
|
|
980
978
|
/** coordinates of the window in meters */
|
|
981
|
-
position?:
|
|
979
|
+
position?: Vector2;
|
|
982
980
|
/** html string as content of the info window */
|
|
983
981
|
html?: string;
|
|
984
982
|
/** If true , a close button will appear in the top right corner of the info window. */
|
|
@@ -1161,7 +1159,7 @@ declare const LayoutBeamTypeValue = "element:beam";
|
|
|
1161
1159
|
declare class LayoutBoundary {
|
|
1162
1160
|
vertices: SpatialGraphVertex[];
|
|
1163
1161
|
edges: SpatialGraphEdge[];
|
|
1164
|
-
geometryProfile:
|
|
1162
|
+
geometryProfile: Vector2_2[];
|
|
1165
1163
|
}
|
|
1166
1164
|
|
|
1167
1165
|
declare type LayoutBoundaryElement = LayoutBoundarySlab | LayoutBoundaryWall;
|
|
@@ -1317,7 +1315,7 @@ declare interface LayoutColumnParameters {
|
|
|
1317
1315
|
|
|
1318
1316
|
declare type LayoutColumnParametersJson = Partial<LayoutColumnParameters>;
|
|
1319
1317
|
|
|
1320
|
-
declare type LayoutColumnProfile =
|
|
1318
|
+
declare type LayoutColumnProfile = RectangleCurve_2 | CircleCurve_2 | PolygonCurve_2 | PolygonWithHolesCurve_2;
|
|
1321
1319
|
|
|
1322
1320
|
declare type LayoutColumnType = typeof LayoutColumnTypeValue;
|
|
1323
1321
|
|
|
@@ -1326,7 +1324,7 @@ declare const LayoutColumnTypeValue = "element:column";
|
|
|
1326
1324
|
declare class LayoutCurtainWall extends LayoutEdgeElementBase {
|
|
1327
1325
|
type: LayoutCurtainWallType;
|
|
1328
1326
|
parameters: LayoutCurtainWallParameters;
|
|
1329
|
-
constructor(id: string,
|
|
1327
|
+
constructor(id: string, edges: SpatialGraphEdge[]);
|
|
1330
1328
|
setParameters(parameters: RecursivePartial<LayoutCurtainWallParameters>): void;
|
|
1331
1329
|
}
|
|
1332
1330
|
|
|
@@ -1379,10 +1377,24 @@ declare type LayoutEdgeElement = LayoutCurtainWall | LayoutSpaceDivider | Layout
|
|
|
1379
1377
|
declare class LayoutEdgeElementBase extends LayoutElementBase {
|
|
1380
1378
|
type: LayoutEdgeElementType;
|
|
1381
1379
|
parameters: LayoutEdgeElementParameters;
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1380
|
+
private edges;
|
|
1381
|
+
private vertices;
|
|
1382
|
+
edgesChanged: boolean;
|
|
1383
|
+
constructor(id: string, type: LayoutEdgeElementType, edges: SpatialGraphEdge[]);
|
|
1384
|
+
setEdges(edges: SpatialGraphEdge[]): void;
|
|
1385
|
+
private verifyEdges;
|
|
1385
1386
|
getEdges(): SpatialGraphEdge[];
|
|
1387
|
+
getVertices(): SpatialGraphVertex[];
|
|
1388
|
+
getStartVertex(): SpatialGraphVertex;
|
|
1389
|
+
getEndVertex(): SpatialGraphVertex;
|
|
1390
|
+
getAxisPoints(): [Vector2_2, Vector2_2];
|
|
1391
|
+
getAxisLength(): number;
|
|
1392
|
+
getEdgeAtLinearPosition(u: number): SpatialGraphEdge | undefined;
|
|
1393
|
+
getEdgesAtLinearSegment(u: number, v: number): SpatialGraphEdge[];
|
|
1394
|
+
/**
|
|
1395
|
+
* @deprecated Use getEdges() instead of edge
|
|
1396
|
+
*/
|
|
1397
|
+
get edge(): SpatialGraphEdge;
|
|
1386
1398
|
getAdjacentElementsByVertex(): [LayoutEdgeElement[], LayoutEdgeElement[]];
|
|
1387
1399
|
getAdjacentSpacesBySide(): [LayoutSpace[], LayoutSpace[]];
|
|
1388
1400
|
getSpaces(): LayoutSpace[];
|
|
@@ -1391,7 +1403,7 @@ declare class LayoutEdgeElementBase extends LayoutElementBase {
|
|
|
1391
1403
|
|
|
1392
1404
|
declare interface LayoutEdgeElementBaseJson extends LayoutElementBaseJson {
|
|
1393
1405
|
type: LayoutEdgeElementType;
|
|
1394
|
-
edge: string;
|
|
1406
|
+
edge: string | string[];
|
|
1395
1407
|
parameters?: LayoutEdgeElementParametersJson;
|
|
1396
1408
|
}
|
|
1397
1409
|
|
|
@@ -1450,7 +1462,7 @@ declare interface LayoutFloorPlanDxfAnnotationJson extends LayoutAnnotationBaseJ
|
|
|
1450
1462
|
|
|
1451
1463
|
declare interface LayoutFloorPlanDxfParameters {
|
|
1452
1464
|
uri: string;
|
|
1453
|
-
drawingOrigin:
|
|
1465
|
+
drawingOrigin: Vector2_2;
|
|
1454
1466
|
hiddenLayers: string[];
|
|
1455
1467
|
}
|
|
1456
1468
|
|
|
@@ -1514,7 +1526,7 @@ declare interface LayoutGenericParameters {
|
|
|
1514
1526
|
|
|
1515
1527
|
declare type LayoutGenericParametersJson = Partial<LayoutGenericParameters>;
|
|
1516
1528
|
|
|
1517
|
-
declare type LayoutGenericProfile = 'none' |
|
|
1529
|
+
declare type LayoutGenericProfile = 'none' | RectangleCurve_2 | CircleCurve_2 | PolygonCurve_2 | PolygonWithHolesCurve_2;
|
|
1518
1530
|
|
|
1519
1531
|
declare type LayoutGenericType = typeof LayoutGenericTypeValue;
|
|
1520
1532
|
|
|
@@ -1568,6 +1580,11 @@ declare class LayoutOpening extends LayoutOpeningElementBase {
|
|
|
1568
1580
|
get position(): Vector3;
|
|
1569
1581
|
get rotation(): number;
|
|
1570
1582
|
setParameters(parameters: RecursivePartial<LayoutOpeningParameters>): void;
|
|
1583
|
+
getBoundingBox(localTransform?: boolean): {
|
|
1584
|
+
min: Vector3;
|
|
1585
|
+
max: Vector3;
|
|
1586
|
+
transform: Transform3d;
|
|
1587
|
+
};
|
|
1571
1588
|
getSpaces(): LayoutSpace[];
|
|
1572
1589
|
}
|
|
1573
1590
|
|
|
@@ -1604,8 +1621,8 @@ declare interface LayoutOpeningMaterials {
|
|
|
1604
1621
|
}
|
|
1605
1622
|
|
|
1606
1623
|
declare interface LayoutOpeningParameters {
|
|
1607
|
-
position:
|
|
1608
|
-
dimensions:
|
|
1624
|
+
position: Vector2_2;
|
|
1625
|
+
dimensions: Vector2_2;
|
|
1609
1626
|
materials: LayoutOpeningMaterials;
|
|
1610
1627
|
}
|
|
1611
1628
|
|
|
@@ -1714,7 +1731,7 @@ declare interface LayoutSlabParameters {
|
|
|
1714
1731
|
|
|
1715
1732
|
declare type LayoutSlabParametersJson = Partial<LayoutSlabParameters>;
|
|
1716
1733
|
|
|
1717
|
-
declare type LayoutSlabProfile =
|
|
1734
|
+
declare type LayoutSlabProfile = RectangleCurve_2 | CircleCurve_2 | PolygonCurve_2 | PolygonWithHolesCurve_2;
|
|
1718
1735
|
|
|
1719
1736
|
declare type LayoutSlabType = typeof LayoutSlabTypeValue;
|
|
1720
1737
|
|
|
@@ -1761,7 +1778,7 @@ declare interface LayoutSpaceAttributesJson {
|
|
|
1761
1778
|
declare class LayoutSpaceDivider extends LayoutEdgeElementBase {
|
|
1762
1779
|
type: LayoutSpaceDividerType;
|
|
1763
1780
|
parameters: LayoutSpaceDividerParameters;
|
|
1764
|
-
constructor(id: string,
|
|
1781
|
+
constructor(id: string, edges: SpatialGraphEdge[]);
|
|
1765
1782
|
setParameters(parameters: RecursivePartial<LayoutSpaceDividerParameters>): void;
|
|
1766
1783
|
getBoundingBox(): {
|
|
1767
1784
|
min: Vector3;
|
|
@@ -1785,7 +1802,7 @@ declare type LayoutSpaceDividerType = typeof LayoutSpaceDividerTypeValue;
|
|
|
1785
1802
|
declare const LayoutSpaceDividerTypeValue = "element:spaceDivider";
|
|
1786
1803
|
|
|
1787
1804
|
declare interface LayoutSpaceGeometry {
|
|
1788
|
-
polygons:
|
|
1805
|
+
polygons: Vector2_2[][];
|
|
1789
1806
|
}
|
|
1790
1807
|
|
|
1791
1808
|
declare interface LayoutSpaceJson extends LayoutNodeBaseJson {
|
|
@@ -1959,7 +1976,7 @@ declare class LayoutWall extends LayoutEdgeElementBase {
|
|
|
1959
1976
|
type: LayoutWallType;
|
|
1960
1977
|
parameters: LayoutWallParameters;
|
|
1961
1978
|
geometryProfile: LayoutWallGeometryProfile;
|
|
1962
|
-
constructor(id: string,
|
|
1979
|
+
constructor(id: string, edges: SpatialGraphEdge[]);
|
|
1963
1980
|
copyForClone(wall: LayoutWall): void;
|
|
1964
1981
|
setParameters(parameters: RecursivePartial<LayoutWallParameters>): void;
|
|
1965
1982
|
getBoundingBox(): {
|
|
@@ -1973,11 +1990,11 @@ declare interface LayoutWallGeometryProfile {
|
|
|
1973
1990
|
valid: boolean;
|
|
1974
1991
|
skipped: boolean;
|
|
1975
1992
|
selfIntersecting: boolean;
|
|
1976
|
-
sidePoints1:
|
|
1977
|
-
sidePoints2:
|
|
1978
|
-
joinPoints1:
|
|
1979
|
-
joinPoints2:
|
|
1980
|
-
points:
|
|
1993
|
+
sidePoints1: Vector2_2[];
|
|
1994
|
+
sidePoints2: Vector2_2[];
|
|
1995
|
+
joinPoints1: Vector2_2[];
|
|
1996
|
+
joinPoints2: Vector2_2[];
|
|
1997
|
+
points: Vector2_2[];
|
|
1981
1998
|
}
|
|
1982
1999
|
|
|
1983
2000
|
declare interface LayoutWallJson extends LayoutEdgeElementBaseJson {
|
|
@@ -2033,14 +2050,14 @@ declare type LayoutWindowType = typeof LayoutWindowTypeValue;
|
|
|
2033
2050
|
|
|
2034
2051
|
declare const LayoutWindowTypeValue = "element:window";
|
|
2035
2052
|
|
|
2036
|
-
declare interface LineCurve extends
|
|
2037
|
-
type:
|
|
2053
|
+
export declare interface LineCurve extends BaseShape {
|
|
2054
|
+
type: 'curve:line';
|
|
2038
2055
|
start: Vector2;
|
|
2039
2056
|
end: Vector2;
|
|
2040
2057
|
}
|
|
2041
2058
|
|
|
2042
|
-
declare interface LineCurve_2 extends
|
|
2043
|
-
type:
|
|
2059
|
+
declare interface LineCurve_2 extends CurveBase {
|
|
2060
|
+
type: LineCurveType;
|
|
2044
2061
|
start: Vector2_2;
|
|
2045
2062
|
end: Vector2_2;
|
|
2046
2063
|
}
|
|
@@ -2053,7 +2070,7 @@ declare type LoadingEvent = 'loading-done' | 'loading-status' | 'resource-loaded
|
|
|
2053
2070
|
|
|
2054
2071
|
declare interface MarkerArgs {
|
|
2055
2072
|
/** coordinates of the marker in meters */
|
|
2056
|
-
position?:
|
|
2073
|
+
position?: Vector2;
|
|
2057
2074
|
/** color of the marker, hex code */
|
|
2058
2075
|
color?: string;
|
|
2059
2076
|
/** size in pixels */
|
|
@@ -2062,7 +2079,7 @@ declare interface MarkerArgs {
|
|
|
2062
2079
|
}
|
|
2063
2080
|
|
|
2064
2081
|
declare class MarkerPin {
|
|
2065
|
-
position:
|
|
2082
|
+
position: Vector2;
|
|
2066
2083
|
color: string;
|
|
2067
2084
|
size: number;
|
|
2068
2085
|
id: string;
|
|
@@ -2107,6 +2124,12 @@ declare type MeshGeometryType = typeof MeshGeometryTypeValue;
|
|
|
2107
2124
|
|
|
2108
2125
|
declare const MeshGeometryTypeValue = "geometry:mesh";
|
|
2109
2126
|
|
|
2127
|
+
declare type NodesByType<NodeMap extends NodeTypeMap = {}> = {
|
|
2128
|
+
-readonly [K in keyof NodeMap]: InstanceType<NodeMap[K]>[];
|
|
2129
|
+
};
|
|
2130
|
+
|
|
2131
|
+
declare type NodeTypeMap = Record<string, any>;
|
|
2132
|
+
|
|
2110
2133
|
declare interface NumberList extends SpaceGraphTypedValueJson {
|
|
2111
2134
|
type: 'number:list';
|
|
2112
2135
|
list: number[];
|
|
@@ -2121,9 +2144,9 @@ declare interface NumberRange extends SpaceGraphTypedValueJson {
|
|
|
2121
2144
|
};
|
|
2122
2145
|
}
|
|
2123
2146
|
|
|
2124
|
-
declare type OpenCurve =
|
|
2147
|
+
declare type OpenCurve = LineCurve_2 | PolylineCurve_2 | ArcCurve_2;
|
|
2125
2148
|
|
|
2126
|
-
declare type OpenCurves =
|
|
2149
|
+
declare type OpenCurves = LineCurve | ArcCurve | PolylineCurve | BezierCurve;
|
|
2127
2150
|
|
|
2128
2151
|
declare type OpenCurveType = LineCurveType | PolylineCurveType | ArcCurveType;
|
|
2129
2152
|
|
|
@@ -2232,40 +2255,49 @@ declare class PlanLayer {
|
|
|
2232
2255
|
destroy(): void;
|
|
2233
2256
|
}
|
|
2234
2257
|
|
|
2235
|
-
declare type Polygon =
|
|
2236
|
-
|
|
2237
|
-
declare interface PolygonCurve extends CurveBase {
|
|
2238
|
-
type: PolygonCurveType;
|
|
2239
|
-
points: Vector2[];
|
|
2240
|
-
}
|
|
2258
|
+
export declare type Polygon = Vector2[];
|
|
2241
2259
|
|
|
2242
|
-
declare interface
|
|
2260
|
+
export declare interface PolygonCurve extends BaseShape {
|
|
2243
2261
|
type: 'curve:polygon';
|
|
2244
2262
|
points: Polygon;
|
|
2245
2263
|
}
|
|
2246
2264
|
|
|
2265
|
+
declare interface PolygonCurve_2 extends CurveBase {
|
|
2266
|
+
type: PolygonCurveType;
|
|
2267
|
+
points: Vector2_2[];
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2247
2270
|
declare type PolygonCurveType = typeof PolygonCurveTypeValue;
|
|
2248
2271
|
|
|
2249
2272
|
declare const PolygonCurveTypeValue = "curve:polygon";
|
|
2250
2273
|
|
|
2251
2274
|
/** outer ring counter clockwise, inner rings ( holes ) clockwise */
|
|
2252
|
-
declare type PolygonWithHoles = Polygon[];
|
|
2275
|
+
export declare type PolygonWithHoles = Polygon[];
|
|
2253
2276
|
|
|
2254
|
-
declare interface PolygonWithHolesCurve extends BaseShape {
|
|
2277
|
+
export declare interface PolygonWithHolesCurve extends BaseShape {
|
|
2255
2278
|
type: 'curve:polygonWithHoles';
|
|
2256
2279
|
polygons: PolygonWithHoles;
|
|
2257
2280
|
}
|
|
2258
2281
|
|
|
2259
|
-
declare interface
|
|
2260
|
-
type:
|
|
2261
|
-
|
|
2282
|
+
declare interface PolygonWithHolesCurve_2 extends CurveBase {
|
|
2283
|
+
type: PolygonWithHolesCurveType;
|
|
2284
|
+
polygons: Vector2_2[][];
|
|
2262
2285
|
}
|
|
2263
2286
|
|
|
2264
|
-
declare
|
|
2287
|
+
declare type PolygonWithHolesCurveType = typeof PolygonWithHolesCurveTypeValue;
|
|
2288
|
+
|
|
2289
|
+
declare const PolygonWithHolesCurveTypeValue = "curve:polygonWithHoles";
|
|
2290
|
+
|
|
2291
|
+
export declare interface PolylineCurve extends BaseShape {
|
|
2265
2292
|
type: 'curve:polyline';
|
|
2266
2293
|
points: Polygon;
|
|
2267
2294
|
}
|
|
2268
2295
|
|
|
2296
|
+
declare interface PolylineCurve_2 extends CurveBase {
|
|
2297
|
+
type: PolylineCurveType;
|
|
2298
|
+
points: Vector2_2[];
|
|
2299
|
+
}
|
|
2300
|
+
|
|
2269
2301
|
declare type PolylineCurveType = typeof PolylineCurveTypeValue;
|
|
2270
2302
|
|
|
2271
2303
|
declare const PolylineCurveTypeValue = "curve:polyline";
|
|
@@ -2274,17 +2306,17 @@ declare type PositionEntry = Vector3 | Vector3List | Vector3Range;
|
|
|
2274
2306
|
|
|
2275
2307
|
declare type ProductAttributes = SpaceGraphProduct['attributes'];
|
|
2276
2308
|
|
|
2277
|
-
declare interface RectangleCurve extends
|
|
2278
|
-
type: RectangleCurveType;
|
|
2279
|
-
dimensions: Vector2;
|
|
2280
|
-
}
|
|
2281
|
-
|
|
2282
|
-
declare interface RectangleCurve_2 extends BaseShape {
|
|
2309
|
+
export declare interface RectangleCurve extends BaseShape {
|
|
2283
2310
|
type: 'curve:rectangle';
|
|
2284
|
-
position:
|
|
2311
|
+
position: Vector2;
|
|
2285
2312
|
dimensions: [number, number];
|
|
2286
2313
|
}
|
|
2287
2314
|
|
|
2315
|
+
declare interface RectangleCurve_2 extends CurveBase {
|
|
2316
|
+
type: RectangleCurveType;
|
|
2317
|
+
dimensions: Vector2_2;
|
|
2318
|
+
}
|
|
2319
|
+
|
|
2288
2320
|
declare type RectangleCurveType = typeof RectangleCurveTypeValue;
|
|
2289
2321
|
|
|
2290
2322
|
declare const RectangleCurveTypeValue = "curve:rectangle";
|
|
@@ -2347,7 +2379,7 @@ declare type ScreenPosition = {
|
|
|
2347
2379
|
|
|
2348
2380
|
export declare const setApiUrls: ({ apiStorageUrl: newApiStorageUrl, spaceApiUrl, apiProductDataPath: newApiProductDataPath }?: ApiUrls) => void;
|
|
2349
2381
|
|
|
2350
|
-
export declare type Shape =
|
|
2382
|
+
export declare type Shape = PolygonCurve | PolygonWithHolesCurve | PolylineCurve | RectangleCurve | CircleCurve | LineCurve | GroupShape | TextShape | ArcCurve | BezierCurve | CompositeCurve;
|
|
2351
2383
|
|
|
2352
2384
|
declare type ShapeLayers = Record<string, Shape[]>;
|
|
2353
2385
|
|
|
@@ -2364,26 +2396,86 @@ declare class SpaceGraph {
|
|
|
2364
2396
|
spatialStructure: SpaceGraphSpatialStructure;
|
|
2365
2397
|
products: SpaceGraphProduct[];
|
|
2366
2398
|
productsById: Record<string, SpaceGraphProduct>;
|
|
2367
|
-
productsByType:
|
|
2399
|
+
productsByType: NodesByType<{
|
|
2400
|
+
readonly 'product:static': typeof SpaceGraphProduct;
|
|
2401
|
+
}>;
|
|
2368
2402
|
geometries: SpaceGraphGeometryJson[];
|
|
2369
2403
|
geometriesById: Record<string, SpaceGraphGeometryJson>;
|
|
2370
|
-
geometriesByType:
|
|
2404
|
+
geometriesByType: NodesByType<{
|
|
2405
|
+
readonly 'geometry:plane': typeof PlaneGeometry;
|
|
2406
|
+
readonly 'geometry:cuboid': typeof CuboidGeometry;
|
|
2407
|
+
readonly 'geometry:sphere': typeof SphereGeometry;
|
|
2408
|
+
readonly 'geometry:extrusion': typeof ExtrusionGeometry;
|
|
2409
|
+
readonly 'geometry:mesh': typeof MeshGeometry;
|
|
2410
|
+
readonly 'geometry:uri': typeof UriGeometry;
|
|
2411
|
+
}>;
|
|
2371
2412
|
materials: SpaceGraphMaterial[];
|
|
2372
2413
|
materialsById: Record<string, SpaceGraphMaterial>;
|
|
2373
|
-
materialsByType:
|
|
2414
|
+
materialsByType: NodesByType<{
|
|
2415
|
+
readonly 'material:embedded': typeof SpaceGraphEmbeddedMaterial;
|
|
2416
|
+
readonly 'material:basic': typeof SpaceGraphBasicMaterial;
|
|
2417
|
+
readonly 'material:color': typeof SpaceGraphColorMaterial;
|
|
2418
|
+
readonly 'material:standard': typeof SpaceGraphStandardMaterial;
|
|
2419
|
+
}>;
|
|
2374
2420
|
relations: SpaceGraphRelation[];
|
|
2375
2421
|
relationsById: Record<string, SpaceGraphRelation>;
|
|
2376
|
-
relationsByType:
|
|
2422
|
+
relationsByType: NodesByType<{
|
|
2423
|
+
readonly 'relation:group': typeof GroupRelation;
|
|
2424
|
+
}>;
|
|
2377
2425
|
nodes: SpaceGraphNode[];
|
|
2378
2426
|
nodesById: Record<string, SpaceGraphNode>;
|
|
2379
|
-
nodesByType:
|
|
2427
|
+
nodesByType: NodesByType<{
|
|
2428
|
+
readonly 'spatialStructure:building': typeof SpaceGraphBuilding;
|
|
2429
|
+
readonly 'spatialStructure:floor': typeof SpaceGraphFloor;
|
|
2430
|
+
readonly 'spatialStructure:layout': typeof SpaceGraphLayout;
|
|
2431
|
+
readonly 'relation:group': typeof GroupRelation;
|
|
2432
|
+
readonly 'product:static': typeof SpaceGraphProduct;
|
|
2433
|
+
readonly 'material:embedded': typeof SpaceGraphEmbeddedMaterial;
|
|
2434
|
+
readonly 'material:basic': typeof SpaceGraphBasicMaterial;
|
|
2435
|
+
readonly 'material:color': typeof SpaceGraphColorMaterial;
|
|
2436
|
+
readonly 'material:standard': typeof SpaceGraphStandardMaterial;
|
|
2437
|
+
readonly 'geometry:plane': typeof PlaneGeometry;
|
|
2438
|
+
readonly 'geometry:cuboid': typeof CuboidGeometry;
|
|
2439
|
+
readonly 'geometry:sphere': typeof SphereGeometry;
|
|
2440
|
+
readonly 'geometry:extrusion': typeof ExtrusionGeometry;
|
|
2441
|
+
readonly 'geometry:mesh': typeof MeshGeometry;
|
|
2442
|
+
readonly 'geometry:uri': typeof UriGeometry;
|
|
2443
|
+
readonly 'spatialGraph:edge': typeof SpatialGraphEdge;
|
|
2444
|
+
readonly 'spatialGraph:vertex': typeof SpatialGraphVertex;
|
|
2445
|
+
readonly 'layout:space': typeof LayoutSpace;
|
|
2446
|
+
readonly 'view:2d': typeof Layout2dView;
|
|
2447
|
+
readonly 'view:3d': typeof Layout3dView;
|
|
2448
|
+
readonly 'annotation:floorPlanDxf': typeof LayoutFloorPlanDxfAnnotation;
|
|
2449
|
+
readonly 'annotation:floorPlanImage': typeof LayoutFloorPlanImageAnnotation;
|
|
2450
|
+
readonly 'element:ceiling': typeof LayoutBoundarySlab;
|
|
2451
|
+
readonly 'element:floor': typeof LayoutBoundarySlab;
|
|
2452
|
+
readonly 'element:boundaryWall': typeof LayoutBoundaryWall;
|
|
2453
|
+
readonly 'element:curtainWall': typeof LayoutCurtainWall;
|
|
2454
|
+
readonly 'element:spaceDivider': typeof LayoutSpaceDivider;
|
|
2455
|
+
readonly 'element:wall': typeof LayoutWall;
|
|
2456
|
+
readonly 'element:opening': typeof LayoutOpening;
|
|
2457
|
+
readonly 'element:asset': typeof LayoutAsset;
|
|
2458
|
+
readonly 'element:beam': typeof LayoutBeam;
|
|
2459
|
+
readonly 'element:casework': typeof LayoutCasework;
|
|
2460
|
+
readonly 'element:column': typeof LayoutColumn;
|
|
2461
|
+
readonly 'element:door': typeof LayoutDoor;
|
|
2462
|
+
readonly 'element:generic': typeof LayoutGeneric;
|
|
2463
|
+
readonly 'element:kitchen': typeof LayoutKitchen;
|
|
2464
|
+
readonly 'element:railing': typeof LayoutRailing;
|
|
2465
|
+
readonly 'element:ramp': typeof LayoutRamp;
|
|
2466
|
+
readonly 'element:roof': typeof LayoutRoof;
|
|
2467
|
+
readonly 'element:slab': typeof LayoutSlab;
|
|
2468
|
+
readonly 'element:stairs': typeof LayoutStairs;
|
|
2469
|
+
readonly 'element:stairFlight': typeof LayoutStairFlight;
|
|
2470
|
+
readonly 'element:window': typeof LayoutWindow;
|
|
2471
|
+
}>;
|
|
2380
2472
|
private emitter;
|
|
2381
2473
|
constructor();
|
|
2382
2474
|
getEvents(): Record<string, Function>;
|
|
2383
2475
|
copyEvents(spaceGraph: SpaceGraph): void;
|
|
2384
|
-
deleteNodeAtIndex(nodeIndex: number, nodes: SpaceGraphNode[], nodesById: Record<string, SpaceGraphNode>, nodesByType: Record<string, SpaceGraphNode
|
|
2385
|
-
insertNode(node: SpaceGraphNode, nodes: SpaceGraphNode[], nodesById: Record<string, SpaceGraphNode>, nodesByType: Record<string, SpaceGraphNode
|
|
2386
|
-
removeNode(node: SpaceGraphNode, nodes: SpaceGraphNode[], nodesById: Record<string, SpaceGraphNode>, nodesByType: Record<string, SpaceGraphNode
|
|
2476
|
+
deleteNodeAtIndex(nodeIndex: number, nodes: SpaceGraphNode[], nodesById: Record<string, SpaceGraphNode>, nodesByType: NodesByType<Record<string, SpaceGraphNode>>): SpaceGraphNode | undefined;
|
|
2477
|
+
insertNode(node: SpaceGraphNode, nodes: SpaceGraphNode[], nodesById: Record<string, SpaceGraphNode>, nodesByType: NodesByType<Record<string, SpaceGraphNode>>): void;
|
|
2478
|
+
removeNode(node: SpaceGraphNode, nodes: SpaceGraphNode[], nodesById: Record<string, SpaceGraphNode>, nodesByType: NodesByType<Record<string, SpaceGraphNode>>): SpaceGraphNode | undefined;
|
|
2387
2479
|
registerNode(node: SpaceGraphNode): void;
|
|
2388
2480
|
unregisterNode(node: SpaceGraphNode): void;
|
|
2389
2481
|
insertSpatialStructure(spatialStructure: SpaceGraphSpatialStructure): void;
|
|
@@ -2569,13 +2661,41 @@ declare class SpaceGraphLayout extends SpaceGraphSpatialStructureBase {
|
|
|
2569
2661
|
spacesById: Record<string, LayoutSpace>;
|
|
2570
2662
|
elements: LayoutElement[];
|
|
2571
2663
|
elementsById: Record<string, LayoutElement>;
|
|
2572
|
-
elementsByType:
|
|
2664
|
+
elementsByType: NodesByType<{
|
|
2665
|
+
readonly 'element:ceiling': typeof LayoutBoundarySlab;
|
|
2666
|
+
readonly 'element:floor': typeof LayoutBoundarySlab;
|
|
2667
|
+
readonly 'element:boundaryWall': typeof LayoutBoundaryWall;
|
|
2668
|
+
readonly 'element:curtainWall': typeof LayoutCurtainWall;
|
|
2669
|
+
readonly 'element:spaceDivider': typeof LayoutSpaceDivider;
|
|
2670
|
+
readonly 'element:wall': typeof LayoutWall;
|
|
2671
|
+
readonly 'element:opening': typeof LayoutOpening;
|
|
2672
|
+
readonly 'element:asset': typeof LayoutAsset;
|
|
2673
|
+
readonly 'element:beam': typeof LayoutBeam;
|
|
2674
|
+
readonly 'element:casework': typeof LayoutCasework;
|
|
2675
|
+
readonly 'element:column': typeof LayoutColumn;
|
|
2676
|
+
readonly 'element:door': typeof LayoutDoor;
|
|
2677
|
+
readonly 'element:generic': typeof LayoutGeneric;
|
|
2678
|
+
readonly 'element:kitchen': typeof LayoutKitchen;
|
|
2679
|
+
readonly 'element:railing': typeof LayoutRailing;
|
|
2680
|
+
readonly 'element:ramp': typeof LayoutRamp;
|
|
2681
|
+
readonly 'element:roof': typeof LayoutRoof;
|
|
2682
|
+
readonly 'element:slab': typeof LayoutSlab;
|
|
2683
|
+
readonly 'element:stairs': typeof LayoutStairs;
|
|
2684
|
+
readonly 'element:stairFlight': typeof LayoutStairFlight;
|
|
2685
|
+
readonly 'element:window': typeof LayoutWindow;
|
|
2686
|
+
}>;
|
|
2573
2687
|
annotations: LayoutAnnotation[];
|
|
2574
2688
|
annotationsById: Record<string, LayoutAnnotation>;
|
|
2575
|
-
annotationsByType:
|
|
2689
|
+
annotationsByType: NodesByType<{
|
|
2690
|
+
readonly 'annotation:floorPlanDxf': typeof LayoutFloorPlanDxfAnnotation;
|
|
2691
|
+
readonly 'annotation:floorPlanImage': typeof LayoutFloorPlanImageAnnotation;
|
|
2692
|
+
}>;
|
|
2576
2693
|
views: LayoutView[];
|
|
2577
2694
|
viewsById: Record<string, LayoutView>;
|
|
2578
|
-
viewsByType:
|
|
2695
|
+
viewsByType: NodesByType<{
|
|
2696
|
+
readonly 'view:2d': typeof Layout2dView;
|
|
2697
|
+
readonly 'view:3d': typeof Layout3dView;
|
|
2698
|
+
}>;
|
|
2579
2699
|
debugIds: boolean;
|
|
2580
2700
|
suggestedIds: Record<string, boolean>;
|
|
2581
2701
|
constructor(id: string);
|
|
@@ -2588,7 +2708,7 @@ declare class SpaceGraphLayout extends SpaceGraphSpatialStructureBase {
|
|
|
2588
2708
|
createElement(type: LayoutOpeningType, id: string): LayoutOpening;
|
|
2589
2709
|
createElement(type: LayoutBoundarySlabType, id: string, boundaries: LayoutBoundary[]): LayoutBoundarySlab;
|
|
2590
2710
|
createElement(type: LayoutBoundaryWallType, id: string, boundaries: LayoutBoundary[]): LayoutBoundaryWall;
|
|
2591
|
-
createElement<T extends LayoutEdgeElementType>(type: T, id: string,
|
|
2711
|
+
createElement<T extends LayoutEdgeElementType>(type: T, id: string, edges: SpatialGraphEdge[]): EdgeElementMap[T];
|
|
2592
2712
|
createElement<T extends LayoutTransformElementType>(type: T, id: string): TransformElementMap[T];
|
|
2593
2713
|
insertNode(node: LayoutAnnotation | LayoutView): void;
|
|
2594
2714
|
removeNode(node: LayoutAnnotation | LayoutView): void;
|
|
@@ -2610,6 +2730,7 @@ declare class SpaceGraphLayout extends SpaceGraphSpatialStructureBase {
|
|
|
2610
2730
|
getUniqueId(prefix: string, nodesById: Record<string, SpaceGraphNode>): string;
|
|
2611
2731
|
getSpaceId(prefix?: string): string;
|
|
2612
2732
|
getElementId(element: LayoutElement, prefix?: string): string;
|
|
2733
|
+
getBoundingBox(): TransformBoundingBox3d;
|
|
2613
2734
|
}
|
|
2614
2735
|
|
|
2615
2736
|
declare interface SpaceGraphLayoutJson extends SpaceGraphSpatialStructureBaseJson {
|
|
@@ -2622,7 +2743,7 @@ declare interface SpaceGraphLayoutJson extends SpaceGraphSpatialStructureBaseJso
|
|
|
2622
2743
|
}
|
|
2623
2744
|
|
|
2624
2745
|
declare type SpaceGraphLocation = {
|
|
2625
|
-
latLong:
|
|
2746
|
+
latLong: Vector2_2;
|
|
2626
2747
|
rotation: number;
|
|
2627
2748
|
};
|
|
2628
2749
|
|
|
@@ -2636,7 +2757,7 @@ declare type SpaceGraphMaterialJson = Rgb | RgbA | string | SpaceGraphMaterialRe
|
|
|
2636
2757
|
|
|
2637
2758
|
declare type SpaceGraphMaterialResourceJson = SpaceGraphColorMaterialJson | SpaceGraphStandardMaterialJson | SpaceGraphBasicMaterialJson;
|
|
2638
2759
|
|
|
2639
|
-
declare type SpaceGraphNode = SpaceGraphProduct | SpaceGraphGeometry | SpaceGraphMaterial | SpaceGraphRelation | SpaceGraphBuilding | SpaceGraphFloor | LayoutNode | SpaceGraphLayout;
|
|
2760
|
+
declare type SpaceGraphNode = SpaceGraphProduct | SpaceGraphGeometry | SpaceGraphMaterial | SpaceGraphRelation | SpaceGraphBuilding | SpaceGraphFloor | LayoutNode | SpaceGraphLayout | LayoutAnnotation;
|
|
2640
2761
|
|
|
2641
2762
|
declare class SpaceGraphNodeBase extends SpaceGraphTypedValue {
|
|
2642
2763
|
id: string;
|
|
@@ -2772,7 +2893,7 @@ declare class SpatialGraphEdge extends SpatialGraphNodeBase {
|
|
|
2772
2893
|
boundaryWalls: [LayoutBoundaryWall | null, LayoutBoundaryWall | null];
|
|
2773
2894
|
element: LayoutEdgeElement | null;
|
|
2774
2895
|
constructor(id: string, vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex);
|
|
2775
|
-
getPoints(): [
|
|
2896
|
+
getPoints(): [Vector2, Vector2];
|
|
2776
2897
|
setVertices(vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex): void;
|
|
2777
2898
|
setVerticesByIds(vertexId1: string, vertexId2: string): void;
|
|
2778
2899
|
canSplit(u: number, options?: EdgeCanSplitOptions): boolean;
|
|
@@ -2802,7 +2923,7 @@ declare type SpatialGraphNodeType = SpatialGraphVertexType | SpatialGraphEdgeTyp
|
|
|
2802
2923
|
|
|
2803
2924
|
declare class SpatialGraphVertex extends SpatialGraphNodeBase {
|
|
2804
2925
|
type: SpatialGraphVertexType;
|
|
2805
|
-
position:
|
|
2926
|
+
position: Vector2_2;
|
|
2806
2927
|
edges: SpatialGraphEdge[];
|
|
2807
2928
|
constructor(id: string, x: number, y: number);
|
|
2808
2929
|
sortVertexEdges(): void;
|
|
@@ -2813,7 +2934,7 @@ declare class SpatialGraphVertex extends SpatialGraphNodeBase {
|
|
|
2813
2934
|
|
|
2814
2935
|
declare interface SpatialGraphVertexJson extends SpatialGraphNodeBaseJson {
|
|
2815
2936
|
type: SpatialGraphVertexType;
|
|
2816
|
-
position:
|
|
2937
|
+
position: Vector2_2;
|
|
2817
2938
|
}
|
|
2818
2939
|
|
|
2819
2940
|
declare type SpatialGraphVertexType = typeof SpatialGraphVertexTypeValue;
|
|
@@ -2932,9 +3053,9 @@ declare interface TemporaryAccessToken {
|
|
|
2932
3053
|
|
|
2933
3054
|
declare type TemporaryAccessTokenFunction = (args: CreateTemporaryAccessToken) => Promise<TemporaryAccessToken>;
|
|
2934
3055
|
|
|
2935
|
-
declare interface TextShape extends BaseShape {
|
|
3056
|
+
export declare interface TextShape extends BaseShape {
|
|
2936
3057
|
type: 'text';
|
|
2937
|
-
position:
|
|
3058
|
+
position: Vector2;
|
|
2938
3059
|
text: string;
|
|
2939
3060
|
rotation?: number;
|
|
2940
3061
|
alignV?: 'center' | 'bottom' | 'top';
|
|
@@ -3069,7 +3190,7 @@ declare type UriGeometryType = typeof UriGeometryTypeValue;
|
|
|
3069
3190
|
|
|
3070
3191
|
declare const UriGeometryTypeValue = "geometry:uri";
|
|
3071
3192
|
|
|
3072
|
-
declare type Vector2 = [number, number];
|
|
3193
|
+
export declare type Vector2 = [number, number];
|
|
3073
3194
|
|
|
3074
3195
|
declare type Vector2_2 = [number, number];
|
|
3075
3196
|
|
|
@@ -3092,9 +3213,9 @@ declare interface Vector3Range extends SpaceGraphTypedValueJson {
|
|
|
3092
3213
|
declare type ViewEvent = 'pan' | 'zoom' | 'viewbox' | 'resize-canvas' | 'scene-rendered' | 'focus';
|
|
3093
3214
|
|
|
3094
3215
|
declare class WebGlView extends TinyEmitter {
|
|
3095
|
-
windowPos:
|
|
3216
|
+
windowPos: Vector2;
|
|
3096
3217
|
zoom: number;
|
|
3097
|
-
client:
|
|
3218
|
+
client: Vector2;
|
|
3098
3219
|
layers: Map<string, PlanLayer>;
|
|
3099
3220
|
viewbox: BoundingBox2d;
|
|
3100
3221
|
styleCache: Record<string, ShapeStyle | 'selected'>;
|