@smplrspace/smplr-loader 2.14.1 → 2.14.2-beta.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/generated/smplr.d.ts +68 -6
- package/package.json +1 -1
|
@@ -25,7 +25,20 @@ declare interface ClientOptions {
|
|
|
25
25
|
clientToken: string;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
declare
|
|
28
|
+
declare interface CubeOptions<D> {
|
|
29
|
+
shape: 'cube';
|
|
30
|
+
size?: number;
|
|
31
|
+
width?: number;
|
|
32
|
+
height?: number;
|
|
33
|
+
depth?: number;
|
|
34
|
+
scale?: (dataElement: PointData & D) => number | {
|
|
35
|
+
x: number;
|
|
36
|
+
y: number;
|
|
37
|
+
z: number;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare type DataLayer<D extends UnknownData = NoData> = PointDataLayer<D> | IconDataLayer<D> | PolygonDataLayer<D> | PolylineDataLayer<D> | DottedPolylineDataLayer<D> | FurnitureDataLayer<D> | HeatmapDataLayer<D>;
|
|
29
42
|
|
|
30
43
|
declare class DataLayerController<D extends UnknownData> {
|
|
31
44
|
private dataLayer;
|
|
@@ -206,6 +219,42 @@ declare interface FurnitureDataLayer<D extends UnknownData = NoData> extends Bas
|
|
|
206
219
|
color?: string | ((dataElement: FurnitureData & D) => string);
|
|
207
220
|
}
|
|
208
221
|
|
|
222
|
+
declare interface HeatmapBarChartOptions {
|
|
223
|
+
style: 'bar-chart';
|
|
224
|
+
height: (interpolatedValue: number) => number;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
declare type HeatmapData = BaseData & {
|
|
228
|
+
position: SmplrCoord2d;
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
declare type HeatmapDataLayer<D extends UnknownData = NoData> = NonInteractiveDataLayer<HeatmapData, D> & {
|
|
232
|
+
id: string;
|
|
233
|
+
type: 'heatmap';
|
|
234
|
+
data: (HeatmapData & D)[];
|
|
235
|
+
value: (dataElement: HeatmapData & D) => number;
|
|
236
|
+
gridSize?: number;
|
|
237
|
+
gridFill?: number;
|
|
238
|
+
alpha?: number;
|
|
239
|
+
mask?: SmplrCoord2d[] | Record<number, SmplrCoord2d[]>;
|
|
240
|
+
color: (interpolatedValue: number) => string;
|
|
241
|
+
confidenceRadius?: number;
|
|
242
|
+
} & HeatmapStyleOptions;
|
|
243
|
+
|
|
244
|
+
declare interface HeatmapGridOptions {
|
|
245
|
+
style: 'grid';
|
|
246
|
+
elevation?: number;
|
|
247
|
+
thickness?: number;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
declare interface HeatmapSpheresOptions {
|
|
251
|
+
style: 'spheres';
|
|
252
|
+
elevation?: number;
|
|
253
|
+
squishFactor?: number;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
declare type HeatmapStyleOptions = HeatmapSpheresOptions | HeatmapGridOptions | HeatmapBarChartOptions;
|
|
257
|
+
|
|
209
258
|
declare type IconData = BaseData & {
|
|
210
259
|
position: SmplrCoord3d;
|
|
211
260
|
};
|
|
@@ -237,6 +286,9 @@ declare interface Listener {
|
|
|
237
286
|
|
|
238
287
|
declare type NoData = Record<string, never>;
|
|
239
288
|
|
|
289
|
+
declare interface NonInteractiveDataLayer<T, D extends UnknownData> {
|
|
290
|
+
}
|
|
291
|
+
|
|
240
292
|
declare type OnPickFn = (args: { coordinates: SmplrCoord3d; furnitureId?: string }) => void
|
|
241
293
|
|
|
242
294
|
declare interface OrbitCamera extends ArcRotateCamera {
|
|
@@ -272,11 +324,10 @@ declare type PointData = BaseData & {
|
|
|
272
324
|
position: SmplrCoord3d;
|
|
273
325
|
};
|
|
274
326
|
|
|
275
|
-
declare
|
|
327
|
+
declare type PointDataLayer<D extends UnknownData = NoData> = BaseDataLayer<PointData, D> & {
|
|
276
328
|
id: string;
|
|
277
329
|
type: 'point';
|
|
278
330
|
data: (PointData & D)[];
|
|
279
|
-
diameter?: number | ((dataElement: PointData & D) => number);
|
|
280
331
|
anchor?: 'bottom' | 'center' | 'top';
|
|
281
332
|
color?: string | ((dataElement: PointData & D) => string);
|
|
282
333
|
alpha?: number;
|
|
@@ -287,7 +338,9 @@ declare interface PointDataLayer<D extends UnknownData = NoData> extends BaseDat
|
|
|
287
338
|
data: PointData & D;
|
|
288
339
|
position: SmplrCoord3d;
|
|
289
340
|
}) => void;
|
|
290
|
-
}
|
|
341
|
+
} & PointShapeOptions<D>;
|
|
342
|
+
|
|
343
|
+
declare type PointShapeOptions<D> = SphereOptions<D> | CubeOptions<D>;
|
|
291
344
|
|
|
292
345
|
declare type PolygonData = BaseData & {
|
|
293
346
|
coordinates: SmplrCoord2d[];
|
|
@@ -392,7 +445,7 @@ export declare class QueryClient {
|
|
|
392
445
|
spaceId: string;
|
|
393
446
|
levelIndex: number;
|
|
394
447
|
padding?: number;
|
|
395
|
-
}): Promise<SmplrCoord2d[]
|
|
448
|
+
}): Promise<SmplrCoord2d[]>;
|
|
396
449
|
isPointInPolygon({ point, polygon }: {
|
|
397
450
|
point: SmplrCoord2d;
|
|
398
451
|
polygon: SmplrCoord2d[];
|
|
@@ -524,6 +577,15 @@ declare interface SpaceOptions {
|
|
|
524
577
|
internal?: boolean;
|
|
525
578
|
}
|
|
526
579
|
|
|
580
|
+
declare interface SphereOptions<D> {
|
|
581
|
+
shape: 'sphere';
|
|
582
|
+
diameter?: number | ((dataElement: PointData & D) => number | {
|
|
583
|
+
x: number;
|
|
584
|
+
y: number;
|
|
585
|
+
z: number;
|
|
586
|
+
});
|
|
587
|
+
}
|
|
588
|
+
|
|
527
589
|
declare const toString_2: () => string;
|
|
528
590
|
export { toString_2 as toString }
|
|
529
591
|
|
|
@@ -548,7 +610,7 @@ declare interface Vector3Coord extends Vector2Coord {
|
|
|
548
610
|
z: number;
|
|
549
611
|
}
|
|
550
612
|
|
|
551
|
-
export declare const version = "2.14.1";
|
|
613
|
+
export declare const version = "2.14.2-beta.1";
|
|
552
614
|
|
|
553
615
|
declare interface ViewerOptions {
|
|
554
616
|
mode?: CameraMode;
|