@smplrspace/smplr-loader 2.14.0 → 2.14.1-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 +39 -6
- package/package.json +1 -1
|
@@ -25,7 +25,16 @@ 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
|
+
}
|
|
36
|
+
|
|
37
|
+
declare type DataLayer<D extends UnknownData = NoData> = PointDataLayer<D> | IconDataLayer<D> | PolygonDataLayer<D> | PolylineDataLayer<D> | DottedPolylineDataLayer<D> | FurnitureDataLayer<D> | HeatmapDataLayer<D>;
|
|
29
38
|
|
|
30
39
|
declare class DataLayerController<D extends UnknownData> {
|
|
31
40
|
private dataLayer;
|
|
@@ -206,6 +215,21 @@ declare interface FurnitureDataLayer<D extends UnknownData = NoData> extends Bas
|
|
|
206
215
|
color?: string | ((dataElement: FurnitureData & D) => string);
|
|
207
216
|
}
|
|
208
217
|
|
|
218
|
+
declare type HeatmapData = BaseData & {
|
|
219
|
+
position: SmplrCoord2d;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
declare interface HeatmapDataLayer<D extends UnknownData = NoData> extends NonInteractiveDataLayer<HeatmapData, D> {
|
|
223
|
+
id: string;
|
|
224
|
+
type: 'heatmap';
|
|
225
|
+
data: (HeatmapData & D)[];
|
|
226
|
+
value: (dataElement: HeatmapData & D) => number;
|
|
227
|
+
gridSize?: number;
|
|
228
|
+
mask?: SmplrCoord2d[];
|
|
229
|
+
color: (interpolatedValue: number) => string;
|
|
230
|
+
confidenceRadius?: number;
|
|
231
|
+
}
|
|
232
|
+
|
|
209
233
|
declare type IconData = BaseData & {
|
|
210
234
|
position: SmplrCoord3d;
|
|
211
235
|
};
|
|
@@ -237,6 +261,9 @@ declare interface Listener {
|
|
|
237
261
|
|
|
238
262
|
declare type NoData = Record<string, never>;
|
|
239
263
|
|
|
264
|
+
declare interface NonInteractiveDataLayer<T, D extends UnknownData> {
|
|
265
|
+
}
|
|
266
|
+
|
|
240
267
|
declare type OnPickFn = (args: { coordinates: SmplrCoord3d; furnitureId?: string }) => void
|
|
241
268
|
|
|
242
269
|
declare interface OrbitCamera extends ArcRotateCamera {
|
|
@@ -272,11 +299,10 @@ declare type PointData = BaseData & {
|
|
|
272
299
|
position: SmplrCoord3d;
|
|
273
300
|
};
|
|
274
301
|
|
|
275
|
-
declare
|
|
302
|
+
declare type PointDataLayer<D extends UnknownData = NoData> = BaseDataLayer<PointData, D> & {
|
|
276
303
|
id: string;
|
|
277
304
|
type: 'point';
|
|
278
305
|
data: (PointData & D)[];
|
|
279
|
-
diameter?: number | ((dataElement: PointData & D) => number);
|
|
280
306
|
anchor?: 'bottom' | 'center' | 'top';
|
|
281
307
|
color?: string | ((dataElement: PointData & D) => string);
|
|
282
308
|
alpha?: number;
|
|
@@ -287,7 +313,7 @@ declare interface PointDataLayer<D extends UnknownData = NoData> extends BaseDat
|
|
|
287
313
|
data: PointData & D;
|
|
288
314
|
position: SmplrCoord3d;
|
|
289
315
|
}) => void;
|
|
290
|
-
}
|
|
316
|
+
} & ShapeOptions<D>;
|
|
291
317
|
|
|
292
318
|
declare type PolygonData = BaseData & {
|
|
293
319
|
coordinates: SmplrCoord2d[];
|
|
@@ -392,7 +418,7 @@ export declare class QueryClient {
|
|
|
392
418
|
spaceId: string;
|
|
393
419
|
levelIndex: number;
|
|
394
420
|
padding?: number;
|
|
395
|
-
}): Promise<SmplrCoord2d[]
|
|
421
|
+
}): Promise<SmplrCoord2d[]>;
|
|
396
422
|
isPointInPolygon({ point, polygon }: {
|
|
397
423
|
point: SmplrCoord2d;
|
|
398
424
|
polygon: SmplrCoord2d[];
|
|
@@ -447,6 +473,8 @@ declare interface ScreenXY {
|
|
|
447
473
|
screenY: number;
|
|
448
474
|
}
|
|
449
475
|
|
|
476
|
+
declare type ShapeOptions<D> = SphereOptions<D> | CubeOptions<D>;
|
|
477
|
+
|
|
450
478
|
declare type SmplrCamera = OrbitCamera | UniversalCamera | VRDeviceOrientationFreeCamera;
|
|
451
479
|
|
|
452
480
|
declare interface SmplrCoord2d {
|
|
@@ -524,6 +552,11 @@ declare interface SpaceOptions {
|
|
|
524
552
|
internal?: boolean;
|
|
525
553
|
}
|
|
526
554
|
|
|
555
|
+
declare interface SphereOptions<D> {
|
|
556
|
+
shape: 'sphere';
|
|
557
|
+
diameter?: number | ((dataElement: PointData & D) => number);
|
|
558
|
+
}
|
|
559
|
+
|
|
527
560
|
declare const toString_2: () => string;
|
|
528
561
|
export { toString_2 as toString }
|
|
529
562
|
|
|
@@ -548,7 +581,7 @@ declare interface Vector3Coord extends Vector2Coord {
|
|
|
548
581
|
z: number;
|
|
549
582
|
}
|
|
550
583
|
|
|
551
|
-
export declare const version = "2.14.
|
|
584
|
+
export declare const version = "2.14.1-beta.1";
|
|
552
585
|
|
|
553
586
|
declare interface ViewerOptions {
|
|
554
587
|
mode?: CameraMode;
|