@smplrspace/smplr-loader 2.13.1-beta.9 → 2.14.1-beta.0
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/generated/smplr.d.ts +68 -2
- package/package.json +1 -1
|
@@ -25,7 +25,7 @@ declare interface ClientOptions {
|
|
|
25
25
|
clientToken: string;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
declare type DataLayer<D extends UnknownData = NoData> = PointDataLayer<D> | IconDataLayer<D> | PolygonDataLayer<D> | PolylineDataLayer<D> | DottedPolylineDataLayer<D> | FurnitureDataLayer<D>;
|
|
28
|
+
declare type DataLayer<D extends UnknownData = NoData> = PointDataLayer<D> | IconDataLayer<D> | PolygonDataLayer<D> | PolylineDataLayer<D> | DottedPolylineDataLayer<D> | FurnitureDataLayer<D> | HeatmapDataLayer<D>;
|
|
29
29
|
|
|
30
30
|
declare class DataLayerController<D extends UnknownData> {
|
|
31
31
|
private dataLayer;
|
|
@@ -206,6 +206,21 @@ declare interface FurnitureDataLayer<D extends UnknownData = NoData> extends Bas
|
|
|
206
206
|
color?: string | ((dataElement: FurnitureData & D) => string);
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
+
declare type HeatmapData = BaseData & {
|
|
210
|
+
position: SmplrCoord2d;
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
declare interface HeatmapDataLayer<D extends UnknownData = NoData> extends NonInteractiveDataLayer<HeatmapData, D> {
|
|
214
|
+
id: string;
|
|
215
|
+
type: 'heatmap';
|
|
216
|
+
data: (HeatmapData & D)[];
|
|
217
|
+
value: (dataElement: HeatmapData & D) => number;
|
|
218
|
+
gridSize?: number;
|
|
219
|
+
mask?: SmplrCoord2d[];
|
|
220
|
+
color: (interpolatedValue: number) => string;
|
|
221
|
+
confidenceRadius?: number;
|
|
222
|
+
}
|
|
223
|
+
|
|
209
224
|
declare type IconData = BaseData & {
|
|
210
225
|
position: SmplrCoord3d;
|
|
211
226
|
};
|
|
@@ -237,6 +252,9 @@ declare interface Listener {
|
|
|
237
252
|
|
|
238
253
|
declare type NoData = Record<string, never>;
|
|
239
254
|
|
|
255
|
+
declare interface NonInteractiveDataLayer<T, D extends UnknownData> {
|
|
256
|
+
}
|
|
257
|
+
|
|
240
258
|
declare type OnPickFn = (args: { coordinates: SmplrCoord3d; furnitureId?: string }) => void
|
|
241
259
|
|
|
242
260
|
declare interface OrbitCamera extends ArcRotateCamera {
|
|
@@ -364,10 +382,58 @@ export declare class QueryClient {
|
|
|
364
382
|
public_link_enabled: boolean;
|
|
365
383
|
}>;
|
|
366
384
|
getAllFurnitureInSpace(id: string): Promise<Furniture[]>;
|
|
385
|
+
getFurnitureOnLevel({ spaceId, levelIndex }: {
|
|
386
|
+
spaceId: string;
|
|
387
|
+
levelIndex: number;
|
|
388
|
+
}): Promise<Furniture[]>;
|
|
367
389
|
getFurnitureById({ spaceId, furnitureId, }: {
|
|
368
390
|
spaceId: string;
|
|
369
391
|
furnitureId: string;
|
|
370
392
|
}): Promise<Furniture | null>;
|
|
393
|
+
getSpaceAssetmap(id: string): Promise<unknown>;
|
|
394
|
+
getPolylineLength({ line, unit }: {
|
|
395
|
+
line: SmplrCoord3d[];
|
|
396
|
+
unit?: 'ft' | 'm' | 'cm' | 'mm';
|
|
397
|
+
}): number;
|
|
398
|
+
getPolygonArea({ polygon, unit }: {
|
|
399
|
+
polygon: SmplrCoord2d[];
|
|
400
|
+
unit?: 'sqft' | 'sqm';
|
|
401
|
+
}): number;
|
|
402
|
+
getPolygonCenter({ polygon }: {
|
|
403
|
+
polygon: SmplrCoord2d[];
|
|
404
|
+
}): SmplrCoord2d;
|
|
405
|
+
getPointsBoundingBox({ points, padding }: {
|
|
406
|
+
points: SmplrCoord2d[];
|
|
407
|
+
padding?: number;
|
|
408
|
+
}): SmplrCoord2d[];
|
|
409
|
+
getLevelBoundingBox({ spaceId, levelIndex, padding, }: {
|
|
410
|
+
spaceId: string;
|
|
411
|
+
levelIndex: number;
|
|
412
|
+
padding?: number;
|
|
413
|
+
}): Promise<SmplrCoord2d[]>;
|
|
414
|
+
isPointInPolygon({ point, polygon }: {
|
|
415
|
+
point: SmplrCoord2d;
|
|
416
|
+
polygon: SmplrCoord2d[];
|
|
417
|
+
}): boolean;
|
|
418
|
+
isFurnitureInPolygon({ spaceId, furnitureId, polygon, }: {
|
|
419
|
+
spaceId: string;
|
|
420
|
+
furnitureId: string;
|
|
421
|
+
polygon: SmplrCoord2d[];
|
|
422
|
+
}): Promise<boolean | null>;
|
|
423
|
+
getFurnitureInPolygon({ spaceId, polygon, }: {
|
|
424
|
+
spaceId: string;
|
|
425
|
+
polygon: SmplrCoord2d[];
|
|
426
|
+
}): Promise<Furniture[]>;
|
|
427
|
+
getPointsConcaveHull({ points, simplify, simplifyTolerance, }: {
|
|
428
|
+
points: SmplrCoord2d[];
|
|
429
|
+
simplify?: boolean;
|
|
430
|
+
simplifyTolerance?: number;
|
|
431
|
+
}): SmplrCoord2d[];
|
|
432
|
+
getLinesConcaveHull({ lines, simplify, simplifyTolerance, }: {
|
|
433
|
+
lines: SmplrCoord2d[][];
|
|
434
|
+
simplify?: boolean;
|
|
435
|
+
simplifyTolerance?: number;
|
|
436
|
+
}): SmplrCoord2d[];
|
|
371
437
|
}
|
|
372
438
|
|
|
373
439
|
declare interface RenderOptions {
|
|
@@ -500,7 +566,7 @@ declare interface Vector3Coord extends Vector2Coord {
|
|
|
500
566
|
z: number;
|
|
501
567
|
}
|
|
502
568
|
|
|
503
|
-
export declare const version = "2.
|
|
569
|
+
export declare const version = "2.14.1-beta.0";
|
|
504
570
|
|
|
505
571
|
declare interface ViewerOptions {
|
|
506
572
|
mode?: CameraMode;
|