@mappedin/react-sdk 6.0.1-beta.3 → 6.0.1-beta.4
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/THIRD_PARTY_LICENSES.txt +1 -1
- package/lib/esm/GLTFExporter-BMU6LTDX.js +1 -0
- package/lib/esm/{GLTFLoader-EMLQBTUW.js → GLTFLoader-5SLMAWGO.js} +1 -1
- package/lib/esm/{browser-VJJYXKCR.js → browser-KZQSYQMW.js} +1 -1
- package/lib/esm/{chunk-BCE6HB4T.js → chunk-DFTJP4RV.js} +1 -1
- package/lib/esm/{chunk-5TYPWFBI.js → chunk-JLMM7TY3.js} +1 -1
- package/lib/esm/chunk-LOZUNJVL.js +1 -0
- package/lib/esm/chunk-QGSOXOSP.js +1 -0
- package/lib/esm/chunk-UO4RCD3E.js +1 -0
- package/lib/esm/index.d.ts +468 -201
- package/lib/esm/index.js +1 -1
- package/lib/esm/inspector-6MGWZVYQ.js +1 -0
- package/lib/esm/{outdoor-context-v4-DXPG5QBY.js → outdoor-context-v4-LAP7PEM5.js} +1 -1
- package/package.json +2 -2
- package/lib/esm/GLTFExporter-DJTLMZRS.js +0 -18
- package/lib/esm/chunk-AIZ6PN4T.js +0 -577
- package/lib/esm/chunk-S5NKJVCP.js +0 -950
- package/lib/esm/chunk-YPHGW2KF.js +0 -3799
- package/lib/esm/inspector-QDN2FWBH.js +0 -425
package/lib/esm/index.d.ts
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
// ../react/geojson
|
|
9
9
|
// ../react/@mappedin/core-sdk
|
|
10
10
|
// ../react/@packages/internal/common
|
|
11
|
-
// ../react/@packages/internal/outdoor-context-v4
|
|
12
11
|
// ../react/@mappedin/core-sdk/src/camera
|
|
13
12
|
// ../react/three
|
|
14
13
|
// ../react/@packages/internal/shave-text/shave-text
|
|
15
14
|
// ../react/@turf/turf
|
|
16
15
|
// ../react/@packages/internal/quad-tree
|
|
16
|
+
// ../react/@packages/internal/outdoor-context-v4
|
|
17
17
|
// ../react/@packages/internal/geojson-navigator
|
|
18
18
|
// ../react/three/addons/loaders/GLTFLoader.js
|
|
19
19
|
// ../react/@mapbox/point-geometry
|
|
@@ -244,11 +244,11 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
244
244
|
import type { Floor } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
245
245
|
import type { ParsedMVF as TMVF, StyleCollection as TMVFStyleCollection, Style as TMVFStyle, LineStringStyle as TMVFLineStringStyle, PolygonStyle as TMVFPolygonStyle, PointStyle as TMVFPointStyle } from '@mappedin/mvf';
|
|
246
246
|
import { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
|
|
247
|
-
import type { Shading, PaintStyle, LineStyle, WatermarkOptions
|
|
247
|
+
import type { Shading, PaintStyle, LineStyle, WatermarkOptions } from '@mappedin/react-sdk/geojson/src';
|
|
248
248
|
import { enableTestMode } from '@mappedin/react-sdk/geojson/src';
|
|
249
249
|
export type { PubSub } from '@packages/internal/common/pubsub';
|
|
250
|
-
import { MapLibreOverlay } from '@mappedin/react-sdk/geojson/src/maplibre-overlay';
|
|
251
250
|
import { analytics } from '@mappedin/react-sdk/mappedin-js/src/analytics';
|
|
251
|
+
import { MappedinMapLibreOverlay } from '@mappedin/react-sdk/mappedin-js/src/maplibre-overlay';
|
|
252
252
|
export { setLoggerLevel, E_SDK_LOG_LEVEL } from '@packages/internal/common/Mappedin.Logger';
|
|
253
253
|
/**
|
|
254
254
|
* Represents all the available antialiasing options.
|
|
@@ -460,6 +460,14 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
460
460
|
* @experimental
|
|
461
461
|
*/
|
|
462
462
|
style?: {
|
|
463
|
+
/**
|
|
464
|
+
* Background color. Only relevant if outdoor map is disabled.
|
|
465
|
+
*/
|
|
466
|
+
backgroundColor?: string;
|
|
467
|
+
/**
|
|
468
|
+
* Background alpha value. Only relevant if outdoor map is disabled.
|
|
469
|
+
*/
|
|
470
|
+
backgroundAlpha?: number;
|
|
463
471
|
/**
|
|
464
472
|
* Set the global shading for all elements. True will use default values, false will disable shading.
|
|
465
473
|
* @default true
|
|
@@ -497,26 +505,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
497
505
|
* const data = await getMapData({ key: 'api_key', secret: 'api_secret', mapId: 'id' });
|
|
498
506
|
*/
|
|
499
507
|
export const getMapData: (userOptions: TGetMapDataOptions) => Promise<MapData>;
|
|
500
|
-
class MappedinMapLibreOverlay extends MapLibreOverlay<{
|
|
501
|
-
/**
|
|
502
|
-
* Event emitted when the MappedinMap is loaded
|
|
503
|
-
*/
|
|
504
|
-
loaded: {
|
|
505
|
-
/**
|
|
506
|
-
* MapView instance
|
|
507
|
-
*/
|
|
508
|
-
mapView: MapView;
|
|
509
|
-
/**
|
|
510
|
-
* MapData instance
|
|
511
|
-
*/
|
|
512
|
-
mapData: MapData;
|
|
513
|
-
};
|
|
514
|
-
}> {
|
|
515
|
-
#private;
|
|
516
|
-
static instance: MappedinMapLibreOverlay;
|
|
517
|
-
constructor(origin: Position | undefined, mapData: MapData, options?: TShow3DMapOptions);
|
|
518
|
-
onAdd(map: any): HTMLDivElement;
|
|
519
|
-
}
|
|
520
508
|
/**
|
|
521
509
|
* Create a MapLibre overlay with a Map to render it within existing MapLibre projects.
|
|
522
510
|
* @experimental
|
|
@@ -527,7 +515,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
527
515
|
export { parseMVF, unzipMVF, enableTestMode };
|
|
528
516
|
export type { MapView, MapData, MappedinMapLibreOverlay, TEvents, TEventPayload, TClickPayload, THoverPayload, TShow3DMapOptions, TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, TAmbientOcclusionOptions, TAntialiasingOptions, TMVF, PaintStyle, LineStyle, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, };
|
|
529
517
|
export type * from 'geojson';
|
|
530
|
-
export type { TUpdateState, TLabelState, TGeometryState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TCameraFocusOnTarget, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
518
|
+
export type { TUpdateState, TLabelState, TGeometryState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TCameraFocusOnTarget, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, TBlueDotOptions, } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
531
519
|
export type { Label, Marker, Path, Shape, CameraTransform, Model } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
532
520
|
export type { Navigation, TNavigationOptions } from '@mappedin/react-sdk/mappedin-js/src/navigation';
|
|
533
521
|
export type { TSpaceType } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
@@ -1147,6 +1135,10 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
|
|
|
1147
1135
|
* @internal
|
|
1148
1136
|
*/
|
|
1149
1137
|
get __core(): RendererCore;
|
|
1138
|
+
/**
|
|
1139
|
+
* Clears all added elements from the map.
|
|
1140
|
+
*/
|
|
1141
|
+
clear(): void;
|
|
1150
1142
|
/**
|
|
1151
1143
|
* Destroys the MapView.
|
|
1152
1144
|
*/
|
|
@@ -1164,8 +1156,8 @@ declare module '@mappedin/react-sdk/geojson/src' {
|
|
|
1164
1156
|
import type { MarkerState, AddMarkerOptions } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
1165
1157
|
import type { PathState, AddPathOptions } from '@mappedin/react-sdk/geojson/src/components/path';
|
|
1166
1158
|
import type { AddLabelOptions, LabelAppearance, LabelState } from '@mappedin/react-sdk/geojson/src/components/label';
|
|
1167
|
-
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
1168
|
-
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
1159
|
+
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
1160
|
+
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
1169
1161
|
import type { Position } from '@mappedin/react-sdk/geojson/src/types/geometry';
|
|
1170
1162
|
import type { InsetPadding, RendererCoreOptions, ClickPayload, HoverPayload, CameraPayload, MapEvent, MapEventPayload } from '@mappedin/react-sdk/geojson/src/types';
|
|
1171
1163
|
import type { GeometryState } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
@@ -1197,31 +1189,49 @@ declare module '@mappedin/react-sdk/geojson/src' {
|
|
|
1197
1189
|
}): Promise<RendererCore>;
|
|
1198
1190
|
}
|
|
1199
1191
|
|
|
1200
|
-
declare module '@mappedin/react-sdk/geojson/src/maplibre-overlay' {
|
|
1201
|
-
import type { IControl, Map as MapLibreMap } from '@packages/internal/outdoor-context-v4';
|
|
1202
|
-
import type { Position } from '@mappedin/react-sdk/geojson/src/types';
|
|
1203
|
-
import RendererCore from '@mappedin/react-sdk/geojson/src/renderer';
|
|
1204
|
-
import { PubSub } from '@packages/internal/common';
|
|
1205
|
-
export class MapLibreOverlay<T> extends PubSub<T> implements IControl {
|
|
1206
|
-
el: HTMLDivElement;
|
|
1207
|
-
core: RendererCore;
|
|
1208
|
-
origin?: Position;
|
|
1209
|
-
constructor(origin: Position | undefined);
|
|
1210
|
-
onAdd(map: MapLibreMap): HTMLDivElement;
|
|
1211
|
-
onRemove(): void;
|
|
1212
|
-
}
|
|
1213
|
-
}
|
|
1214
|
-
|
|
1215
1192
|
declare module '@mappedin/react-sdk/mappedin-js/src/analytics' {
|
|
1216
1193
|
export { analytics, analyticsInternal } from '@mappedin/react-sdk/mappedin-js/src/analytics/customer';
|
|
1217
1194
|
export type { CustomerAnalytics, AnalyticsOptions } from '@mappedin/react-sdk/mappedin-js/src/analytics/customer';
|
|
1218
1195
|
}
|
|
1219
1196
|
|
|
1197
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/maplibre-overlay' {
|
|
1198
|
+
import { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
|
|
1199
|
+
import type MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
|
|
1200
|
+
import type { TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
1201
|
+
import { MapLibreOverlay } from '@mappedin/react-sdk/geojson/src/maplibre-overlay';
|
|
1202
|
+
import type { Position } from '@mappedin/core-sdk';
|
|
1203
|
+
export class MappedinMapLibreOverlay extends MapLibreOverlay<{
|
|
1204
|
+
/**
|
|
1205
|
+
* Event emitted when the MappedinMap is loaded
|
|
1206
|
+
*/
|
|
1207
|
+
loaded: {
|
|
1208
|
+
/**
|
|
1209
|
+
* MapView instance
|
|
1210
|
+
*/
|
|
1211
|
+
mapView: MapView;
|
|
1212
|
+
/**
|
|
1213
|
+
* MapData instance
|
|
1214
|
+
*/
|
|
1215
|
+
mapData: MapData;
|
|
1216
|
+
};
|
|
1217
|
+
}> {
|
|
1218
|
+
#private;
|
|
1219
|
+
static instance: MappedinMapLibreOverlay;
|
|
1220
|
+
constructor(origin: Position | undefined, mapData: MapData, options?: TShow3DMapOptions);
|
|
1221
|
+
onAdd(map: any): HTMLDivElement;
|
|
1222
|
+
onRemove(): void;
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1220
1226
|
declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
1221
|
-
import { Feature, MultiPolygon, Polygon } from 'geojson';
|
|
1227
|
+
import type { Feature, MultiPolygon, Polygon } from 'geojson';
|
|
1222
1228
|
import type { Coordinate, Floor, Door, Space, MapObject, PointOfInterest, Connection, Annotation } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
1223
1229
|
import type { Label, Marker, Model } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
1224
1230
|
import type { EasingCurve } from '@mappedin/core-sdk/src/camera';
|
|
1231
|
+
import { GeometryGroupState } from '@mappedin/core-sdk';
|
|
1232
|
+
export type DeepRequired<T> = Required<{
|
|
1233
|
+
[K in keyof T]: T[K] extends Required<T[K]> ? T[K] : DeepRequired<T[K]>;
|
|
1234
|
+
}>;
|
|
1225
1235
|
/**
|
|
1226
1236
|
* @hidden
|
|
1227
1237
|
*/
|
|
@@ -1365,11 +1375,19 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
1365
1375
|
* Indicates if the geometry element is interactive. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
|
|
1366
1376
|
*/
|
|
1367
1377
|
interactive: boolean;
|
|
1378
|
+
/**
|
|
1379
|
+
* Opacity of the geometry element.
|
|
1380
|
+
*/
|
|
1381
|
+
opacity: number;
|
|
1382
|
+
/**
|
|
1383
|
+
* Height of the geometry element in meters.
|
|
1384
|
+
*/
|
|
1385
|
+
height: number;
|
|
1368
1386
|
};
|
|
1369
1387
|
/**
|
|
1370
1388
|
* The type for updating the state of map elements (colors, texts, etc.).
|
|
1371
1389
|
*/
|
|
1372
|
-
export type TUpdateState<T> = T extends 'walls' ? Partial<Omit<
|
|
1390
|
+
export type TUpdateState<T> = T extends 'walls' ? Partial<Omit<GeometryGroupState, 'interactive' | 'hoverColor' | 'type'>> : T extends Marker ? Partial<TMarkerState> : T extends Label ? Partial<TLabelState> : T extends Space | MapObject ? Partial<TGeometryState> : T extends string ? Record<string, any> : never;
|
|
1373
1391
|
export type TUpdateStates = Partial<Omit<TGeometryState, 'interactive' | 'hoverColor' | 'type'>> | Partial<TMarkerState> | Partial<TLabelState> | Partial<TGeometryState>;
|
|
1374
1392
|
export type TGetEntityState<T> = T extends Marker ? TMarkerState : T extends Model ? TModelState : T extends Label ? TLabelState : T extends Space | MapObject ? TGeometryState : T extends string ? TLabelState | TGeometryState | TMarkerState | TModelState | undefined : never;
|
|
1375
1393
|
export type TGetState<T> = TGetEntityState<T> | undefined;
|
|
@@ -1900,6 +1918,28 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
1900
1918
|
*/
|
|
1901
1919
|
id?: string;
|
|
1902
1920
|
};
|
|
1921
|
+
export type TBlueDotOptions = {
|
|
1922
|
+
/** The radius of the BlueDot in pixels. The BlueDot will maintain this size clamped to a minimum of 0.35 metres. */
|
|
1923
|
+
radius?: number;
|
|
1924
|
+
/** The color of the BlueDot core element. */
|
|
1925
|
+
color?: string;
|
|
1926
|
+
/** Options for the accuracy ring around the BlueDot. */
|
|
1927
|
+
accuracyRing?: {
|
|
1928
|
+
/** The color of the accuracy ring. */
|
|
1929
|
+
color?: string;
|
|
1930
|
+
/** The opacity of the accuracy ring. */
|
|
1931
|
+
opacity?: number;
|
|
1932
|
+
};
|
|
1933
|
+
/**
|
|
1934
|
+
* Options for the bearing directional indicator.
|
|
1935
|
+
*/
|
|
1936
|
+
bearing?: {
|
|
1937
|
+
/** The color of the bearing cone. */
|
|
1938
|
+
color?: string;
|
|
1939
|
+
/** The opacity of the bearing cone. */
|
|
1940
|
+
opacity?: number;
|
|
1941
|
+
};
|
|
1942
|
+
};
|
|
1903
1943
|
}
|
|
1904
1944
|
|
|
1905
1945
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects' {
|
|
@@ -3018,25 +3058,17 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-do
|
|
|
3018
3058
|
import type { RendererCore } from '@mappedin/core-sdk';
|
|
3019
3059
|
import { PubSub } from '@packages/internal/common';
|
|
3020
3060
|
import type { GeoJsonApi } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/api';
|
|
3061
|
+
import type { TBlueDotOptions } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
3021
3062
|
export type TBlueDotEvents = {
|
|
3022
3063
|
'floor-change': {
|
|
3023
3064
|
reason: 'blue-dot-floor-change';
|
|
3024
3065
|
floorId: string;
|
|
3025
3066
|
};
|
|
3026
3067
|
};
|
|
3027
|
-
export const POSITION_ANIMATION_DURATION = 500;
|
|
3028
|
-
export const SCALE_ANIMATION_DURATION = 150;
|
|
3029
|
-
export const ROTATION_ANIMATION_DURATION = 150;
|
|
3030
|
-
export const MIN_AURA_RADIUS = 0;
|
|
3031
|
-
export const MAX_AURA_RADIUS = 5;
|
|
3032
|
-
export const MIN_ACCURACY = 5;
|
|
3033
|
-
export const MAX_ACCURACY = 30;
|
|
3034
|
-
export const CONE_START_RADIUS = 0.4;
|
|
3035
|
-
export const CONE_DISTANCE = 1.25;
|
|
3036
|
-
export const BLUE_DOT_RADIUS = 0.35;
|
|
3037
3068
|
export class BlueDot extends PubSub<TBlueDotEvents> {
|
|
3069
|
+
#private;
|
|
3038
3070
|
constructor(core: RendererCore, geoJSONApi: GeoJsonApi);
|
|
3039
|
-
enable(): void;
|
|
3071
|
+
enable(options?: TBlueDotOptions): void;
|
|
3040
3072
|
disable(): void;
|
|
3041
3073
|
}
|
|
3042
3074
|
}
|
|
@@ -3098,7 +3130,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
3098
3130
|
import './marker.scss';
|
|
3099
3131
|
import { Vector2 } from 'three';
|
|
3100
3132
|
import type { Entity2DHTMLDivElement, EntityId, Position } from '@mappedin/react-sdk/geojson/src/types';
|
|
3101
|
-
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3133
|
+
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
3102
3134
|
import type { CollisionRankingTier } from '@mappedin/react-sdk/geojson/src/utils/collision-ranking-tier';
|
|
3103
3135
|
/**
|
|
3104
3136
|
* State reprsenting a Marker
|
|
@@ -3231,7 +3263,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
3231
3263
|
declare module '@mappedin/react-sdk/geojson/src/components/path' {
|
|
3232
3264
|
import { type Mesh, type ShaderMaterial, type BufferGeometry, Vector3 } from 'three';
|
|
3233
3265
|
import type { Position } from '@mappedin/react-sdk/geojson/src/types';
|
|
3234
|
-
import { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3266
|
+
import { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
3235
3267
|
import type { FeatureCollection, Point } from 'geojson';
|
|
3236
3268
|
/**
|
|
3237
3269
|
* State representing a Path
|
|
@@ -3332,7 +3364,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/label' {
|
|
|
3332
3364
|
import { Vector2 } from 'three';
|
|
3333
3365
|
import type { TDrawFn } from '@packages/internal/shave-text/shave-text';
|
|
3334
3366
|
import type { EntityId, Position } from '@mappedin/react-sdk/geojson/src/types';
|
|
3335
|
-
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3367
|
+
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
3336
3368
|
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
3337
3369
|
import type { CollisionRankingTier } from '@mappedin/react-sdk/geojson/src';
|
|
3338
3370
|
export const labelThemes: {
|
|
@@ -3670,18 +3702,18 @@ declare module '@mappedin/react-sdk/geojson/src/components/label' {
|
|
|
3670
3702
|
export default LabelComponent;
|
|
3671
3703
|
}
|
|
3672
3704
|
|
|
3673
|
-
declare module '@mappedin/react-sdk/geojson/src/entities/
|
|
3705
|
+
declare module '@mappedin/react-sdk/geojson/src/entities/group-container' {
|
|
3674
3706
|
import { Object3D } from 'three';
|
|
3675
|
-
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3676
|
-
import { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3677
|
-
import { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3707
|
+
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
3708
|
+
import { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
3709
|
+
import { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/geometry2d';
|
|
3678
3710
|
import type { StackComponent } from '@mappedin/react-sdk/geojson/src/components/stack';
|
|
3679
3711
|
import type { MarkerState } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
3680
3712
|
import type { LabelState } from '@mappedin/react-sdk/geojson/src/components/label';
|
|
3681
|
-
import { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3713
|
+
import { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
3682
3714
|
import type { PathState } from '@mappedin/react-sdk/geojson/src/components/path';
|
|
3683
|
-
import { InteractionComponent } from '@mappedin/react-sdk/geojson/src/components/interaction';
|
|
3684
|
-
export enum
|
|
3715
|
+
import type { InteractionComponent } from '@mappedin/react-sdk/geojson/src/components/interaction';
|
|
3716
|
+
export enum GroupContainerComponents {
|
|
3685
3717
|
Stack = 0,
|
|
3686
3718
|
Interaction = 1
|
|
3687
3719
|
}
|
|
@@ -3723,13 +3755,13 @@ declare module '@mappedin/react-sdk/geojson/src/entities/entity-group-container'
|
|
|
3723
3755
|
}
|
|
3724
3756
|
}
|
|
3725
3757
|
|
|
3726
|
-
declare module '@mappedin/react-sdk/geojson/src/entities/
|
|
3758
|
+
declare module '@mappedin/react-sdk/geojson/src/entities/geometry-group' {
|
|
3727
3759
|
import type { LineStyle, PaintStyle, Shading } from '@mappedin/react-sdk/geojson/src/types';
|
|
3728
3760
|
import { Object3D } from 'three';
|
|
3729
|
-
import type
|
|
3761
|
+
import { type GeometryState } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
3730
3762
|
import type { ModelState } from '@mappedin/react-sdk/geojson/src/components/model';
|
|
3731
3763
|
import { GeometryGroupStyleComponent } from '@mappedin/react-sdk/geojson/src/components/geometry-group-style';
|
|
3732
|
-
export enum
|
|
3764
|
+
export enum GeometryGroupComponents {
|
|
3733
3765
|
GeometryGroupStyle = 0
|
|
3734
3766
|
}
|
|
3735
3767
|
/**
|
|
@@ -3796,6 +3828,11 @@ declare module '@mappedin/react-sdk/geojson/src/entities/entity-group' {
|
|
|
3796
3828
|
setOpacity(opacity: number): void;
|
|
3797
3829
|
removeEntity(): void;
|
|
3798
3830
|
constructor(id: string, style?: GeometryGroupStyleComponent);
|
|
3831
|
+
/**
|
|
3832
|
+
* Get first child entity of a group if it's a batched mesh
|
|
3833
|
+
* We use this logic a lot for getting the material of the group. since group does not have material and batched mesh does
|
|
3834
|
+
*/
|
|
3835
|
+
getfirstChildEntityId(): string | number | undefined;
|
|
3799
3836
|
}
|
|
3800
3837
|
}
|
|
3801
3838
|
|
|
@@ -3805,20 +3842,22 @@ declare module '@mappedin/react-sdk/geojson/src/types/geometry' {
|
|
|
3805
3842
|
|
|
3806
3843
|
declare module '@mappedin/react-sdk/geojson/src/types' {
|
|
3807
3844
|
import { Mesh, Object3D, InstancedMesh } from 'three';
|
|
3808
|
-
import type { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3845
|
+
import type { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/geometry2d';
|
|
3809
3846
|
import type { Position } from '@mappedin/react-sdk/geojson/src/types/geometry';
|
|
3810
3847
|
import type { GeometryState } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
3811
|
-
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3812
|
-
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3848
|
+
import type { GeometryGroupObject3D, GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
3849
|
+
import type { GroupContainerObject3D, GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
3813
3850
|
import type { PathState } from '@mappedin/react-sdk/geojson/src/components/path';
|
|
3814
3851
|
import type { ModelState } from '@mappedin/react-sdk/geojson/src/components/model';
|
|
3815
3852
|
import type { LabelState } from '@mappedin/react-sdk/geojson/src/components/label';
|
|
3816
3853
|
import type { MarkerState } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
3854
|
+
import type { ImageState } from '@mappedin/react-sdk/geojson/src/components/image';
|
|
3817
3855
|
import type { ShapeState } from '@mappedin/react-sdk/geojson/src/components/custom';
|
|
3856
|
+
import type { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities';
|
|
3818
3857
|
/**
|
|
3819
3858
|
* The state of an entity, which can be a geometry, geometry group, group container, path, model, label, or marker.
|
|
3820
3859
|
*/
|
|
3821
|
-
export type EntityState = GeometryState | GeometryGroupState | GroupContainerState | PathState | ModelState | LabelState | MarkerState | ShapeState;
|
|
3860
|
+
export type EntityState = GeometryState | GeometryGroupState | GroupContainerState | PathState | ModelState | LabelState | MarkerState | ImageState | ShapeState;
|
|
3822
3861
|
/**
|
|
3823
3862
|
* A wrapper object that contains the ID and type of an entity. This is returned when adding entities to the scene, and can be used
|
|
3824
3863
|
* to `getState` and `setState` of the entity.
|
|
@@ -3867,6 +3906,8 @@ declare module '@mappedin/react-sdk/geojson/src/types' {
|
|
|
3867
3906
|
texture?: string;
|
|
3868
3907
|
shading?: Shading;
|
|
3869
3908
|
outline?: boolean;
|
|
3909
|
+
showImage?: boolean;
|
|
3910
|
+
flipImageToFaceCamera?: boolean;
|
|
3870
3911
|
};
|
|
3871
3912
|
export type Cap = 'round' | 'square' | 'butt';
|
|
3872
3913
|
export type Join = 'round' | 'bevel' | 'miter';
|
|
@@ -3900,6 +3941,12 @@ declare module '@mappedin/react-sdk/geojson/src/types' {
|
|
|
3900
3941
|
};
|
|
3901
3942
|
source: string;
|
|
3902
3943
|
};
|
|
3944
|
+
export type PolygonImage = {
|
|
3945
|
+
width: number;
|
|
3946
|
+
height: number;
|
|
3947
|
+
verticalOffset?: number;
|
|
3948
|
+
rotation?: number;
|
|
3949
|
+
};
|
|
3903
3950
|
export type PolygonSource = {
|
|
3904
3951
|
features: {
|
|
3905
3952
|
type: 'Feature';
|
|
@@ -4053,6 +4100,21 @@ declare module '@mappedin/react-sdk/geojson/src/types' {
|
|
|
4053
4100
|
export type MapEventPayload<EventName extends keyof MapEvent> = MapEvent[EventName] extends {
|
|
4054
4101
|
data: null;
|
|
4055
4102
|
} ? MapEvent[EventName]['data'] : MapEvent[EventName];
|
|
4103
|
+
export type Geometry3DTypes = Geometry3D | GeometryGroupObject3D | GroupContainerObject3D;
|
|
4104
|
+
export type RendererState = {
|
|
4105
|
+
geometry3DMap: Map<string | number, Geometry3DTypes>;
|
|
4106
|
+
geometry2DMap: Map<string | number, Geometry2D>;
|
|
4107
|
+
geometry2DIdsInScene: Set<Geometry2D['id']>;
|
|
4108
|
+
geometry3DIdsInScene: Set<Geometry3DTypes['id']>;
|
|
4109
|
+
entityScene: GroupContainerObject3D;
|
|
4110
|
+
hoverColor: string;
|
|
4111
|
+
center?: Position;
|
|
4112
|
+
insetsPadding: InsetPadding;
|
|
4113
|
+
shouldMeasureCanvas: boolean;
|
|
4114
|
+
pixelRatio: number;
|
|
4115
|
+
canvasWidth: number;
|
|
4116
|
+
canvasHeight: number;
|
|
4117
|
+
};
|
|
4056
4118
|
}
|
|
4057
4119
|
|
|
4058
4120
|
declare module '@mappedin/react-sdk/geojson/src/components/mesh' {
|
|
@@ -4112,21 +4174,41 @@ declare module '@mappedin/react-sdk/geojson/src/components/mesh' {
|
|
|
4112
4174
|
* Whether the geometry is outlined with a 30% darkened color. This effect adds lines around the geometry to make it stand out.
|
|
4113
4175
|
*/
|
|
4114
4176
|
outline: boolean;
|
|
4177
|
+
/**
|
|
4178
|
+
* Show geometry image if present
|
|
4179
|
+
*/
|
|
4180
|
+
showImage: boolean;
|
|
4181
|
+
/**
|
|
4182
|
+
* Attempt to keep the image facing the camera as much as possible
|
|
4183
|
+
*/
|
|
4184
|
+
flipImageToFaceCamera: boolean;
|
|
4115
4185
|
/**
|
|
4116
4186
|
* Whether the geometry should emit an event when focused on by the center of the camera
|
|
4117
4187
|
*/
|
|
4118
4188
|
focusable: boolean;
|
|
4189
|
+
/**
|
|
4190
|
+
* The opacity of the geometry
|
|
4191
|
+
*/
|
|
4192
|
+
opacity: number;
|
|
4193
|
+
/**
|
|
4194
|
+
* The height of the geometry
|
|
4195
|
+
*/
|
|
4196
|
+
height: number;
|
|
4119
4197
|
};
|
|
4120
4198
|
export class MeshComponent {
|
|
4121
4199
|
#private;
|
|
4122
4200
|
mesh?: EntityBatchedMesh;
|
|
4123
4201
|
focusMesh?: Mesh;
|
|
4124
4202
|
outline?: LineSegments;
|
|
4203
|
+
imageMesh?: Mesh;
|
|
4125
4204
|
readonly type = "geometry";
|
|
4205
|
+
dirty: boolean;
|
|
4206
|
+
detached: boolean;
|
|
4126
4207
|
instanceIndex: number;
|
|
4127
4208
|
geometry?: BufferGeometry;
|
|
4128
4209
|
material?: BatchedStandardMaterial;
|
|
4129
4210
|
feature: Feature<Polygon | LineString | MultiPolygon | MultiLineString>;
|
|
4211
|
+
currentHeight: number;
|
|
4130
4212
|
constructor(feature: Feature<Polygon | LineString | MultiPolygon | MultiLineString>);
|
|
4131
4213
|
get visible(): boolean;
|
|
4132
4214
|
set visible(visible: boolean);
|
|
@@ -4135,6 +4217,10 @@ declare module '@mappedin/react-sdk/geojson/src/components/mesh' {
|
|
|
4135
4217
|
color: Color;
|
|
4136
4218
|
topColor: Color;
|
|
4137
4219
|
setColor(color: string, topColor: string): void;
|
|
4220
|
+
getColor(): {
|
|
4221
|
+
color: Color;
|
|
4222
|
+
topColor: Color;
|
|
4223
|
+
} | undefined;
|
|
4138
4224
|
position: Vector3;
|
|
4139
4225
|
get altitude(): number;
|
|
4140
4226
|
set altitude(value: number);
|
|
@@ -4155,8 +4241,8 @@ declare module '@mappedin/react-sdk/geojson/src/components/custom' {
|
|
|
4155
4241
|
import { Color, type Object3D, type LineSegments } from 'three';
|
|
4156
4242
|
import type { EntityId, Position } from '@mappedin/react-sdk/geojson/src/types';
|
|
4157
4243
|
import type { Feature, Point } from 'geojson';
|
|
4158
|
-
import { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4159
|
-
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4244
|
+
import { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
4245
|
+
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
4160
4246
|
/**
|
|
4161
4247
|
* State representing a Custom Geometry
|
|
4162
4248
|
*/
|
|
@@ -4213,8 +4299,8 @@ declare module '@mappedin/react-sdk/geojson/src/components/model' {
|
|
|
4213
4299
|
import type { BatchedStandardMaterial } from '@mappedin/react-sdk/geojson/src/systems/mesh-creation-and-optimization/batched-material';
|
|
4214
4300
|
import type { Position, EntityId } from '@mappedin/react-sdk/geojson/src/types';
|
|
4215
4301
|
import type { Feature, Point } from 'geojson';
|
|
4216
|
-
import type { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4217
|
-
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4302
|
+
import type { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
4303
|
+
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
4218
4304
|
/**
|
|
4219
4305
|
* State representing a Model, typically loaded via a URL
|
|
4220
4306
|
*/
|
|
@@ -4263,13 +4349,9 @@ declare module '@mappedin/react-sdk/geojson/src/components/model' {
|
|
|
4263
4349
|
|
|
4264
4350
|
declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
4265
4351
|
import './utils/object-this-polyfill';
|
|
4266
|
-
import type { Position as GeoJsonPosition } from 'geojson';
|
|
4267
4352
|
import { Vector3, Raycaster, Camera as ThreeCamera } from 'three';
|
|
4268
|
-
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4269
|
-
import { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/entity-group-container';
|
|
4353
|
+
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
4270
4354
|
import { PubSub } from '@mappedin/react-sdk/packages/common/pubsub';
|
|
4271
|
-
import { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/three-d';
|
|
4272
|
-
import { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/two-d';
|
|
4273
4355
|
import { CollisionSystem } from '@mappedin/react-sdk/geojson/src/systems/collisions/system';
|
|
4274
4356
|
import { InteractionSystem } from '@mappedin/react-sdk/geojson/src/systems/interactions';
|
|
4275
4357
|
import { ZoomInterpolationSystem } from '@mappedin/react-sdk/geojson/src/systems/zoom-interpolation/zoom-interpolation';
|
|
@@ -4277,7 +4359,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4277
4359
|
import type { GLTFExportOptions } from '@mappedin/react-sdk/geojson/src/systems/exporter';
|
|
4278
4360
|
import { ExporterSystem } from '@mappedin/react-sdk/geojson/src/systems/exporter';
|
|
4279
4361
|
import type { AddLabelOptions, LabelState } from '@mappedin/react-sdk/geojson/src/components/label';
|
|
4280
|
-
import type { LineStyle, PaintStyle, RendererCoreOptions, Position, ModelProperties, ModelStyle,
|
|
4362
|
+
import type { LineStyle, PaintStyle, RendererCoreOptions, Position, ModelProperties, ModelStyle, EntityState, EntityId, MapEvent, MapEventPayload, RendererState } from '@mappedin/react-sdk/geojson/src/types';
|
|
4281
4363
|
import { MeshCreationAndOptimizationSystem } from '@mappedin/react-sdk/geojson/src/systems/mesh-creation-and-optimization/system';
|
|
4282
4364
|
import { DOMVisibilitySystem } from '@mappedin/react-sdk/geojson/src/systems/dom-visiblity/system';
|
|
4283
4365
|
import { TwoDProjectionSystem } from '@mappedin/react-sdk/geojson/src/systems/2d-projection/system';
|
|
@@ -4285,7 +4367,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4285
4367
|
import { DrawSystem } from '@mappedin/react-sdk/geojson/src/systems/draw/system';
|
|
4286
4368
|
import { TwoDVisibilitySystem } from '@mappedin/react-sdk/geojson/src/systems/2d-visibility/system';
|
|
4287
4369
|
import { RenderSystem } from '@mappedin/react-sdk/geojson/src/systems/render/system';
|
|
4288
|
-
import type { FeatureCollection, LineString, MultiPolygon, Polygon, Point, Feature } from 'geojson';
|
|
4370
|
+
import type { Position as GeoJsonPosition, FeatureCollection, LineString, MultiPolygon, Polygon, Point, Feature } from 'geojson';
|
|
4289
4371
|
import type { AddPathOptions, PathState } from '@mappedin/react-sdk/geojson/src/components/path';
|
|
4290
4372
|
import { StackSystem } from '@mappedin/react-sdk/geojson/src/systems/stack/system';
|
|
4291
4373
|
import { CameraSystem } from '@mappedin/react-sdk/geojson/src/systems/camera';
|
|
@@ -4293,8 +4375,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4293
4375
|
import { type Map as MapLibreMap } from '@mappedin/react-sdk/packages/outdoor-context-v4';
|
|
4294
4376
|
import type { GeometryState } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
4295
4377
|
import type { ModelState } from '@mappedin/react-sdk/geojson/src/components/model';
|
|
4296
|
-
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4297
|
-
import { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/entity-group';
|
|
4378
|
+
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
4298
4379
|
import { DOMResizeSystem } from '@mappedin/react-sdk/geojson/src/systems/dom-resize/system';
|
|
4299
4380
|
import { Camera } from '@mappedin/react-sdk/geojson/src/camera';
|
|
4300
4381
|
import { type WatermarkOptions, WatermarkSystem } from '@mappedin/react-sdk/geojson/src/systems/watermark/system';
|
|
@@ -4303,9 +4384,13 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4303
4384
|
import { type CustomGeometryBuilder, type ShapeState } from '@mappedin/react-sdk/geojson/src/components/custom';
|
|
4304
4385
|
import { CustomGeometrySystem } from '@mappedin/react-sdk/geojson/src/systems/custom-geometry/system';
|
|
4305
4386
|
import { OutlineInterpolationSystem } from '@mappedin/react-sdk/geojson/src/systems/outline-interpolation/system';
|
|
4387
|
+
import { ImageSystem } from '@mappedin/react-sdk/geojson/src/systems/image/system';
|
|
4306
4388
|
import { GeometryInFocusSystem } from '@mappedin/react-sdk/geojson/src/systems/geometry-in-focus/system';
|
|
4307
4389
|
import { OutdoorLayers } from '@mappedin/react-sdk/geojson/src/systems/outdoor-layers/system';
|
|
4308
4390
|
import { PathSystem } from '@mappedin/react-sdk/geojson/src/systems/path';
|
|
4391
|
+
import { type ImageProperties, type ImageState, type ImageStyle } from '@mappedin/react-sdk/geojson/src/components/image';
|
|
4392
|
+
import { MeshOpacitySystem } from '@mappedin/react-sdk/geojson/src/systems/mesh-opacity/system';
|
|
4393
|
+
import { MeshModificationSystem } from '@mappedin/react-sdk/geojson/src/systems/mesh-modification/system';
|
|
4309
4394
|
export type * from '@mappedin/react-sdk/geojson/src/types';
|
|
4310
4395
|
export const raycaster: Raycaster;
|
|
4311
4396
|
export const DEFAULT_ZOOM_LEVEL = 18;
|
|
@@ -4324,21 +4409,6 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4324
4409
|
AFTER_RENDER: number;
|
|
4325
4410
|
AFTER_ALL_UPDATES: number;
|
|
4326
4411
|
};
|
|
4327
|
-
export type Entity3DTypes = Geometry3D | GeometryGroupObject3D | GroupContainerObject3D;
|
|
4328
|
-
export type RendererState = {
|
|
4329
|
-
entity3DMap: Map<string | number, Entity3DTypes>;
|
|
4330
|
-
entity2DMap: Map<string | number, Geometry2D>;
|
|
4331
|
-
entity2DIds: Set<Geometry2D['id']>;
|
|
4332
|
-
threeDEntities: (string | number)[];
|
|
4333
|
-
entityScene: GroupContainerObject3D;
|
|
4334
|
-
hoverColor: string;
|
|
4335
|
-
center?: Position;
|
|
4336
|
-
insetsPadding: InsetPadding;
|
|
4337
|
-
shouldMeasureCanvas: boolean;
|
|
4338
|
-
pixelRatio: number;
|
|
4339
|
-
canvasWidth: number;
|
|
4340
|
-
canvasHeight: number;
|
|
4341
|
-
};
|
|
4342
4412
|
export type Systems = {
|
|
4343
4413
|
cameraSystem: CameraSystem;
|
|
4344
4414
|
panBoundsSystem: PanBoundsSystem;
|
|
@@ -4362,7 +4432,10 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4362
4432
|
outlineInterpolationSystem: OutlineInterpolationSystem;
|
|
4363
4433
|
outdoorLayersSystem: OutdoorLayers;
|
|
4364
4434
|
pathSystem: PathSystem;
|
|
4435
|
+
imageSystem: ImageSystem;
|
|
4365
4436
|
geometryInFocusSystem: GeometryInFocusSystem;
|
|
4437
|
+
meshOpacitySystem: MeshOpacitySystem;
|
|
4438
|
+
meshModificationSystem: MeshModificationSystem;
|
|
4366
4439
|
};
|
|
4367
4440
|
export type MapViewState = {
|
|
4368
4441
|
readonly type: 'map-view';
|
|
@@ -4420,6 +4493,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4420
4493
|
* Add a geometry group from GeoJSON data
|
|
4421
4494
|
*/
|
|
4422
4495
|
addGeometryGroup<T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(id: string, geometry: T, style?: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<GeometryGroupState>;
|
|
4496
|
+
addImage(id: string, geometry: Feature<Point, ImageProperties>, style: ImageStyle, parent?: EntityId<GroupContainerState> | string | null): EntityId<ImageState> | undefined;
|
|
4423
4497
|
/**
|
|
4424
4498
|
* Add a group of models from GeoJSON data. These will be instanced automatically for better performance.
|
|
4425
4499
|
*/
|
|
@@ -4478,9 +4552,9 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4478
4552
|
* Get the current state of the map view, or any entity that was added, regardless of whether it is visible in the scene
|
|
4479
4553
|
*/
|
|
4480
4554
|
getState(): MapViewState;
|
|
4481
|
-
getState<T extends EntityId<EntityState>>(geometryOrGeometryId: T): T extends EntityId<LabelState> ? LabelState : T extends EntityId<GeometryState> ? GeometryState : T extends EntityId<MarkerState> ? MarkerState : T extends EntityId<GeometryGroupState> ? GeometryGroupState : T extends EntityId<GroupContainerState> ? GroupContainerState : T extends EntityId<ModelState> ? ModelState : T extends EntityId<PathState> ? ShapeState : T extends EntityId<ShapeState> ? ShapeState : EntityState;
|
|
4555
|
+
getState<T extends EntityId<EntityState>>(geometryOrGeometryId: T): T extends EntityId<LabelState> ? LabelState : T extends EntityId<GeometryState> ? GeometryState : T extends EntityId<MarkerState> ? MarkerState : T extends EntityId<GeometryGroupState> ? GeometryGroupState : T extends EntityId<GroupContainerState> ? GroupContainerState : T extends EntityId<ModelState> ? ModelState : T extends EntityId<PathState> ? ShapeState : T extends EntityId<ShapeState> ? ShapeState : T extends EntityId<ImageState> ? ImageState : EntityState;
|
|
4482
4556
|
getState(geometryOrGeometryId?: Record<string | number, any> | string | number): EntityState;
|
|
4483
|
-
getState<T extends EntityState>(geometryOrGeometryId: T['id']): T extends LabelState ? LabelState : T extends GeometryState ? GeometryState : T extends MarkerState ? MarkerState : T extends GeometryGroupState ? GeometryGroupState : T extends GroupContainerState ? GroupContainerState : T extends ModelState ? ModelState : T extends PathState ? ShapeState : T extends ShapeState ? PathState : EntityState;
|
|
4557
|
+
getState<T extends EntityState>(geometryOrGeometryId: T['id']): T extends LabelState ? LabelState : T extends GeometryState ? GeometryState : T extends MarkerState ? MarkerState : T extends GeometryGroupState ? GeometryGroupState : T extends GroupContainerState ? GroupContainerState : T extends ModelState ? ModelState : T extends PathState ? ShapeState : T extends ShapeState ? PathState : T extends ImageState ? ImageState : EntityState;
|
|
4484
4558
|
/**
|
|
4485
4559
|
* Set the state of the map view or any entity that was added, regardless of whether it is visible in the scene.
|
|
4486
4560
|
*/
|
|
@@ -4493,6 +4567,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4493
4567
|
setState<T extends EntityId<ShapeState>>(object: T | T['id'], state: Partial<ShapeState>): void;
|
|
4494
4568
|
setState<T extends EntityId<PathState>>(object: T | T['id'], state: Partial<PathState>): void;
|
|
4495
4569
|
setState<T extends EntityId<ModelState>>(object: T | T['id'], state: Partial<ModelState>): void;
|
|
4570
|
+
setState<T extends EntityId<ImageState>>(object: T | T['id'], state: Partial<ImageState>): void;
|
|
4496
4571
|
setState<T extends EntityState>(object: T | T['id'], state: Partial<T>): void;
|
|
4497
4572
|
/**
|
|
4498
4573
|
* Project a screen coordinate to a geographic coordinate
|
|
@@ -4531,6 +4606,10 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4531
4606
|
* Sets the background color of the renderer. Only applies to "standalone mode"
|
|
4532
4607
|
*/
|
|
4533
4608
|
setBackgroundColor: (color: any, alpha: any) => void;
|
|
4609
|
+
/**
|
|
4610
|
+
* Returns the current scale of the map in metres per pixel.
|
|
4611
|
+
*/
|
|
4612
|
+
getMetresPerPixel: () => number | undefined;
|
|
4534
4613
|
/**
|
|
4535
4614
|
* @internal
|
|
4536
4615
|
* Filters out layers at a certain point on the outdoor map. This can be used to hide the outdoor building footprint underneath the 3D geometry.
|
|
@@ -4800,40 +4879,40 @@ declare module '@mappedin/react-sdk/geojson/src/utils' {
|
|
|
4800
4879
|
import { Box2 } from 'three';
|
|
4801
4880
|
import { MercatorCoordinate } from '@mappedin/react-sdk/packages/outdoor-context-v4';
|
|
4802
4881
|
import type { CustomLayerInterface } from '@mappedin/react-sdk/packages/outdoor-context-v4';
|
|
4803
|
-
import type { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4804
|
-
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4805
|
-
import type { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4806
|
-
import type { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4882
|
+
import type { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
4883
|
+
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
4884
|
+
import type { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/geometry2d';
|
|
4885
|
+
import type { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
4807
4886
|
import type { Position, RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
4808
4887
|
import type { Camera } from '@mappedin/react-sdk/geojson/src/camera';
|
|
4809
4888
|
export function cartesianToGeographic(centerLat: number, centerLon: number, x: number, y: number): {
|
|
4810
|
-
|
|
4811
|
-
|
|
4889
|
+
lat: number;
|
|
4890
|
+
lon: number;
|
|
4812
4891
|
};
|
|
4813
4892
|
export function geographicToCartesian(centerLat: number, centerLon: number, targetLat: number, targetLon: number): {
|
|
4814
|
-
|
|
4815
|
-
|
|
4893
|
+
x: number;
|
|
4894
|
+
y: number;
|
|
4816
4895
|
};
|
|
4817
|
-
export const
|
|
4818
|
-
export const
|
|
4896
|
+
export const populateGeometry3DIdsInScene: (tree: any, entities: RendererState["geometry3DIdsInScene"]) => Set<string | number>;
|
|
4897
|
+
export const populateGeometry2DIdsInScene: (tree: any, entities: Set<Geometry2D["id"]>) => Set<string | number>;
|
|
4819
4898
|
export function convertMapLibreStylePaintProps(paint: any): {
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4899
|
+
color: any;
|
|
4900
|
+
height: any;
|
|
4901
|
+
altitude: any;
|
|
4902
|
+
opacity: any;
|
|
4903
|
+
outline: any;
|
|
4825
4904
|
};
|
|
4826
4905
|
export function convertMapLibreLineStylePaintProps(paint: any): {
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4906
|
+
color: any;
|
|
4907
|
+
join: any;
|
|
4908
|
+
opacity: any;
|
|
4909
|
+
width: any;
|
|
4910
|
+
cap: any;
|
|
4832
4911
|
};
|
|
4833
4912
|
export function mergeObjects<T extends Record<string, any>>(obj1: T, obj2: T): T;
|
|
4834
4913
|
export function createCustomLayer(modelAsMercatorCoordinate: MercatorCoordinate, viewCamera: THREECamera, camera: Camera, onRender: () => void): CustomLayerInterface;
|
|
4835
4914
|
export function getRequestHeaders(authURL: string): Promise<{
|
|
4836
|
-
|
|
4915
|
+
'x-mappedin-tiles-key': string;
|
|
4837
4916
|
}>;
|
|
4838
4917
|
export function cyrb53(str: string, seed?: number): number;
|
|
4839
4918
|
export const linearEase: (t: number) => number;
|
|
@@ -4845,38 +4924,53 @@ declare module '@mappedin/react-sdk/geojson/src/utils' {
|
|
|
4845
4924
|
/* getProjectionScaleFactor()
|
|
4846
4925
|
/* finds the scale ratio between screen coordinates and 3D coordinates (in X-Z plane)
|
|
4847
4926
|
/*
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4927
|
+
* R
|
|
4928
|
+
* /|
|
|
4929
|
+
* C : Camera / |
|
|
4930
|
+
* PQ : Projection Plane / |
|
|
4931
|
+
* OR : Origin / |
|
|
4932
|
+
* F : FOV / |
|
|
4933
|
+
* Q / |
|
|
4934
|
+
* /| |
|
|
4935
|
+
* / | |
|
|
4936
|
+
* / | |
|
|
4937
|
+
* / | |
|
|
4938
|
+
* / | |
|
|
4939
|
+
* / F/2 | |
|
|
4940
|
+
* C ------------P------------ O
|
|
4941
|
+
*
|
|
4942
|
+
*
|
|
4943
|
+
* ProjectionScaleFactor = ( OR / PQ )
|
|
4944
|
+
* PQ = canvasHeight / 2
|
|
4945
|
+
* CQ = zoom
|
|
4946
|
+
*
|
|
4947
|
+
* OR / C0 = tan(F/2)
|
|
4948
|
+
* so OR = CO * tan(F/2)
|
|
4949
|
+
*/
|
|
4871
4950
|
export function getProjectionScaleFactor(FOV: number, canvasHeight: number, zoom: number): number;
|
|
4872
4951
|
export function getGeometryByGeometryId(state: RendererState, geometryOrGeometryId?: string | number | Record<string, any>): Geometry3D | GroupContainerObject3D | GeometryGroupObject3D | Geometry2D | undefined;
|
|
4873
4952
|
export function getBoundingBoxCenter(bbox: Position[]): [number, number];
|
|
4953
|
+
export function toRadians(degrees: number): number;
|
|
4954
|
+
/**
|
|
4955
|
+
* Calculates the approximate distance between two geographic coordinates on Earth's surface.
|
|
4956
|
+
*
|
|
4957
|
+
* This function uses the equirectangular approximation method to compute the distance, which simplifies
|
|
4958
|
+
* the math and speeds up calculations, but is less accurate over long distances compared to other methods
|
|
4959
|
+
* like the haversine formula.
|
|
4960
|
+
*
|
|
4961
|
+
* @param {Position} point1 - The first point's longitude and latitude as [longitude, latitude].
|
|
4962
|
+
* @param {Position} point1 - The second point's longitude and latitude as [longitude, latitude].
|
|
4963
|
+
* @return
|
|
4964
|
+
* @return {number} The approximate distance between the two points in meters.
|
|
4965
|
+
*/
|
|
4966
|
+
export function haversineDistance(point1: Position, point2: Position): number;
|
|
4874
4967
|
export { getCornersOfBoundingBox } from '@mappedin/react-sdk/geojson/src/utils/bounding-box';
|
|
4875
4968
|
export function isFiniteBox(box: Box2 | Box3): boolean;
|
|
4876
4969
|
export { getPixelRatio } from '@mappedin/react-sdk/geojson/src/utils/get-pixel-ratio';
|
|
4877
4970
|
export { debounce } from '@mappedin/react-sdk/geojson/src/utils/async';
|
|
4878
4971
|
export { shouldDisableOffscreenCanvas } from '@mappedin/react-sdk/geojson/src/utils/browser';
|
|
4879
4972
|
export { noop } from '@mappedin/react-sdk/geojson/src/utils/fp';
|
|
4973
|
+
export { transformRequest } from '@mappedin/react-sdk/geojson/src/utils/tranform-request';
|
|
4880
4974
|
}
|
|
4881
4975
|
|
|
4882
4976
|
declare module '@mappedin/react-sdk/geojson/src/utils/constants' {
|
|
@@ -5172,6 +5266,23 @@ declare module '@mappedin/react-sdk/mappedin-js/src/analytics/customer' {
|
|
|
5172
5266
|
export {};
|
|
5173
5267
|
}
|
|
5174
5268
|
|
|
5269
|
+
declare module '@mappedin/react-sdk/geojson/src/maplibre-overlay' {
|
|
5270
|
+
import type { IControl, Map as MapLibreMap, CustomLayerInterface } from '@packages/internal/outdoor-context-v4';
|
|
5271
|
+
import type { Position } from '@mappedin/react-sdk/geojson/src/types';
|
|
5272
|
+
import RendererCore from '@mappedin/react-sdk/geojson/src/renderer';
|
|
5273
|
+
import { PubSub } from '@packages/internal/common';
|
|
5274
|
+
export class MapLibreOverlay<T> extends PubSub<T> implements IControl {
|
|
5275
|
+
el: HTMLDivElement;
|
|
5276
|
+
core: RendererCore;
|
|
5277
|
+
origin?: Position;
|
|
5278
|
+
map?: MapLibreMap;
|
|
5279
|
+
layer?: CustomLayerInterface;
|
|
5280
|
+
constructor(origin: Position | undefined);
|
|
5281
|
+
onAdd(map: MapLibreMap): HTMLDivElement;
|
|
5282
|
+
onRemove(): void;
|
|
5283
|
+
}
|
|
5284
|
+
}
|
|
5285
|
+
|
|
5175
5286
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects/label' {
|
|
5176
5287
|
/**
|
|
5177
5288
|
* Class representing a label on the {@link MapView}.
|
|
@@ -5336,8 +5447,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
|
|
|
5336
5447
|
import type { Position, RendererCore, WatermarkOptions } from '@mappedin/core-sdk';
|
|
5337
5448
|
import { type TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
5338
5449
|
import type MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
|
|
5339
|
-
import { Floor } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
5340
|
-
import { Coordinate, MapObject, Space } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
5450
|
+
import { Coordinate, MapObject, Space, Floor } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
5341
5451
|
import type { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
|
|
5342
5452
|
import { Label, Marker, type Model } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
5343
5453
|
import { Navigation } from '@mappedin/react-sdk/mappedin-js/src/navigation';
|
|
@@ -5402,6 +5512,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
|
|
|
5402
5512
|
* @internal
|
|
5403
5513
|
*/
|
|
5404
5514
|
get __core(): RendererCore;
|
|
5515
|
+
clear(): void;
|
|
5405
5516
|
destroy(): void;
|
|
5406
5517
|
}
|
|
5407
5518
|
}
|
|
@@ -5991,7 +6102,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object' {
|
|
|
5991
6102
|
elevation: number;
|
|
5992
6103
|
containerId: string;
|
|
5993
6104
|
layers: Map<string, string>;
|
|
5994
|
-
constructor(parentId: string, floor: ParsedMVF['map.geojson'][0], renderer: RendererCore, options: TShow3DMapOptions, mvf
|
|
6105
|
+
constructor(parentId: string, floor: ParsedMVF['map.geojson'][0], renderer: RendererCore, options: TShow3DMapOptions, mvf: ParsedMVF, styleMap?: AggregatedStyleMap);
|
|
5995
6106
|
load: () => this;
|
|
5996
6107
|
}
|
|
5997
6108
|
}
|
|
@@ -6024,17 +6135,18 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metada
|
|
|
6024
6135
|
}
|
|
6025
6136
|
}
|
|
6026
6137
|
|
|
6027
|
-
declare module '@mappedin/react-sdk/geojson/src/entities/
|
|
6138
|
+
declare module '@mappedin/react-sdk/geojson/src/entities/geometry3d' {
|
|
6028
6139
|
import { Object3D } from 'three';
|
|
6029
6140
|
import type { InteractionComponent } from '@mappedin/react-sdk/geojson/src/components/interaction';
|
|
6030
6141
|
import type { MeshComponent } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
6031
6142
|
import type { ModelComponent } from '@mappedin/react-sdk/geojson/src/components/model';
|
|
6032
6143
|
import type { PathComponent } from '@mappedin/react-sdk/geojson/src/components/path';
|
|
6033
6144
|
import type { StyleComponent } from '@mappedin/react-sdk/geojson/src/components/style';
|
|
6145
|
+
import type { ImageComponent } from '@mappedin/react-sdk/geojson/src/components/image';
|
|
6034
6146
|
import type { CustomGeometryComponent } from '@mappedin/react-sdk/geojson/src/components/custom';
|
|
6035
|
-
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
6036
|
-
import { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
6037
|
-
export enum
|
|
6147
|
+
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
6148
|
+
import type { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
6149
|
+
export enum Geometry3DComponents {
|
|
6038
6150
|
Mesh = 0,
|
|
6039
6151
|
Style = 1,
|
|
6040
6152
|
Interaction = 2
|
|
@@ -6042,27 +6154,27 @@ declare module '@mappedin/react-sdk/geojson/src/entities/three-d' {
|
|
|
6042
6154
|
export class Geometry3DObject3D extends Object3D {
|
|
6043
6155
|
userData: {
|
|
6044
6156
|
entityId: string;
|
|
6045
|
-
type: 'geometry' | 'path' | 'model' | 'custom-geometry';
|
|
6157
|
+
type: 'geometry' | 'path' | 'model' | 'custom-geometry' | 'image';
|
|
6046
6158
|
};
|
|
6047
6159
|
}
|
|
6048
|
-
export type MeshComponentTypes = MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent;
|
|
6160
|
+
export type MeshComponentTypes = MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent | ImageComponent;
|
|
6049
6161
|
export class Geometry3D {
|
|
6050
6162
|
id: string | number;
|
|
6051
6163
|
components: [MeshComponentTypes, StyleComponent, InteractionComponent?];
|
|
6052
6164
|
get object3d(): import("../components/mesh").EntityBatchedMesh | Geometry3DObject3D | undefined;
|
|
6053
6165
|
get parent(): GroupContainerObject3D | GeometryGroupObject3D | null;
|
|
6054
|
-
get type(): 'geometry' | 'path' | 'model' | 'custom-geometry';
|
|
6055
|
-
constructor(meshComponent: MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent, styleComponent: StyleComponent);
|
|
6166
|
+
get type(): 'geometry' | 'path' | 'model' | 'custom-geometry' | 'image';
|
|
6167
|
+
constructor(meshComponent: MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent | ImageComponent, styleComponent: StyleComponent);
|
|
6056
6168
|
}
|
|
6057
6169
|
}
|
|
6058
6170
|
|
|
6059
|
-
declare module '@mappedin/react-sdk/geojson/src/entities/
|
|
6171
|
+
declare module '@mappedin/react-sdk/geojson/src/entities/geometry2d' {
|
|
6060
6172
|
import { Object3D, Vector3 } from 'three';
|
|
6061
6173
|
import type { MarkerComponent } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
6062
6174
|
import type LabelComponent from '@mappedin/react-sdk/geojson/src/components/label';
|
|
6063
|
-
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
6175
|
+
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
6064
6176
|
import type { InteractionComponent } from '@mappedin/react-sdk/geojson/src/components/interaction';
|
|
6065
|
-
export enum
|
|
6177
|
+
export enum Geometry2DComponents {
|
|
6066
6178
|
UI = 0,
|
|
6067
6179
|
Interaction = 1
|
|
6068
6180
|
}
|
|
@@ -6115,6 +6227,11 @@ declare module '@mappedin/react-sdk/geojson/src/components/geometry-group-style'
|
|
|
6115
6227
|
topColor?: string;
|
|
6116
6228
|
opacity: number;
|
|
6117
6229
|
outline: boolean;
|
|
6230
|
+
/**
|
|
6231
|
+
* Ideally for handling all style component changes. However, it's only used for handling outline for now.
|
|
6232
|
+
* Color update is handled separately in each child. See: https://github.com/MappedIn/sdk/blob/v6.0.1-beta.1/sdks/geojson/src/entities/utils.ts#L70
|
|
6233
|
+
*/
|
|
6234
|
+
dirty: boolean;
|
|
6118
6235
|
get shading(): Required<Shading> | undefined;
|
|
6119
6236
|
set shading(value: Shading | undefined);
|
|
6120
6237
|
constructor(style?: Partial<GeometryGroupStyle>);
|
|
@@ -6122,6 +6239,79 @@ declare module '@mappedin/react-sdk/geojson/src/components/geometry-group-style'
|
|
|
6122
6239
|
export {};
|
|
6123
6240
|
}
|
|
6124
6241
|
|
|
6242
|
+
declare module '@mappedin/react-sdk/geojson/src/components/image' {
|
|
6243
|
+
import type { LineSegments, PlaneGeometry, MeshLambertMaterial } from 'three';
|
|
6244
|
+
import { Vector3, Mesh } from 'three';
|
|
6245
|
+
import type { Position } from '@mappedin/react-sdk/geojson/src/types';
|
|
6246
|
+
import type { Feature, Point } from 'geojson';
|
|
6247
|
+
import { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
6248
|
+
export class EntityMesh extends Mesh {
|
|
6249
|
+
userData: {
|
|
6250
|
+
entityId: string | number;
|
|
6251
|
+
};
|
|
6252
|
+
}
|
|
6253
|
+
export type ImageStyle = {
|
|
6254
|
+
/**
|
|
6255
|
+
* Attempt to keep the image facing the camera as much as possible
|
|
6256
|
+
*/
|
|
6257
|
+
flipImageToFaceCamera?: boolean;
|
|
6258
|
+
/**
|
|
6259
|
+
* url of the image
|
|
6260
|
+
*/
|
|
6261
|
+
url: string;
|
|
6262
|
+
};
|
|
6263
|
+
export type ImageProperties = {
|
|
6264
|
+
width: number;
|
|
6265
|
+
height: number;
|
|
6266
|
+
rotation?: number;
|
|
6267
|
+
verticalOffset?: number;
|
|
6268
|
+
};
|
|
6269
|
+
export function validImageFeature(feature: Feature<Point, ImageProperties>): feature is Feature<Point, ImageProperties>;
|
|
6270
|
+
/**
|
|
6271
|
+
* State representing an Image
|
|
6272
|
+
*/
|
|
6273
|
+
export type ImageState = {
|
|
6274
|
+
readonly id: string | number;
|
|
6275
|
+
readonly type: 'image';
|
|
6276
|
+
/**
|
|
6277
|
+
* The position of the image in [lon, lat]
|
|
6278
|
+
*/
|
|
6279
|
+
readonly position: Position;
|
|
6280
|
+
/**
|
|
6281
|
+
* The offset of the image in the z direction
|
|
6282
|
+
*/
|
|
6283
|
+
readonly verticalOffset: number;
|
|
6284
|
+
/**
|
|
6285
|
+
* Whether the image is visible
|
|
6286
|
+
*/
|
|
6287
|
+
visible: boolean;
|
|
6288
|
+
/**
|
|
6289
|
+
* Attempt to keep the image facing the camera as much as possible
|
|
6290
|
+
*/
|
|
6291
|
+
flipImageToFaceCamera: boolean;
|
|
6292
|
+
};
|
|
6293
|
+
export class ImageComponent {
|
|
6294
|
+
mesh: Geometry3DObject3D;
|
|
6295
|
+
imageMesh?: EntityMesh;
|
|
6296
|
+
outline?: LineSegments;
|
|
6297
|
+
readonly type = "image";
|
|
6298
|
+
instanceIndex: number;
|
|
6299
|
+
geometry?: PlaneGeometry;
|
|
6300
|
+
material?: MeshLambertMaterial;
|
|
6301
|
+
feature: Feature<Point, ImageProperties>;
|
|
6302
|
+
constructor(feature: Feature<Point, ImageProperties>);
|
|
6303
|
+
get visible(): boolean;
|
|
6304
|
+
set visible(visible: boolean);
|
|
6305
|
+
position: Vector3;
|
|
6306
|
+
}
|
|
6307
|
+
}
|
|
6308
|
+
|
|
6309
|
+
declare module '@mappedin/react-sdk/geojson/src/entities' {
|
|
6310
|
+
export { updateInteractivity } from '@mappedin/react-sdk/geojson/src/entities/utils';
|
|
6311
|
+
export { Geometry2D, Geometry2DComponents } from '@mappedin/react-sdk/geojson/src/entities/geometry2d';
|
|
6312
|
+
export { Geometry3D, Geometry3DComponents } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
6313
|
+
}
|
|
6314
|
+
|
|
6125
6315
|
declare module '@mappedin/react-sdk/geojson/src/types/options' {
|
|
6126
6316
|
import type { Position } from '@mappedin/react-sdk/geojson/src/types/geometry';
|
|
6127
6317
|
import type { Map as MapLibreMap } from '@mappedin/react-sdk/packages/outdoor-context-v4';
|
|
@@ -6169,6 +6359,10 @@ declare module '@mappedin/react-sdk/geojson/src/systems/mesh-creation-and-optimi
|
|
|
6169
6359
|
set topTexture(texture: Texture);
|
|
6170
6360
|
setGradientShading(start: number, end: number, intensity: number): void;
|
|
6171
6361
|
setColor(batchId: number, color: Color, topColor: Color): void;
|
|
6362
|
+
getColor(batchId: number): {
|
|
6363
|
+
color: Color;
|
|
6364
|
+
topColor: Color;
|
|
6365
|
+
};
|
|
6172
6366
|
showTextures: (batchId: number) => void;
|
|
6173
6367
|
hideTextures(batchId: number): void;
|
|
6174
6368
|
dispose(): void;
|
|
@@ -6245,6 +6439,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/collisions/system' {
|
|
|
6245
6439
|
import { PubSub } from '@mappedin/react-sdk/packages/common/pubsub';
|
|
6246
6440
|
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
6247
6441
|
import type { TSerializedCollider, TSerializedColliderResponse } from '@mappedin/react-sdk/geojson/src/systems/collisions/collider-processor';
|
|
6442
|
+
import { WatermarkPosition } from '@mappedin/react-sdk/geojson/src/systems/watermark/system';
|
|
6248
6443
|
export type TMessageEvent = MessageEvent<{
|
|
6249
6444
|
msgId: string;
|
|
6250
6445
|
colliders: TSerializedColliderResponse[];
|
|
@@ -6261,6 +6456,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/collisions/system' {
|
|
|
6261
6456
|
totalHeight: number;
|
|
6262
6457
|
watermarkWidth: number;
|
|
6263
6458
|
watermarkHeight: number;
|
|
6459
|
+
watermarkPosition: WatermarkPosition;
|
|
6264
6460
|
colliders: TSerializedCollider[];
|
|
6265
6461
|
devicePixelRatio: number;
|
|
6266
6462
|
};
|
|
@@ -6276,7 +6472,8 @@ declare module '@mappedin/react-sdk/geojson/src/systems/collisions/system' {
|
|
|
6276
6472
|
totalHeight: number,
|
|
6277
6473
|
totalWidth: number,
|
|
6278
6474
|
watermarkWidth: number,
|
|
6279
|
-
watermarkHeight: number
|
|
6475
|
+
watermarkHeight: number,
|
|
6476
|
+
watermarkPosition: WatermarkPosition
|
|
6280
6477
|
];
|
|
6281
6478
|
export class CollisionSystem extends PubSub<TCollisionSystemEvent, keyof TCollisionSystemEvent> {
|
|
6282
6479
|
dirty: boolean;
|
|
@@ -6295,8 +6492,8 @@ declare module '@mappedin/react-sdk/geojson/src/systems/collisions/system' {
|
|
|
6295
6492
|
currentMsgId: string;
|
|
6296
6493
|
working: boolean;
|
|
6297
6494
|
componentArray: (MarkerComponent | LabelComponent)[];
|
|
6298
|
-
update: (watermarkWidth: number, watermarkHeight: number) => void;
|
|
6299
|
-
resize(watermarkWidth: number, watermarkHeight: number): void;
|
|
6495
|
+
update: (watermarkWidth: number, watermarkHeight: number, watermarkPosition?: WatermarkPosition) => void;
|
|
6496
|
+
resize(watermarkWidth: number, watermarkHeight: number, watermarkPosition: WatermarkPosition): void;
|
|
6300
6497
|
/**
|
|
6301
6498
|
* Resolve collisions
|
|
6302
6499
|
*/
|
|
@@ -6337,7 +6534,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/zoom-interpolation/zoom-
|
|
|
6337
6534
|
declare module '@mappedin/react-sdk/geojson/src/systems/mesh-creation-and-optimization/system' {
|
|
6338
6535
|
import type { BufferGeometry } from 'three';
|
|
6339
6536
|
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
6340
|
-
import { Geometry3D, Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
6537
|
+
import { Geometry3D, Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
6341
6538
|
import type { Feature, LineString, MultiPolygon, Point, Polygon } from 'geojson';
|
|
6342
6539
|
import type { LineStyle, ModelProperties, ModelStyle, PaintStyle } from '@mappedin/react-sdk/geojson/src/types';
|
|
6343
6540
|
import type { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
|
|
@@ -6718,11 +6915,13 @@ declare module '@mappedin/react-sdk/geojson/src/systems/custom-geometry/system'
|
|
|
6718
6915
|
declare module '@mappedin/react-sdk/geojson/src/systems/outline-interpolation/system' {
|
|
6719
6916
|
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
6720
6917
|
export class OutlineInterpolationSystem {
|
|
6918
|
+
#private;
|
|
6721
6919
|
/**
|
|
6722
6920
|
* Set to true when we need to update the outline color of all entities, regardless of zoom level.
|
|
6723
6921
|
*/
|
|
6724
6922
|
dirty: boolean;
|
|
6725
|
-
geometries3DDirty: boolean;
|
|
6923
|
+
get geometries3DDirty(): boolean;
|
|
6924
|
+
set geometries3DDirty(value: boolean);
|
|
6726
6925
|
constructor(rendererState: RendererState);
|
|
6727
6926
|
/**
|
|
6728
6927
|
* Update the outline color of all entities with an outline component.
|
|
@@ -6733,6 +6932,19 @@ declare module '@mappedin/react-sdk/geojson/src/systems/outline-interpolation/sy
|
|
|
6733
6932
|
}
|
|
6734
6933
|
}
|
|
6735
6934
|
|
|
6935
|
+
declare module '@mappedin/react-sdk/geojson/src/systems/image/system' {
|
|
6936
|
+
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
6937
|
+
import type { RendererCore } from '@mappedin/react-sdk/geojson/src';
|
|
6938
|
+
import { PubSub } from '@packages/internal/common';
|
|
6939
|
+
export const DEFAULT_VERTICAL_OFFSET = 0.01;
|
|
6940
|
+
export class ImageSystem extends PubSub<{
|
|
6941
|
+
'image-loaded': void;
|
|
6942
|
+
}> {
|
|
6943
|
+
constructor(rendererState: RendererState, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']);
|
|
6944
|
+
update(cameraRotationRadians: number): void;
|
|
6945
|
+
}
|
|
6946
|
+
}
|
|
6947
|
+
|
|
6736
6948
|
declare module '@mappedin/react-sdk/geojson/src/systems/geometry-in-focus/system' {
|
|
6737
6949
|
import { PubSub } from '@packages/internal/common';
|
|
6738
6950
|
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
@@ -6766,6 +6978,45 @@ declare module '@mappedin/react-sdk/geojson/src/systems/path' {
|
|
|
6766
6978
|
export { PathSystem } from '@mappedin/react-sdk/geojson/src/systems/path/system';
|
|
6767
6979
|
}
|
|
6768
6980
|
|
|
6981
|
+
declare module '@mappedin/react-sdk/geojson/src/systems/mesh-opacity/system' {
|
|
6982
|
+
import { type Geometry3DTypes, type RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
6983
|
+
/**
|
|
6984
|
+
* This system is responsible for updating the opacity of the mesh, which results in the mesh
|
|
6985
|
+
* being detached from the parent's optimized geometry group and rendered as a separate mesh.
|
|
6986
|
+
*/
|
|
6987
|
+
export class MeshOpacitySystem {
|
|
6988
|
+
#private;
|
|
6989
|
+
rendererState: RendererState;
|
|
6990
|
+
dirty: boolean;
|
|
6991
|
+
constructor(rendererState: RendererState);
|
|
6992
|
+
updateOne(geometry: Geometry3DTypes | undefined): void;
|
|
6993
|
+
update(): void;
|
|
6994
|
+
}
|
|
6995
|
+
}
|
|
6996
|
+
|
|
6997
|
+
declare module '@mappedin/react-sdk/geojson/src/systems/mesh-modification/system' {
|
|
6998
|
+
import { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities';
|
|
6999
|
+
import type { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
7000
|
+
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
7001
|
+
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
7002
|
+
/**
|
|
7003
|
+
* Any physical changes to geometry should go in here. This includes height changes, etc.
|
|
7004
|
+
* This is to ensure that physical changes apply before any other systems need to do their work,
|
|
7005
|
+
* such as the outline system.
|
|
7006
|
+
*
|
|
7007
|
+
* TODO: For now, this piggybacks of style.dirty, but we may want to create a flag indicating geometry dirty.
|
|
7008
|
+
*/
|
|
7009
|
+
export class MeshModificationSystem {
|
|
7010
|
+
#private;
|
|
7011
|
+
rendererState: RendererState;
|
|
7012
|
+
dirty: boolean;
|
|
7013
|
+
constructor(rendererState: RendererState);
|
|
7014
|
+
updateOne(entity: Geometry3D | GeometryGroupObject3D | GroupContainerObject3D | undefined): void;
|
|
7015
|
+
update(): void;
|
|
7016
|
+
cleanup(): void;
|
|
7017
|
+
}
|
|
7018
|
+
}
|
|
7019
|
+
|
|
6769
7020
|
declare module '@mappedin/react-sdk/packages/geojson-navigator/src' {
|
|
6770
7021
|
export { Navigator } from '@mappedin/react-sdk/packages/geojson-navigator/src/navigator';
|
|
6771
7022
|
export type { SimplifyDirectionsOptions } from '@mappedin/react-sdk/packages/geojson-navigator/src/navigator/navigator';
|
|
@@ -6832,10 +7083,13 @@ declare module '@mappedin/react-sdk/geojson/src/utils/fp' {
|
|
|
6832
7083
|
export function noop(): void;
|
|
6833
7084
|
}
|
|
6834
7085
|
|
|
6835
|
-
declare module '@mappedin/react-sdk/geojson/src/
|
|
6836
|
-
export
|
|
6837
|
-
|
|
6838
|
-
|
|
7086
|
+
declare module '@mappedin/react-sdk/geojson/src/utils/tranform-request' {
|
|
7087
|
+
export const transformRequest: (headers: {
|
|
7088
|
+
"x-mappedin-tiles-key": string;
|
|
7089
|
+
}) => (url: string) => {
|
|
7090
|
+
url: string;
|
|
7091
|
+
headers: {};
|
|
7092
|
+
};
|
|
6839
7093
|
}
|
|
6840
7094
|
|
|
6841
7095
|
declare module '@mappedin/react-sdk/geojson/src/systems/exporter/exporter' {
|
|
@@ -6871,6 +7125,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/exporter/exporter' {
|
|
|
6871
7125
|
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils' {
|
|
6872
7126
|
import { Coordinate } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
6873
7127
|
import type { Position, EntranceCollection, LineString, Polygon, Point, SpaceProperties, ObstructionProperties, StyleCollection, PolygonStyle, LineStringStyle, Feature, ObstructionCollection, PointStyle } from '@mappedin/mvf';
|
|
7128
|
+
import type { WithPolygonImage } from '@packages/internal/mvf-utils';
|
|
6874
7129
|
import type { MultiLineString } from 'geojson';
|
|
6875
7130
|
import type { LabelState, MarkerState, GeometryState, CollisionRankingTier, LineStyle, PaintStyle } from '@mappedin/core-sdk';
|
|
6876
7131
|
import type { TGeometryState, TLabelState, TDirectionInstructionAction, TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
@@ -6894,12 +7149,13 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils' {
|
|
|
6894
7149
|
export type WithId<T> = T & {
|
|
6895
7150
|
id?: string;
|
|
6896
7151
|
};
|
|
6897
|
-
export function groupGeometryByStyle(features: Feature<LineString | Polygon | Point, SpaceProperties | ObstructionProperties>[], styleMap: AggregatedStyleMap): Map<WithId<PolygonStyle> | WithId<LineStringStyle> | WithId<PointStyle>, Feature<Point | LineString | Polygon,
|
|
7152
|
+
export function groupGeometryByStyle(features: Feature<LineString | Polygon | Point, SpaceProperties | ObstructionProperties>[], styleMap: AggregatedStyleMap): Map<WithId<PolygonStyle> | WithId<LineStringStyle> | WithId<PointStyle>, Feature<Point | LineString | Polygon, WithPolygonImage<SpaceProperties> | WithPolygonImage<ObstructionProperties>>[]>;
|
|
6898
7153
|
export function translateToCoreStyle(style: PolygonStyle | LineStringStyle, userOptions?: TShow3DMapOptions): PaintStyle | LineStyle;
|
|
6899
7154
|
}
|
|
6900
7155
|
|
|
6901
7156
|
declare module '@mappedin/react-sdk/geojson/src/components/style' {
|
|
6902
7157
|
import type { Cap, Join } from '@mappedin/react-sdk/geojson/src/types';
|
|
7158
|
+
export const DEFAULT_HEIGHT = 0.1;
|
|
6903
7159
|
type Style = {
|
|
6904
7160
|
color: string;
|
|
6905
7161
|
width: number;
|
|
@@ -6913,6 +7169,9 @@ declare module '@mappedin/react-sdk/geojson/src/components/style' {
|
|
|
6913
7169
|
texture?: string;
|
|
6914
7170
|
topTexture?: string;
|
|
6915
7171
|
outline: boolean;
|
|
7172
|
+
showImage: boolean;
|
|
7173
|
+
flipImageToFaceCamera: boolean;
|
|
7174
|
+
url?: string;
|
|
6916
7175
|
};
|
|
6917
7176
|
export class StyleComponent implements Style {
|
|
6918
7177
|
initialColor: string;
|
|
@@ -6930,11 +7189,44 @@ declare module '@mappedin/react-sdk/geojson/src/components/style' {
|
|
|
6930
7189
|
join: Join;
|
|
6931
7190
|
cap: Cap;
|
|
6932
7191
|
outline: boolean;
|
|
7192
|
+
showImage: boolean;
|
|
7193
|
+
flipImageToFaceCamera: boolean;
|
|
7194
|
+
url?: string;
|
|
6933
7195
|
constructor(style?: Partial<Style>);
|
|
6934
7196
|
}
|
|
6935
7197
|
export {};
|
|
6936
7198
|
}
|
|
6937
7199
|
|
|
7200
|
+
declare module '@mappedin/react-sdk/geojson/src/entities/utils' {
|
|
7201
|
+
import type { CollisionRankingTier, GeometryState, LabelState, PathState, RendererCore } from '@mappedin/react-sdk/geojson/src';
|
|
7202
|
+
import type { MarkerState } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
7203
|
+
import type { Geometry3DTypes, Position, RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
7204
|
+
import { GeometryGroupObject3D, type GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
7205
|
+
import { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
7206
|
+
import { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
7207
|
+
import { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/geometry2d';
|
|
7208
|
+
export function updateInteractivity(entity: Geometry3DTypes | Geometry2D, update: boolean | undefined, state: RendererState): boolean;
|
|
7209
|
+
export function updateGroupColor(entity: GeometryGroupObject3D, state: RendererState, update: Partial<Pick<GeometryGroupState, 'color' | 'topColor'>>): boolean | undefined;
|
|
7210
|
+
export function updateGroupShading(entity: GeometryGroupObject3D, update?: GeometryGroupState['shading']): boolean;
|
|
7211
|
+
export function updateImageProps(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Partial<GeometryState>): void;
|
|
7212
|
+
export function updateHeight(entity: Geometry3D, update?: number): boolean;
|
|
7213
|
+
export function updateColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Partial<GeometryState>): void;
|
|
7214
|
+
export function updatePosition(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Position | undefined, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']): void;
|
|
7215
|
+
export function updateParent(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: GroupContainerObject3D | undefined): boolean;
|
|
7216
|
+
export function updateEnabled(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: boolean | undefined): void;
|
|
7217
|
+
export function updatePath(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<PathState> | undefined): void;
|
|
7218
|
+
export function updateMarker(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<MarkerState> | undefined): boolean;
|
|
7219
|
+
export function updateRank(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: CollisionRankingTier | undefined): boolean;
|
|
7220
|
+
export function updateLabel(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<LabelState> | undefined): void;
|
|
7221
|
+
export function updateHoverColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: string): void;
|
|
7222
|
+
export function updateFlipImageToFaceCamera(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: boolean): void;
|
|
7223
|
+
export function updateVisibility(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: boolean): boolean;
|
|
7224
|
+
export function updateOpacity(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, state: RendererState, update?: number): void;
|
|
7225
|
+
export function updateIndividualGeometryOpacity(entity: Geometry3D, update?: number): boolean;
|
|
7226
|
+
export function updateAltitude(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: number): void;
|
|
7227
|
+
export function updateOutline(entity: Geometry3DTypes, update?: boolean): boolean;
|
|
7228
|
+
}
|
|
7229
|
+
|
|
6938
7230
|
declare module '@mappedin/react-sdk/geojson/src/systems/collisions/collider-processor' {
|
|
6939
7231
|
import { Rectangle } from '@packages/internal/quad-tree';
|
|
6940
7232
|
export type TSerializedCollider = {
|
|
@@ -6950,7 +7242,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/collisions/collider-proc
|
|
|
6950
7242
|
shouldCollideWithScreenEdges?: boolean;
|
|
6951
7243
|
};
|
|
6952
7244
|
export type TSerializedColliderResponse = [number, boolean, Rectangle?];
|
|
6953
|
-
export function processColliders(colliders: TSerializedCollider[], totalWidth: any, totalHeight: any, watermarkWidth: any, watermarkHeight: any, msgId?: string): {
|
|
7245
|
+
export function processColliders(colliders: TSerializedCollider[], totalWidth: any, totalHeight: any, watermarkWidth: any, watermarkHeight: any, watermarkPosition: any, msgId?: string): {
|
|
6954
7246
|
msgId: string;
|
|
6955
7247
|
colliders: TSerializedColliderResponse[];
|
|
6956
7248
|
debug: {
|
|
@@ -6965,16 +7257,16 @@ declare module '@mappedin/react-sdk/geojson/src/systems/collisions/collider-proc
|
|
|
6965
7257
|
declare module '@mappedin/react-sdk/geojson/src/systems/interactions/system' {
|
|
6966
7258
|
import type { PerspectiveCamera, Vector3, Object3D, Mesh } from 'three';
|
|
6967
7259
|
import { Raycaster } from 'three';
|
|
6968
|
-
import type { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
7260
|
+
import type { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/geometry2d';
|
|
6969
7261
|
import { QuadTree } from '@packages/internal/quad-tree';
|
|
6970
|
-
import type { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
7262
|
+
import type { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
6971
7263
|
import { PubSub } from '@mappedin/react-sdk/packages/common/pubsub';
|
|
6972
7264
|
import type { EntityMesh } from '@mappedin/react-sdk/geojson/src/types';
|
|
6973
7265
|
import { TapsController } from '@mappedin/react-sdk/geojson/src/systems/interactions/tap-controller';
|
|
6974
7266
|
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
6975
7267
|
import 'style.scss';
|
|
6976
7268
|
import type { EntityBatchedMesh } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
6977
|
-
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
7269
|
+
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
6978
7270
|
type InteractionPayload = {
|
|
6979
7271
|
entity2D?: Geometry2D;
|
|
6980
7272
|
entity3D?: Geometry3D;
|
|
@@ -7000,8 +7292,8 @@ declare module '@mappedin/react-sdk/geojson/src/systems/interactions/system' {
|
|
|
7000
7292
|
} | undefined;
|
|
7001
7293
|
};
|
|
7002
7294
|
export type InteractionRequiredCoreStateProps = {
|
|
7003
|
-
|
|
7004
|
-
|
|
7295
|
+
geometry2DIdsInScene: Set<Geometry2D['id']>;
|
|
7296
|
+
geometry3DIdsInScene: Set<Geometry3D['id']>;
|
|
7005
7297
|
};
|
|
7006
7298
|
/**
|
|
7007
7299
|
* TODO: touch support
|
|
@@ -7043,6 +7335,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/interactions/system' {
|
|
|
7043
7335
|
* Get the current cursor type determined by the interaction.
|
|
7044
7336
|
*/
|
|
7045
7337
|
getCursor(): CursorTypes;
|
|
7338
|
+
resize: () => void;
|
|
7046
7339
|
}
|
|
7047
7340
|
export {};
|
|
7048
7341
|
}
|
|
@@ -15736,32 +16029,6 @@ declare module '@mappedin/react-sdk/packages/geojson-navigator/src/types/coordin
|
|
|
15736
16029
|
export type CoordinateFeature = Feature<Point, CoordinateProperties>;
|
|
15737
16030
|
}
|
|
15738
16031
|
|
|
15739
|
-
declare module '@mappedin/react-sdk/geojson/src/entities/utils' {
|
|
15740
|
-
import type { CollisionRankingTier, GeometryState, LabelState, PathState, RendererCore } from '@mappedin/react-sdk/geojson/src';
|
|
15741
|
-
import type { MarkerState } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
15742
|
-
import type { Entity3DTypes, Position, RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
15743
|
-
import { GeometryGroupObject3D, type GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/entity-group';
|
|
15744
|
-
import { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/entity-group-container';
|
|
15745
|
-
import { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/three-d';
|
|
15746
|
-
import { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/two-d';
|
|
15747
|
-
export function updateInteractivity(entity: Entity3DTypes | Geometry2D, update: boolean | undefined, state: RendererState): boolean;
|
|
15748
|
-
export function updateGroupColor(entity: GeometryGroupObject3D, state: RendererState, update?: Partial<GeometryGroupState>): boolean;
|
|
15749
|
-
export function updateGroupShading(entity: GeometryGroupObject3D, update?: GeometryGroupState['shading']): boolean;
|
|
15750
|
-
export function updateColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Partial<GeometryState>): void;
|
|
15751
|
-
export function updatePosition(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Position | undefined, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']): void;
|
|
15752
|
-
export function updateParent(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: GroupContainerObject3D | undefined): boolean;
|
|
15753
|
-
export function updateEnabled(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: boolean | undefined): void;
|
|
15754
|
-
export function updatePath(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<PathState> | undefined): void;
|
|
15755
|
-
export function updateMarker(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<MarkerState> | undefined): boolean;
|
|
15756
|
-
export function updateRank(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: CollisionRankingTier | undefined): boolean;
|
|
15757
|
-
export function updateLabel(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<LabelState> | undefined): void;
|
|
15758
|
-
export function updateHoverColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: string): void;
|
|
15759
|
-
export function updateVisibility(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: boolean): boolean;
|
|
15760
|
-
export function updateOpacity(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, state: RendererState, update?: number): void;
|
|
15761
|
-
export function updateAltitude(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: number): void;
|
|
15762
|
-
export function updateOutline(entity: Entity3DTypes, update?: boolean): boolean;
|
|
15763
|
-
}
|
|
15764
|
-
|
|
15765
16032
|
declare module '@mappedin/react-sdk/geojson/src/systems/interactions/tap-controller' {
|
|
15766
16033
|
export enum TapType {
|
|
15767
16034
|
onefinger = 0,
|