@archilogic/floor-plan-sdk 5.0.0-rc.2 → 5.0.0-rc.3
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 +55 -40
- package/dist/fpe.js +19319 -10234
- package/dist/fpe.umd.cjs +4 -5
- package/package.json +4 -1
package/dist/fpe.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ declare interface ArcCurve extends CurveBase {
|
|
|
45
45
|
|
|
46
46
|
declare interface ArcCurve_2 extends BaseShape {
|
|
47
47
|
type: 'curve:arc';
|
|
48
|
-
position:
|
|
48
|
+
position: Vector2_3;
|
|
49
49
|
radius: number;
|
|
50
50
|
startAngle: number;
|
|
51
51
|
endAngle: number;
|
|
@@ -78,8 +78,8 @@ declare interface BezierCurve extends BaseShape {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
declare type BoundingBox2d = {
|
|
81
|
-
min:
|
|
82
|
-
max:
|
|
81
|
+
min: Vector2_3;
|
|
82
|
+
max: Vector2_3;
|
|
83
83
|
};
|
|
84
84
|
|
|
85
85
|
declare type BoundingBox3d = {
|
|
@@ -94,7 +94,7 @@ declare interface CircleCurve extends CurveBase {
|
|
|
94
94
|
|
|
95
95
|
declare interface CircleCurve_2 extends BaseShape {
|
|
96
96
|
type: 'curve:circle';
|
|
97
|
-
position:
|
|
97
|
+
position: Vector2_3;
|
|
98
98
|
radius: number;
|
|
99
99
|
}
|
|
100
100
|
|
|
@@ -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_3): {
|
|
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_3): Vector2_3;
|
|
457
457
|
/**
|
|
458
458
|
* Convert plan coordinates to screen coordinates
|
|
459
459
|
*/
|
|
460
|
-
getScreenPosition(point:
|
|
460
|
+
getScreenPosition(point: Vector2_3): Vector2_3;
|
|
461
461
|
/**
|
|
462
462
|
* create plan layer or return existing by id
|
|
463
463
|
*/
|
|
@@ -546,7 +546,7 @@ declare type FloorPlanTheme = {
|
|
|
546
546
|
|
|
547
547
|
declare type FpeComputed = {
|
|
548
548
|
wallContours: PolygonWithHoles[];
|
|
549
|
-
snapPoints:
|
|
549
|
+
snapPoints: Vector2_3[];
|
|
550
550
|
snapMargin: number;
|
|
551
551
|
};
|
|
552
552
|
|
|
@@ -573,14 +573,14 @@ declare type FpeCoreEventMap = {
|
|
|
573
573
|
};
|
|
574
574
|
|
|
575
575
|
export declare type FpeDragEvent = {
|
|
576
|
-
position:
|
|
577
|
-
screenPos:
|
|
576
|
+
position: Vector2_3;
|
|
577
|
+
screenPos: Vector2_3;
|
|
578
578
|
sourceEvent: FpeInteractionEvent;
|
|
579
579
|
};
|
|
580
580
|
|
|
581
581
|
export declare type FpeDropEvent = {
|
|
582
|
-
position:
|
|
583
|
-
screenPos:
|
|
582
|
+
position: Vector2_3;
|
|
583
|
+
screenPos: Vector2_3;
|
|
584
584
|
verticalPos: number;
|
|
585
585
|
sourceEvent: DragEvent;
|
|
586
586
|
};
|
|
@@ -615,8 +615,8 @@ export declare type FpeEventMap = FpeCoreEventMap & {
|
|
|
615
615
|
};
|
|
616
616
|
|
|
617
617
|
declare interface FpeInteraction {
|
|
618
|
-
lastSceneClick:
|
|
619
|
-
cursor:
|
|
618
|
+
lastSceneClick: Vector2_3;
|
|
619
|
+
cursor: Vector2_3;
|
|
620
620
|
cursorTarget: LayoutElement | LayoutSpace;
|
|
621
621
|
isDragging: boolean;
|
|
622
622
|
isPanning: boolean;
|
|
@@ -628,13 +628,18 @@ declare interface FpeInteraction {
|
|
|
628
628
|
ctrlKey: boolean;
|
|
629
629
|
altKey: boolean;
|
|
630
630
|
shiftKey: boolean;
|
|
631
|
-
dragOffset:
|
|
631
|
+
dragOffset: Vector2_3;
|
|
632
632
|
cursorAction: 'split-wall' | 'duplicate' | 'move' | 'select' | 'none';
|
|
633
633
|
_dragStart: ScreenPosition;
|
|
634
634
|
preventFocusoutOnAltKeyup: boolean;
|
|
635
635
|
}
|
|
636
636
|
|
|
637
|
-
export declare type FpeInteractionEvent =
|
|
637
|
+
export declare type FpeInteractionEvent = FpeInteractionEventType[keyof FpeInteractionEventType];
|
|
638
|
+
|
|
639
|
+
export declare type FpeInteractionEventType = {
|
|
640
|
+
/* Excluded from this release type: pixi */
|
|
641
|
+
dom: MouseEvent;
|
|
642
|
+
};
|
|
638
643
|
|
|
639
644
|
export declare type FpeKeyEvent = {
|
|
640
645
|
key: string;
|
|
@@ -677,7 +682,7 @@ declare type FpeLoader_2 = FloorPlanCore['loader'];
|
|
|
677
682
|
|
|
678
683
|
export declare type FpePointerEvent = {
|
|
679
684
|
nodeId?: string;
|
|
680
|
-
position:
|
|
685
|
+
position: Vector2_3;
|
|
681
686
|
isDoubleClick?: boolean;
|
|
682
687
|
sourceEvent: FpeInteractionEvent;
|
|
683
688
|
};
|
|
@@ -848,7 +853,7 @@ declare class Graph {
|
|
|
848
853
|
|
|
849
854
|
export declare interface GraphicArgs {
|
|
850
855
|
shapes: Shape[];
|
|
851
|
-
position?:
|
|
856
|
+
position?: Vector2_3;
|
|
852
857
|
alpha?: number;
|
|
853
858
|
clearLayer?: boolean;
|
|
854
859
|
scale?: number;
|
|
@@ -860,7 +865,7 @@ export declare interface GraphicArgs {
|
|
|
860
865
|
}
|
|
861
866
|
|
|
862
867
|
declare type GraphicUpdate = {
|
|
863
|
-
position?:
|
|
868
|
+
position?: Vector2_3;
|
|
864
869
|
style?: ShapeStyle;
|
|
865
870
|
shapes?: Shape[];
|
|
866
871
|
};
|
|
@@ -885,7 +890,7 @@ declare const GroupRelationTypeValue = "relation:group";
|
|
|
885
890
|
|
|
886
891
|
declare interface GroupShape extends BaseShape {
|
|
887
892
|
type: 'group';
|
|
888
|
-
position?:
|
|
893
|
+
position?: Vector2_3;
|
|
889
894
|
rotation?: number;
|
|
890
895
|
children: Shape[];
|
|
891
896
|
}
|
|
@@ -908,9 +913,9 @@ declare type HideableElement = LayoutElement['type'] | LayoutSpace['type'] | Spa
|
|
|
908
913
|
declare type HingeSide = 'left' | 'right';
|
|
909
914
|
|
|
910
915
|
declare class HtmlMarker {
|
|
911
|
-
position:
|
|
912
|
-
size:
|
|
913
|
-
offset:
|
|
916
|
+
position: Vector2_3;
|
|
917
|
+
size: Vector2_3;
|
|
918
|
+
offset: Vector2_3;
|
|
914
919
|
isHidden: boolean;
|
|
915
920
|
id: string;
|
|
916
921
|
el: HTMLElement;
|
|
@@ -925,8 +930,8 @@ declare class HtmlMarker {
|
|
|
925
930
|
|
|
926
931
|
declare interface HtmlMarkerArgs {
|
|
927
932
|
/** coordinates of the window in meters */
|
|
928
|
-
position?:
|
|
929
|
-
offset?:
|
|
933
|
+
position?: Vector2_3;
|
|
934
|
+
offset?: Vector2_3;
|
|
930
935
|
/** html string as content of the info window */
|
|
931
936
|
el?: HTMLElement;
|
|
932
937
|
/** If true , a close button will appear in the top right corner of the info window. */
|
|
@@ -945,7 +950,7 @@ declare type IndexRange = {
|
|
|
945
950
|
|
|
946
951
|
declare class InfoWindow {
|
|
947
952
|
private _floorPlan;
|
|
948
|
-
position:
|
|
953
|
+
position: Vector2_3;
|
|
949
954
|
height: number;
|
|
950
955
|
width: number;
|
|
951
956
|
closeButton: any;
|
|
@@ -973,7 +978,7 @@ declare interface InfoWindowArgs {
|
|
|
973
978
|
/** pixel height of the window - default 80 */
|
|
974
979
|
height?: number;
|
|
975
980
|
/** coordinates of the window in meters */
|
|
976
|
-
position?:
|
|
981
|
+
position?: Vector2_3;
|
|
977
982
|
/** html string as content of the info window */
|
|
978
983
|
html?: string;
|
|
979
984
|
/** If true , a close button will appear in the top right corner of the info window. */
|
|
@@ -984,10 +989,6 @@ declare interface InfoWindowState extends InfoWindowArgs {
|
|
|
984
989
|
floorPlan?: FloorPlanEngine;
|
|
985
990
|
}
|
|
986
991
|
|
|
987
|
-
declare type InteractionEventType = {
|
|
988
|
-
dom: MouseEvent;
|
|
989
|
-
};
|
|
990
|
-
|
|
991
992
|
declare class Layout2dView extends LayoutViewBase {
|
|
992
993
|
type: Layout2dViewType;
|
|
993
994
|
parameters: Layout2dViewParameters;
|
|
@@ -2039,8 +2040,8 @@ declare interface LineCurve extends CurveBase {
|
|
|
2039
2040
|
|
|
2040
2041
|
declare interface LineCurve_2 extends BaseShape {
|
|
2041
2042
|
type: 'curve:line';
|
|
2042
|
-
start:
|
|
2043
|
-
end:
|
|
2043
|
+
start: Vector2_3;
|
|
2044
|
+
end: Vector2_3;
|
|
2044
2045
|
}
|
|
2045
2046
|
|
|
2046
2047
|
declare type LineCurveType = typeof LineCurveTypeValue;
|
|
@@ -2051,7 +2052,7 @@ declare type LoadingEvent = 'loading-done' | 'loading-status' | 'resource-loaded
|
|
|
2051
2052
|
|
|
2052
2053
|
declare interface MarkerArgs {
|
|
2053
2054
|
/** coordinates of the marker in meters */
|
|
2054
|
-
position?:
|
|
2055
|
+
position?: Vector2_3;
|
|
2055
2056
|
/** color of the marker, hex code */
|
|
2056
2057
|
color?: string;
|
|
2057
2058
|
/** size in pixels */
|
|
@@ -2060,7 +2061,7 @@ declare interface MarkerArgs {
|
|
|
2060
2061
|
}
|
|
2061
2062
|
|
|
2062
2063
|
declare class MarkerPin {
|
|
2063
|
-
position:
|
|
2064
|
+
position: Vector2_3;
|
|
2064
2065
|
color: string;
|
|
2065
2066
|
size: number;
|
|
2066
2067
|
id: string;
|
|
@@ -2189,7 +2190,9 @@ declare const PlaneGeometryTypeValue = "geometry:plane";
|
|
|
2189
2190
|
|
|
2190
2191
|
declare class PlanGraphic {
|
|
2191
2192
|
shapes: Shape[];
|
|
2193
|
+
/* Excluded from this release type: gfx */
|
|
2192
2194
|
scaleOnZoom: boolean;
|
|
2195
|
+
/* Excluded from this release type: container */
|
|
2193
2196
|
gfxScale: number;
|
|
2194
2197
|
private floorPlan;
|
|
2195
2198
|
constructor({ shapes, position, alpha, scale, clearLayer, interactive, id, isHandler, scaleOnZoom, updatePositionOnDrag, baseLayer, container, floorPlan }: PlanGraphicArgs);
|
|
@@ -2204,10 +2207,13 @@ declare class PlanGraphic {
|
|
|
2204
2207
|
|
|
2205
2208
|
declare interface PlanGraphicArgs extends GraphicArgs {
|
|
2206
2209
|
floorPlan: FloorPlanEngine;
|
|
2210
|
+
/* Excluded from this release type: baseLayer */
|
|
2211
|
+
/* Excluded from this release type: container */
|
|
2207
2212
|
[key: string]: any;
|
|
2208
2213
|
}
|
|
2209
2214
|
|
|
2210
2215
|
declare class PlanLayer {
|
|
2216
|
+
/* Excluded from this release type: container */
|
|
2211
2217
|
graphics: Set<PlanGraphic>;
|
|
2212
2218
|
id: string;
|
|
2213
2219
|
private baseLayer;
|
|
@@ -2225,7 +2231,7 @@ declare class PlanLayer {
|
|
|
2225
2231
|
destroy(): void;
|
|
2226
2232
|
}
|
|
2227
2233
|
|
|
2228
|
-
declare type Polygon =
|
|
2234
|
+
declare type Polygon = Vector2_3[];
|
|
2229
2235
|
|
|
2230
2236
|
declare interface PolygonCurve extends CurveBase {
|
|
2231
2237
|
type: PolygonCurveType;
|
|
@@ -2274,7 +2280,7 @@ declare interface RectangleCurve extends CurveBase {
|
|
|
2274
2280
|
|
|
2275
2281
|
declare interface RectangleCurve_2 extends BaseShape {
|
|
2276
2282
|
type: 'curve:rectangle';
|
|
2277
|
-
position:
|
|
2283
|
+
position: Vector2_3;
|
|
2278
2284
|
dimensions: [number, number];
|
|
2279
2285
|
}
|
|
2280
2286
|
|
|
@@ -2927,7 +2933,7 @@ declare type TemporaryAccessTokenFunction = (args: CreateTemporaryAccessToken) =
|
|
|
2927
2933
|
|
|
2928
2934
|
declare interface TextShape extends BaseShape {
|
|
2929
2935
|
type: 'text';
|
|
2930
|
-
position:
|
|
2936
|
+
position: Vector2_3;
|
|
2931
2937
|
text: string;
|
|
2932
2938
|
rotation?: number;
|
|
2933
2939
|
alignV?: 'center' | 'bottom' | 'top';
|
|
@@ -3064,6 +3070,8 @@ declare type Vector2 = [number, number];
|
|
|
3064
3070
|
|
|
3065
3071
|
declare type Vector2_2 = [number, number];
|
|
3066
3072
|
|
|
3073
|
+
declare type Vector2_3 = [number, number];
|
|
3074
|
+
|
|
3067
3075
|
declare type Vector3 = [number, number, number];
|
|
3068
3076
|
|
|
3069
3077
|
declare interface Vector3List extends SpaceGraphTypedValueJson {
|
|
@@ -3083,9 +3091,9 @@ declare interface Vector3Range extends SpaceGraphTypedValueJson {
|
|
|
3083
3091
|
declare type ViewEvent = 'pan' | 'zoom' | 'viewbox' | 'resize-canvas' | 'scene-rendered' | 'focus';
|
|
3084
3092
|
|
|
3085
3093
|
declare class WebGlView extends TinyEmitter {
|
|
3086
|
-
windowPos:
|
|
3094
|
+
windowPos: Vector2_3;
|
|
3087
3095
|
zoom: number;
|
|
3088
|
-
client:
|
|
3096
|
+
client: Vector2_3;
|
|
3089
3097
|
layers: Map<string, PlanLayer>;
|
|
3090
3098
|
viewbox: BoundingBox2d;
|
|
3091
3099
|
viewportNeedsUpdate: boolean;
|
|
@@ -3095,8 +3103,15 @@ declare class WebGlView extends TinyEmitter {
|
|
|
3095
3103
|
wallNodeUpdateInProgress: boolean;
|
|
3096
3104
|
parentEl: HTMLElement;
|
|
3097
3105
|
_settings: FpeConfig;
|
|
3106
|
+
/* Excluded from this release type: gfxLayers */
|
|
3098
3107
|
redrawScene: () => void;
|
|
3108
|
+
/* Excluded from this release type: gfxNodes */
|
|
3109
|
+
/* Excluded from this release type: _viewport */
|
|
3110
|
+
/* Excluded from this release type: _canvasMargin */
|
|
3111
|
+
/* Excluded from this release type: _renderer */
|
|
3112
|
+
/* Excluded from this release type: _stage */
|
|
3099
3113
|
_dummyTexture: any;
|
|
3114
|
+
/* Excluded from this release type: _zoomTarget */
|
|
3100
3115
|
_oldTime: number;
|
|
3101
3116
|
ticker?: Ticker;
|
|
3102
3117
|
on: (event: ViewEvent, callback: Function, ctx?: any) => this;
|