@archilogic/floor-plan-sdk 5.0.1 → 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 +2 -9
- package/dist/fpe.d.ts +106 -99
- package/dist/fpe.js +2568 -2651
- package/dist/fpe.umd.cjs +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -8,15 +8,6 @@ The @archilogic/floor-plan-sdk package enables you to create and embed interacti
|
|
|
8
8
|
npm i @archilogic/floor-plan-sdk
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
## API Extractor
|
|
12
|
-
|
|
13
|
-
This package uses [API Extractor](https://api-extractor.com/) to generate [API report](./api.md) and [doc model](https://api-extractor.com/pages/overview/demo_docs/#whats-in-the-json-file) files
|
|
14
|
-
|
|
15
|
-
- The API report is used to track changes to the public API. This file is internal and tracked by git
|
|
16
|
-
- The doc model file is distributed with the npm package, and is used to generate the public documentation
|
|
17
|
-
|
|
18
|
-
Both files are generated by the `npm run build:api` command
|
|
19
|
-
|
|
20
11
|
## Usage
|
|
21
12
|
|
|
22
13
|
### npm package
|
|
@@ -43,3 +34,5 @@ import { FloorPlanEngine } from 'https://esm.sh/@archilogic/floor-plan-sdk'
|
|
|
43
34
|
const { FloorPlanEngine } = FloorPlanSdk
|
|
44
35
|
</script>
|
|
45
36
|
```
|
|
37
|
+
|
|
38
|
+
Check the detailed [documentation](https://developers.archilogic.com/floor-plan-engine/guide).
|
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
|
|
|
@@ -1389,7 +1387,7 @@ declare class LayoutEdgeElementBase extends LayoutElementBase {
|
|
|
1389
1387
|
getVertices(): SpatialGraphVertex[];
|
|
1390
1388
|
getStartVertex(): SpatialGraphVertex;
|
|
1391
1389
|
getEndVertex(): SpatialGraphVertex;
|
|
1392
|
-
getAxisPoints(): [
|
|
1390
|
+
getAxisPoints(): [Vector2_2, Vector2_2];
|
|
1393
1391
|
getAxisLength(): number;
|
|
1394
1392
|
getEdgeAtLinearPosition(u: number): SpatialGraphEdge | undefined;
|
|
1395
1393
|
getEdgesAtLinearSegment(u: number, v: number): SpatialGraphEdge[];
|
|
@@ -1464,7 +1462,7 @@ declare interface LayoutFloorPlanDxfAnnotationJson extends LayoutAnnotationBaseJ
|
|
|
1464
1462
|
|
|
1465
1463
|
declare interface LayoutFloorPlanDxfParameters {
|
|
1466
1464
|
uri: string;
|
|
1467
|
-
drawingOrigin:
|
|
1465
|
+
drawingOrigin: Vector2_2;
|
|
1468
1466
|
hiddenLayers: string[];
|
|
1469
1467
|
}
|
|
1470
1468
|
|
|
@@ -1528,7 +1526,7 @@ declare interface LayoutGenericParameters {
|
|
|
1528
1526
|
|
|
1529
1527
|
declare type LayoutGenericParametersJson = Partial<LayoutGenericParameters>;
|
|
1530
1528
|
|
|
1531
|
-
declare type LayoutGenericProfile = 'none' |
|
|
1529
|
+
declare type LayoutGenericProfile = 'none' | RectangleCurve_2 | CircleCurve_2 | PolygonCurve_2 | PolygonWithHolesCurve_2;
|
|
1532
1530
|
|
|
1533
1531
|
declare type LayoutGenericType = typeof LayoutGenericTypeValue;
|
|
1534
1532
|
|
|
@@ -1623,8 +1621,8 @@ declare interface LayoutOpeningMaterials {
|
|
|
1623
1621
|
}
|
|
1624
1622
|
|
|
1625
1623
|
declare interface LayoutOpeningParameters {
|
|
1626
|
-
position:
|
|
1627
|
-
dimensions:
|
|
1624
|
+
position: Vector2_2;
|
|
1625
|
+
dimensions: Vector2_2;
|
|
1628
1626
|
materials: LayoutOpeningMaterials;
|
|
1629
1627
|
}
|
|
1630
1628
|
|
|
@@ -1733,7 +1731,7 @@ declare interface LayoutSlabParameters {
|
|
|
1733
1731
|
|
|
1734
1732
|
declare type LayoutSlabParametersJson = Partial<LayoutSlabParameters>;
|
|
1735
1733
|
|
|
1736
|
-
declare type LayoutSlabProfile =
|
|
1734
|
+
declare type LayoutSlabProfile = RectangleCurve_2 | CircleCurve_2 | PolygonCurve_2 | PolygonWithHolesCurve_2;
|
|
1737
1735
|
|
|
1738
1736
|
declare type LayoutSlabType = typeof LayoutSlabTypeValue;
|
|
1739
1737
|
|
|
@@ -1804,7 +1802,7 @@ declare type LayoutSpaceDividerType = typeof LayoutSpaceDividerTypeValue;
|
|
|
1804
1802
|
declare const LayoutSpaceDividerTypeValue = "element:spaceDivider";
|
|
1805
1803
|
|
|
1806
1804
|
declare interface LayoutSpaceGeometry {
|
|
1807
|
-
polygons:
|
|
1805
|
+
polygons: Vector2_2[][];
|
|
1808
1806
|
}
|
|
1809
1807
|
|
|
1810
1808
|
declare interface LayoutSpaceJson extends LayoutNodeBaseJson {
|
|
@@ -1992,11 +1990,11 @@ declare interface LayoutWallGeometryProfile {
|
|
|
1992
1990
|
valid: boolean;
|
|
1993
1991
|
skipped: boolean;
|
|
1994
1992
|
selfIntersecting: boolean;
|
|
1995
|
-
sidePoints1:
|
|
1996
|
-
sidePoints2:
|
|
1997
|
-
joinPoints1:
|
|
1998
|
-
joinPoints2:
|
|
1999
|
-
points:
|
|
1993
|
+
sidePoints1: Vector2_2[];
|
|
1994
|
+
sidePoints2: Vector2_2[];
|
|
1995
|
+
joinPoints1: Vector2_2[];
|
|
1996
|
+
joinPoints2: Vector2_2[];
|
|
1997
|
+
points: Vector2_2[];
|
|
2000
1998
|
}
|
|
2001
1999
|
|
|
2002
2000
|
declare interface LayoutWallJson extends LayoutEdgeElementBaseJson {
|
|
@@ -2052,14 +2050,14 @@ declare type LayoutWindowType = typeof LayoutWindowTypeValue;
|
|
|
2052
2050
|
|
|
2053
2051
|
declare const LayoutWindowTypeValue = "element:window";
|
|
2054
2052
|
|
|
2055
|
-
declare interface LineCurve extends
|
|
2056
|
-
type:
|
|
2053
|
+
export declare interface LineCurve extends BaseShape {
|
|
2054
|
+
type: 'curve:line';
|
|
2057
2055
|
start: Vector2;
|
|
2058
2056
|
end: Vector2;
|
|
2059
2057
|
}
|
|
2060
2058
|
|
|
2061
|
-
declare interface LineCurve_2 extends
|
|
2062
|
-
type:
|
|
2059
|
+
declare interface LineCurve_2 extends CurveBase {
|
|
2060
|
+
type: LineCurveType;
|
|
2063
2061
|
start: Vector2_2;
|
|
2064
2062
|
end: Vector2_2;
|
|
2065
2063
|
}
|
|
@@ -2072,7 +2070,7 @@ declare type LoadingEvent = 'loading-done' | 'loading-status' | 'resource-loaded
|
|
|
2072
2070
|
|
|
2073
2071
|
declare interface MarkerArgs {
|
|
2074
2072
|
/** coordinates of the marker in meters */
|
|
2075
|
-
position?:
|
|
2073
|
+
position?: Vector2;
|
|
2076
2074
|
/** color of the marker, hex code */
|
|
2077
2075
|
color?: string;
|
|
2078
2076
|
/** size in pixels */
|
|
@@ -2081,7 +2079,7 @@ declare interface MarkerArgs {
|
|
|
2081
2079
|
}
|
|
2082
2080
|
|
|
2083
2081
|
declare class MarkerPin {
|
|
2084
|
-
position:
|
|
2082
|
+
position: Vector2;
|
|
2085
2083
|
color: string;
|
|
2086
2084
|
size: number;
|
|
2087
2085
|
id: string;
|
|
@@ -2146,9 +2144,9 @@ declare interface NumberRange extends SpaceGraphTypedValueJson {
|
|
|
2146
2144
|
};
|
|
2147
2145
|
}
|
|
2148
2146
|
|
|
2149
|
-
declare type OpenCurve =
|
|
2147
|
+
declare type OpenCurve = LineCurve_2 | PolylineCurve_2 | ArcCurve_2;
|
|
2150
2148
|
|
|
2151
|
-
declare type OpenCurves =
|
|
2149
|
+
declare type OpenCurves = LineCurve | ArcCurve | PolylineCurve | BezierCurve;
|
|
2152
2150
|
|
|
2153
2151
|
declare type OpenCurveType = LineCurveType | PolylineCurveType | ArcCurveType;
|
|
2154
2152
|
|
|
@@ -2257,40 +2255,49 @@ declare class PlanLayer {
|
|
|
2257
2255
|
destroy(): void;
|
|
2258
2256
|
}
|
|
2259
2257
|
|
|
2260
|
-
declare type Polygon =
|
|
2258
|
+
export declare type Polygon = Vector2[];
|
|
2261
2259
|
|
|
2262
|
-
declare interface PolygonCurve extends
|
|
2263
|
-
type: PolygonCurveType;
|
|
2264
|
-
points: Vector2[];
|
|
2265
|
-
}
|
|
2266
|
-
|
|
2267
|
-
declare interface PolygonCurve_2 extends BaseShape {
|
|
2260
|
+
export declare interface PolygonCurve extends BaseShape {
|
|
2268
2261
|
type: 'curve:polygon';
|
|
2269
2262
|
points: Polygon;
|
|
2270
2263
|
}
|
|
2271
2264
|
|
|
2265
|
+
declare interface PolygonCurve_2 extends CurveBase {
|
|
2266
|
+
type: PolygonCurveType;
|
|
2267
|
+
points: Vector2_2[];
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2272
2270
|
declare type PolygonCurveType = typeof PolygonCurveTypeValue;
|
|
2273
2271
|
|
|
2274
2272
|
declare const PolygonCurveTypeValue = "curve:polygon";
|
|
2275
2273
|
|
|
2276
2274
|
/** outer ring counter clockwise, inner rings ( holes ) clockwise */
|
|
2277
|
-
declare type PolygonWithHoles = Polygon[];
|
|
2275
|
+
export declare type PolygonWithHoles = Polygon[];
|
|
2278
2276
|
|
|
2279
|
-
declare interface PolygonWithHolesCurve extends BaseShape {
|
|
2277
|
+
export declare interface PolygonWithHolesCurve extends BaseShape {
|
|
2280
2278
|
type: 'curve:polygonWithHoles';
|
|
2281
2279
|
polygons: PolygonWithHoles;
|
|
2282
2280
|
}
|
|
2283
2281
|
|
|
2284
|
-
declare interface
|
|
2285
|
-
type:
|
|
2286
|
-
|
|
2282
|
+
declare interface PolygonWithHolesCurve_2 extends CurveBase {
|
|
2283
|
+
type: PolygonWithHolesCurveType;
|
|
2284
|
+
polygons: Vector2_2[][];
|
|
2287
2285
|
}
|
|
2288
2286
|
|
|
2289
|
-
declare
|
|
2287
|
+
declare type PolygonWithHolesCurveType = typeof PolygonWithHolesCurveTypeValue;
|
|
2288
|
+
|
|
2289
|
+
declare const PolygonWithHolesCurveTypeValue = "curve:polygonWithHoles";
|
|
2290
|
+
|
|
2291
|
+
export declare interface PolylineCurve extends BaseShape {
|
|
2290
2292
|
type: 'curve:polyline';
|
|
2291
2293
|
points: Polygon;
|
|
2292
2294
|
}
|
|
2293
2295
|
|
|
2296
|
+
declare interface PolylineCurve_2 extends CurveBase {
|
|
2297
|
+
type: PolylineCurveType;
|
|
2298
|
+
points: Vector2_2[];
|
|
2299
|
+
}
|
|
2300
|
+
|
|
2294
2301
|
declare type PolylineCurveType = typeof PolylineCurveTypeValue;
|
|
2295
2302
|
|
|
2296
2303
|
declare const PolylineCurveTypeValue = "curve:polyline";
|
|
@@ -2299,17 +2306,17 @@ declare type PositionEntry = Vector3 | Vector3List | Vector3Range;
|
|
|
2299
2306
|
|
|
2300
2307
|
declare type ProductAttributes = SpaceGraphProduct['attributes'];
|
|
2301
2308
|
|
|
2302
|
-
declare interface RectangleCurve extends
|
|
2303
|
-
type: RectangleCurveType;
|
|
2304
|
-
dimensions: Vector2;
|
|
2305
|
-
}
|
|
2306
|
-
|
|
2307
|
-
declare interface RectangleCurve_2 extends BaseShape {
|
|
2309
|
+
export declare interface RectangleCurve extends BaseShape {
|
|
2308
2310
|
type: 'curve:rectangle';
|
|
2309
|
-
position:
|
|
2311
|
+
position: Vector2;
|
|
2310
2312
|
dimensions: [number, number];
|
|
2311
2313
|
}
|
|
2312
2314
|
|
|
2315
|
+
declare interface RectangleCurve_2 extends CurveBase {
|
|
2316
|
+
type: RectangleCurveType;
|
|
2317
|
+
dimensions: Vector2_2;
|
|
2318
|
+
}
|
|
2319
|
+
|
|
2313
2320
|
declare type RectangleCurveType = typeof RectangleCurveTypeValue;
|
|
2314
2321
|
|
|
2315
2322
|
declare const RectangleCurveTypeValue = "curve:rectangle";
|
|
@@ -2372,7 +2379,7 @@ declare type ScreenPosition = {
|
|
|
2372
2379
|
|
|
2373
2380
|
export declare const setApiUrls: ({ apiStorageUrl: newApiStorageUrl, spaceApiUrl, apiProductDataPath: newApiProductDataPath }?: ApiUrls) => void;
|
|
2374
2381
|
|
|
2375
|
-
export declare type Shape =
|
|
2382
|
+
export declare type Shape = PolygonCurve | PolygonWithHolesCurve | PolylineCurve | RectangleCurve | CircleCurve | LineCurve | GroupShape | TextShape | ArcCurve | BezierCurve | CompositeCurve;
|
|
2376
2383
|
|
|
2377
2384
|
declare type ShapeLayers = Record<string, Shape[]>;
|
|
2378
2385
|
|
|
@@ -2736,7 +2743,7 @@ declare interface SpaceGraphLayoutJson extends SpaceGraphSpatialStructureBaseJso
|
|
|
2736
2743
|
}
|
|
2737
2744
|
|
|
2738
2745
|
declare type SpaceGraphLocation = {
|
|
2739
|
-
latLong:
|
|
2746
|
+
latLong: Vector2_2;
|
|
2740
2747
|
rotation: number;
|
|
2741
2748
|
};
|
|
2742
2749
|
|
|
@@ -2886,7 +2893,7 @@ declare class SpatialGraphEdge extends SpatialGraphNodeBase {
|
|
|
2886
2893
|
boundaryWalls: [LayoutBoundaryWall | null, LayoutBoundaryWall | null];
|
|
2887
2894
|
element: LayoutEdgeElement | null;
|
|
2888
2895
|
constructor(id: string, vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex);
|
|
2889
|
-
getPoints(): [
|
|
2896
|
+
getPoints(): [Vector2, Vector2];
|
|
2890
2897
|
setVertices(vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex): void;
|
|
2891
2898
|
setVerticesByIds(vertexId1: string, vertexId2: string): void;
|
|
2892
2899
|
canSplit(u: number, options?: EdgeCanSplitOptions): boolean;
|
|
@@ -2916,7 +2923,7 @@ declare type SpatialGraphNodeType = SpatialGraphVertexType | SpatialGraphEdgeTyp
|
|
|
2916
2923
|
|
|
2917
2924
|
declare class SpatialGraphVertex extends SpatialGraphNodeBase {
|
|
2918
2925
|
type: SpatialGraphVertexType;
|
|
2919
|
-
position:
|
|
2926
|
+
position: Vector2_2;
|
|
2920
2927
|
edges: SpatialGraphEdge[];
|
|
2921
2928
|
constructor(id: string, x: number, y: number);
|
|
2922
2929
|
sortVertexEdges(): void;
|
|
@@ -2927,7 +2934,7 @@ declare class SpatialGraphVertex extends SpatialGraphNodeBase {
|
|
|
2927
2934
|
|
|
2928
2935
|
declare interface SpatialGraphVertexJson extends SpatialGraphNodeBaseJson {
|
|
2929
2936
|
type: SpatialGraphVertexType;
|
|
2930
|
-
position:
|
|
2937
|
+
position: Vector2_2;
|
|
2931
2938
|
}
|
|
2932
2939
|
|
|
2933
2940
|
declare type SpatialGraphVertexType = typeof SpatialGraphVertexTypeValue;
|
|
@@ -3046,9 +3053,9 @@ declare interface TemporaryAccessToken {
|
|
|
3046
3053
|
|
|
3047
3054
|
declare type TemporaryAccessTokenFunction = (args: CreateTemporaryAccessToken) => Promise<TemporaryAccessToken>;
|
|
3048
3055
|
|
|
3049
|
-
declare interface TextShape extends BaseShape {
|
|
3056
|
+
export declare interface TextShape extends BaseShape {
|
|
3050
3057
|
type: 'text';
|
|
3051
|
-
position:
|
|
3058
|
+
position: Vector2;
|
|
3052
3059
|
text: string;
|
|
3053
3060
|
rotation?: number;
|
|
3054
3061
|
alignV?: 'center' | 'bottom' | 'top';
|
|
@@ -3183,7 +3190,7 @@ declare type UriGeometryType = typeof UriGeometryTypeValue;
|
|
|
3183
3190
|
|
|
3184
3191
|
declare const UriGeometryTypeValue = "geometry:uri";
|
|
3185
3192
|
|
|
3186
|
-
declare type Vector2 = [number, number];
|
|
3193
|
+
export declare type Vector2 = [number, number];
|
|
3187
3194
|
|
|
3188
3195
|
declare type Vector2_2 = [number, number];
|
|
3189
3196
|
|
|
@@ -3206,9 +3213,9 @@ declare interface Vector3Range extends SpaceGraphTypedValueJson {
|
|
|
3206
3213
|
declare type ViewEvent = 'pan' | 'zoom' | 'viewbox' | 'resize-canvas' | 'scene-rendered' | 'focus';
|
|
3207
3214
|
|
|
3208
3215
|
declare class WebGlView extends TinyEmitter {
|
|
3209
|
-
windowPos:
|
|
3216
|
+
windowPos: Vector2;
|
|
3210
3217
|
zoom: number;
|
|
3211
|
-
client:
|
|
3218
|
+
client: Vector2;
|
|
3212
3219
|
layers: Map<string, PlanLayer>;
|
|
3213
3220
|
viewbox: BoundingBox2d;
|
|
3214
3221
|
styleCache: Record<string, ShapeStyle | 'selected'>;
|