@mappedin/react-sdk 6.0.1-beta.2 → 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-WY3JJZTH.js → GLTFLoader-5SLMAWGO.js} +1 -1
- package/lib/esm/{browser-YJRMCITR.js → browser-KZQSYQMW.js} +1 -1
- package/lib/esm/{chunk-HGQSHE2E.js → chunk-DFTJP4RV.js} +1 -1
- package/lib/esm/{chunk-BC5TNRJZ.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 +493 -206
- package/lib/esm/index.js +1 -1
- package/lib/esm/inspector-6MGWZVYQ.js +1 -0
- package/lib/esm/{outdoor-context-v4-2EO5ZD2B.js → outdoor-context-v4-LAP7PEM5.js} +1 -1
- package/package.json +2 -2
- package/lib/esm/GLTFExporter-KPBXVK2J.js +0 -18
- package/lib/esm/chunk-4GHXJDEX.js +0 -577
- package/lib/esm/chunk-GQMFEIP3.js +0 -3799
- package/lib/esm/chunk-YV7KQV7W.js +0 -950
- package/lib/esm/inspector-WITUZVCG.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
|
|
@@ -54,10 +54,18 @@ declare module '@mappedin/react-sdk/react-sdk/src/Marker' {
|
|
|
54
54
|
*/
|
|
55
55
|
export type MarkerProps = Omit<TupleToObjectWithPropNames<ParamsArray, StreamAgentParameterNames> & {
|
|
56
56
|
children?: ReactNode | ReactElement;
|
|
57
|
+
onLoad?: (marker: Mappedin.Marker) => void;
|
|
57
58
|
}, 'contentHtml'>;
|
|
58
59
|
/**
|
|
59
60
|
* Marker component
|
|
60
61
|
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```tsx
|
|
64
|
+
* <Marker target={mapData.getByType('space')[0]}>
|
|
65
|
+
* <div>Hello, world!</div>
|
|
66
|
+
* </Marker>
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
61
69
|
* @category Components
|
|
62
70
|
*/
|
|
63
71
|
export const Marker: (props: MarkerProps) => ReactElement | null;
|
|
@@ -72,7 +80,9 @@ declare module '@mappedin/react-sdk/react-sdk/src/Label' {
|
|
|
72
80
|
/**
|
|
73
81
|
* @interface
|
|
74
82
|
*/
|
|
75
|
-
export type LabelProps = TupleToObjectWithPropNames<ParamsArray, StreamAgentParameterNames
|
|
83
|
+
export type LabelProps = TupleToObjectWithPropNames<ParamsArray, StreamAgentParameterNames> & {
|
|
84
|
+
onLoad?: (label: Mappedin.Label) => void;
|
|
85
|
+
};
|
|
76
86
|
/**
|
|
77
87
|
* Label component
|
|
78
88
|
*
|
|
@@ -101,7 +111,9 @@ declare module '@mappedin/react-sdk/react-sdk/src/Path' {
|
|
|
101
111
|
/**
|
|
102
112
|
* @interface
|
|
103
113
|
*/
|
|
104
|
-
export type PathProps = TupleToObjectWithPropNames<ParamsArray, StreamAgentParameterNames
|
|
114
|
+
export type PathProps = TupleToObjectWithPropNames<ParamsArray, StreamAgentParameterNames> & {
|
|
115
|
+
onLoad?: (path: Mappedin.Path) => void;
|
|
116
|
+
};
|
|
105
117
|
/**
|
|
106
118
|
* Path component
|
|
107
119
|
*
|
|
@@ -116,6 +128,7 @@ declare module '@mappedin/react-sdk/react-sdk/src/MapView' {
|
|
|
116
128
|
import React from 'react';
|
|
117
129
|
import { show3dMap } from '@mappedin/react-sdk/mappedin-js/src';
|
|
118
130
|
import type { TupleToObjectWithPropNames } from '@mappedin/react-sdk/react-sdk/src/type-utils';
|
|
131
|
+
import type Mappedin from '@mappedin/react-sdk/react-sdk/src';
|
|
119
132
|
type ParamsArray = Parameters<typeof show3dMap>;
|
|
120
133
|
type StreamAgentParameterNames = ['el', 'mapData', 'options'];
|
|
121
134
|
/**
|
|
@@ -124,6 +137,7 @@ declare module '@mappedin/react-sdk/react-sdk/src/MapView' {
|
|
|
124
137
|
export type MapViewProps = Omit<TupleToObjectWithPropNames<ParamsArray, StreamAgentParameterNames> & {
|
|
125
138
|
children?: ReactNode;
|
|
126
139
|
fallback?: ReactNode;
|
|
140
|
+
onLoad?: (mapView: Mappedin.MapView) => void;
|
|
127
141
|
}, 'el'>;
|
|
128
142
|
/**
|
|
129
143
|
* MapView component
|
|
@@ -148,7 +162,9 @@ declare module '@mappedin/react-sdk/react-sdk/src/Navigation' {
|
|
|
148
162
|
/**
|
|
149
163
|
* @interface
|
|
150
164
|
*/
|
|
151
|
-
export type NavigationProps = TupleToObjectWithPropNames<ParamsArray, StreamAgentParameterNames
|
|
165
|
+
export type NavigationProps = TupleToObjectWithPropNames<ParamsArray, StreamAgentParameterNames> & {
|
|
166
|
+
onLoad?: () => void;
|
|
167
|
+
};
|
|
152
168
|
/**
|
|
153
169
|
* Navigation component
|
|
154
170
|
*
|
|
@@ -166,7 +182,9 @@ declare module '@mappedin/react-sdk/react-sdk/src/Shape' {
|
|
|
166
182
|
/**
|
|
167
183
|
* @interface
|
|
168
184
|
*/
|
|
169
|
-
export type ShapesProps = TupleToObjectWithPropNames<ParamsArray, StreamAgentParameterNames
|
|
185
|
+
export type ShapesProps = TupleToObjectWithPropNames<ParamsArray, StreamAgentParameterNames> & {
|
|
186
|
+
onLoad?: (shape: Mappedin.Shape) => void;
|
|
187
|
+
};
|
|
170
188
|
/**
|
|
171
189
|
* Shape component
|
|
172
190
|
*
|
|
@@ -184,7 +202,9 @@ declare module '@mappedin/react-sdk/react-sdk/src/Model' {
|
|
|
184
202
|
/**
|
|
185
203
|
* @interface
|
|
186
204
|
*/
|
|
187
|
-
export type ModelProps = TupleToObjectWithPropNames<ParamsArray, StreamAgentParameterNames
|
|
205
|
+
export type ModelProps = TupleToObjectWithPropNames<ParamsArray, StreamAgentParameterNames> & {
|
|
206
|
+
onLoad?: (models: Mappedin.Model[]) => void;
|
|
207
|
+
};
|
|
188
208
|
/**
|
|
189
209
|
* Model component
|
|
190
210
|
*
|
|
@@ -224,11 +244,11 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
224
244
|
import type { Floor } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
225
245
|
import type { ParsedMVF as TMVF, StyleCollection as TMVFStyleCollection, Style as TMVFStyle, LineStringStyle as TMVFLineStringStyle, PolygonStyle as TMVFPolygonStyle, PointStyle as TMVFPointStyle } from '@mappedin/mvf';
|
|
226
246
|
import { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
|
|
227
|
-
import type { Shading, PaintStyle, LineStyle, WatermarkOptions
|
|
247
|
+
import type { Shading, PaintStyle, LineStyle, WatermarkOptions } from '@mappedin/react-sdk/geojson/src';
|
|
228
248
|
import { enableTestMode } from '@mappedin/react-sdk/geojson/src';
|
|
229
249
|
export type { PubSub } from '@packages/internal/common/pubsub';
|
|
230
|
-
import { MapLibreOverlay } from '@mappedin/react-sdk/geojson/src/maplibre-overlay';
|
|
231
250
|
import { analytics } from '@mappedin/react-sdk/mappedin-js/src/analytics';
|
|
251
|
+
import { MappedinMapLibreOverlay } from '@mappedin/react-sdk/mappedin-js/src/maplibre-overlay';
|
|
232
252
|
export { setLoggerLevel, E_SDK_LOG_LEVEL } from '@packages/internal/common/Mappedin.Logger';
|
|
233
253
|
/**
|
|
234
254
|
* Represents all the available antialiasing options.
|
|
@@ -440,6 +460,14 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
440
460
|
* @experimental
|
|
441
461
|
*/
|
|
442
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;
|
|
443
471
|
/**
|
|
444
472
|
* Set the global shading for all elements. True will use default values, false will disable shading.
|
|
445
473
|
* @default true
|
|
@@ -477,26 +505,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
477
505
|
* const data = await getMapData({ key: 'api_key', secret: 'api_secret', mapId: 'id' });
|
|
478
506
|
*/
|
|
479
507
|
export const getMapData: (userOptions: TGetMapDataOptions) => Promise<MapData>;
|
|
480
|
-
class MappedinMapLibreOverlay extends MapLibreOverlay<{
|
|
481
|
-
/**
|
|
482
|
-
* Event emitted when the MappedinMap is loaded
|
|
483
|
-
*/
|
|
484
|
-
loaded: {
|
|
485
|
-
/**
|
|
486
|
-
* MapView instance
|
|
487
|
-
*/
|
|
488
|
-
mapView: MapView;
|
|
489
|
-
/**
|
|
490
|
-
* MapData instance
|
|
491
|
-
*/
|
|
492
|
-
mapData: MapData;
|
|
493
|
-
};
|
|
494
|
-
}> {
|
|
495
|
-
#private;
|
|
496
|
-
static instance: MappedinMapLibreOverlay;
|
|
497
|
-
constructor(origin: Position | undefined, mapData: MapData, options?: TShow3DMapOptions);
|
|
498
|
-
onAdd(map: any): HTMLDivElement;
|
|
499
|
-
}
|
|
500
508
|
/**
|
|
501
509
|
* Create a MapLibre overlay with a Map to render it within existing MapLibre projects.
|
|
502
510
|
* @experimental
|
|
@@ -507,7 +515,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
507
515
|
export { parseMVF, unzipMVF, enableTestMode };
|
|
508
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, };
|
|
509
517
|
export type * from 'geojson';
|
|
510
|
-
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';
|
|
511
519
|
export type { Label, Marker, Path, Shape, CameraTransform, Model } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
512
520
|
export type { Navigation, TNavigationOptions } from '@mappedin/react-sdk/mappedin-js/src/navigation';
|
|
513
521
|
export type { TSpaceType } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
@@ -1127,6 +1135,10 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
|
|
|
1127
1135
|
* @internal
|
|
1128
1136
|
*/
|
|
1129
1137
|
get __core(): RendererCore;
|
|
1138
|
+
/**
|
|
1139
|
+
* Clears all added elements from the map.
|
|
1140
|
+
*/
|
|
1141
|
+
clear(): void;
|
|
1130
1142
|
/**
|
|
1131
1143
|
* Destroys the MapView.
|
|
1132
1144
|
*/
|
|
@@ -1144,8 +1156,8 @@ declare module '@mappedin/react-sdk/geojson/src' {
|
|
|
1144
1156
|
import type { MarkerState, AddMarkerOptions } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
1145
1157
|
import type { PathState, AddPathOptions } from '@mappedin/react-sdk/geojson/src/components/path';
|
|
1146
1158
|
import type { AddLabelOptions, LabelAppearance, LabelState } from '@mappedin/react-sdk/geojson/src/components/label';
|
|
1147
|
-
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
1148
|
-
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';
|
|
1149
1161
|
import type { Position } from '@mappedin/react-sdk/geojson/src/types/geometry';
|
|
1150
1162
|
import type { InsetPadding, RendererCoreOptions, ClickPayload, HoverPayload, CameraPayload, MapEvent, MapEventPayload } from '@mappedin/react-sdk/geojson/src/types';
|
|
1151
1163
|
import type { GeometryState } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
@@ -1177,31 +1189,49 @@ declare module '@mappedin/react-sdk/geojson/src' {
|
|
|
1177
1189
|
}): Promise<RendererCore>;
|
|
1178
1190
|
}
|
|
1179
1191
|
|
|
1180
|
-
declare module '@mappedin/react-sdk/geojson/src/maplibre-overlay' {
|
|
1181
|
-
import type { IControl, Map as MapLibreMap } from '@packages/internal/outdoor-context-v4';
|
|
1182
|
-
import type { Position } from '@mappedin/react-sdk/geojson/src/types';
|
|
1183
|
-
import RendererCore from '@mappedin/react-sdk/geojson/src/renderer';
|
|
1184
|
-
import { PubSub } from '@packages/internal/common';
|
|
1185
|
-
export class MapLibreOverlay<T> extends PubSub<T> implements IControl {
|
|
1186
|
-
el: HTMLDivElement;
|
|
1187
|
-
core: RendererCore;
|
|
1188
|
-
origin?: Position;
|
|
1189
|
-
constructor(origin: Position | undefined);
|
|
1190
|
-
onAdd(map: MapLibreMap): HTMLDivElement;
|
|
1191
|
-
onRemove(): void;
|
|
1192
|
-
}
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
1192
|
declare module '@mappedin/react-sdk/mappedin-js/src/analytics' {
|
|
1196
1193
|
export { analytics, analyticsInternal } from '@mappedin/react-sdk/mappedin-js/src/analytics/customer';
|
|
1197
1194
|
export type { CustomerAnalytics, AnalyticsOptions } from '@mappedin/react-sdk/mappedin-js/src/analytics/customer';
|
|
1198
1195
|
}
|
|
1199
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
|
+
|
|
1200
1226
|
declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
1201
|
-
import { Feature, MultiPolygon, Polygon } from 'geojson';
|
|
1227
|
+
import type { Feature, MultiPolygon, Polygon } from 'geojson';
|
|
1202
1228
|
import type { Coordinate, Floor, Door, Space, MapObject, PointOfInterest, Connection, Annotation } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
1203
1229
|
import type { Label, Marker, Model } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
1204
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
|
+
}>;
|
|
1205
1235
|
/**
|
|
1206
1236
|
* @hidden
|
|
1207
1237
|
*/
|
|
@@ -1345,11 +1375,19 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
1345
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)`.
|
|
1346
1376
|
*/
|
|
1347
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;
|
|
1348
1386
|
};
|
|
1349
1387
|
/**
|
|
1350
1388
|
* The type for updating the state of map elements (colors, texts, etc.).
|
|
1351
1389
|
*/
|
|
1352
|
-
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;
|
|
1353
1391
|
export type TUpdateStates = Partial<Omit<TGeometryState, 'interactive' | 'hoverColor' | 'type'>> | Partial<TMarkerState> | Partial<TLabelState> | Partial<TGeometryState>;
|
|
1354
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;
|
|
1355
1393
|
export type TGetState<T> = TGetEntityState<T> | undefined;
|
|
@@ -1880,6 +1918,28 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
1880
1918
|
*/
|
|
1881
1919
|
id?: string;
|
|
1882
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
|
+
};
|
|
1883
1943
|
}
|
|
1884
1944
|
|
|
1885
1945
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects' {
|
|
@@ -2998,25 +3058,17 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-do
|
|
|
2998
3058
|
import type { RendererCore } from '@mappedin/core-sdk';
|
|
2999
3059
|
import { PubSub } from '@packages/internal/common';
|
|
3000
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';
|
|
3001
3062
|
export type TBlueDotEvents = {
|
|
3002
3063
|
'floor-change': {
|
|
3003
3064
|
reason: 'blue-dot-floor-change';
|
|
3004
3065
|
floorId: string;
|
|
3005
3066
|
};
|
|
3006
3067
|
};
|
|
3007
|
-
export const POSITION_ANIMATION_DURATION = 500;
|
|
3008
|
-
export const SCALE_ANIMATION_DURATION = 150;
|
|
3009
|
-
export const ROTATION_ANIMATION_DURATION = 150;
|
|
3010
|
-
export const MIN_AURA_RADIUS = 0;
|
|
3011
|
-
export const MAX_AURA_RADIUS = 5;
|
|
3012
|
-
export const MIN_ACCURACY = 5;
|
|
3013
|
-
export const MAX_ACCURACY = 30;
|
|
3014
|
-
export const CONE_START_RADIUS = 0.4;
|
|
3015
|
-
export const CONE_DISTANCE = 1.25;
|
|
3016
|
-
export const BLUE_DOT_RADIUS = 0.35;
|
|
3017
3068
|
export class BlueDot extends PubSub<TBlueDotEvents> {
|
|
3069
|
+
#private;
|
|
3018
3070
|
constructor(core: RendererCore, geoJSONApi: GeoJsonApi);
|
|
3019
|
-
enable(): void;
|
|
3071
|
+
enable(options?: TBlueDotOptions): void;
|
|
3020
3072
|
disable(): void;
|
|
3021
3073
|
}
|
|
3022
3074
|
}
|
|
@@ -3078,7 +3130,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
3078
3130
|
import './marker.scss';
|
|
3079
3131
|
import { Vector2 } from 'three';
|
|
3080
3132
|
import type { Entity2DHTMLDivElement, EntityId, Position } from '@mappedin/react-sdk/geojson/src/types';
|
|
3081
|
-
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3133
|
+
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
3082
3134
|
import type { CollisionRankingTier } from '@mappedin/react-sdk/geojson/src/utils/collision-ranking-tier';
|
|
3083
3135
|
/**
|
|
3084
3136
|
* State reprsenting a Marker
|
|
@@ -3211,7 +3263,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
3211
3263
|
declare module '@mappedin/react-sdk/geojson/src/components/path' {
|
|
3212
3264
|
import { type Mesh, type ShaderMaterial, type BufferGeometry, Vector3 } from 'three';
|
|
3213
3265
|
import type { Position } from '@mappedin/react-sdk/geojson/src/types';
|
|
3214
|
-
import { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3266
|
+
import { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
3215
3267
|
import type { FeatureCollection, Point } from 'geojson';
|
|
3216
3268
|
/**
|
|
3217
3269
|
* State representing a Path
|
|
@@ -3312,7 +3364,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/label' {
|
|
|
3312
3364
|
import { Vector2 } from 'three';
|
|
3313
3365
|
import type { TDrawFn } from '@packages/internal/shave-text/shave-text';
|
|
3314
3366
|
import type { EntityId, Position } from '@mappedin/react-sdk/geojson/src/types';
|
|
3315
|
-
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3367
|
+
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
3316
3368
|
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
3317
3369
|
import type { CollisionRankingTier } from '@mappedin/react-sdk/geojson/src';
|
|
3318
3370
|
export const labelThemes: {
|
|
@@ -3650,18 +3702,18 @@ declare module '@mappedin/react-sdk/geojson/src/components/label' {
|
|
|
3650
3702
|
export default LabelComponent;
|
|
3651
3703
|
}
|
|
3652
3704
|
|
|
3653
|
-
declare module '@mappedin/react-sdk/geojson/src/entities/
|
|
3705
|
+
declare module '@mappedin/react-sdk/geojson/src/entities/group-container' {
|
|
3654
3706
|
import { Object3D } from 'three';
|
|
3655
|
-
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3656
|
-
import { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3657
|
-
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';
|
|
3658
3710
|
import type { StackComponent } from '@mappedin/react-sdk/geojson/src/components/stack';
|
|
3659
3711
|
import type { MarkerState } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
3660
3712
|
import type { LabelState } from '@mappedin/react-sdk/geojson/src/components/label';
|
|
3661
|
-
import { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3713
|
+
import { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
3662
3714
|
import type { PathState } from '@mappedin/react-sdk/geojson/src/components/path';
|
|
3663
|
-
import { InteractionComponent } from '@mappedin/react-sdk/geojson/src/components/interaction';
|
|
3664
|
-
export enum
|
|
3715
|
+
import type { InteractionComponent } from '@mappedin/react-sdk/geojson/src/components/interaction';
|
|
3716
|
+
export enum GroupContainerComponents {
|
|
3665
3717
|
Stack = 0,
|
|
3666
3718
|
Interaction = 1
|
|
3667
3719
|
}
|
|
@@ -3703,13 +3755,13 @@ declare module '@mappedin/react-sdk/geojson/src/entities/entity-group-container'
|
|
|
3703
3755
|
}
|
|
3704
3756
|
}
|
|
3705
3757
|
|
|
3706
|
-
declare module '@mappedin/react-sdk/geojson/src/entities/
|
|
3758
|
+
declare module '@mappedin/react-sdk/geojson/src/entities/geometry-group' {
|
|
3707
3759
|
import type { LineStyle, PaintStyle, Shading } from '@mappedin/react-sdk/geojson/src/types';
|
|
3708
3760
|
import { Object3D } from 'three';
|
|
3709
|
-
import type
|
|
3761
|
+
import { type GeometryState } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
3710
3762
|
import type { ModelState } from '@mappedin/react-sdk/geojson/src/components/model';
|
|
3711
3763
|
import { GeometryGroupStyleComponent } from '@mappedin/react-sdk/geojson/src/components/geometry-group-style';
|
|
3712
|
-
export enum
|
|
3764
|
+
export enum GeometryGroupComponents {
|
|
3713
3765
|
GeometryGroupStyle = 0
|
|
3714
3766
|
}
|
|
3715
3767
|
/**
|
|
@@ -3776,6 +3828,11 @@ declare module '@mappedin/react-sdk/geojson/src/entities/entity-group' {
|
|
|
3776
3828
|
setOpacity(opacity: number): void;
|
|
3777
3829
|
removeEntity(): void;
|
|
3778
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;
|
|
3779
3836
|
}
|
|
3780
3837
|
}
|
|
3781
3838
|
|
|
@@ -3785,20 +3842,22 @@ declare module '@mappedin/react-sdk/geojson/src/types/geometry' {
|
|
|
3785
3842
|
|
|
3786
3843
|
declare module '@mappedin/react-sdk/geojson/src/types' {
|
|
3787
3844
|
import { Mesh, Object3D, InstancedMesh } from 'three';
|
|
3788
|
-
import type { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3845
|
+
import type { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/geometry2d';
|
|
3789
3846
|
import type { Position } from '@mappedin/react-sdk/geojson/src/types/geometry';
|
|
3790
3847
|
import type { GeometryState } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
3791
|
-
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
3792
|
-
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';
|
|
3793
3850
|
import type { PathState } from '@mappedin/react-sdk/geojson/src/components/path';
|
|
3794
3851
|
import type { ModelState } from '@mappedin/react-sdk/geojson/src/components/model';
|
|
3795
3852
|
import type { LabelState } from '@mappedin/react-sdk/geojson/src/components/label';
|
|
3796
3853
|
import type { MarkerState } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
3854
|
+
import type { ImageState } from '@mappedin/react-sdk/geojson/src/components/image';
|
|
3797
3855
|
import type { ShapeState } from '@mappedin/react-sdk/geojson/src/components/custom';
|
|
3856
|
+
import type { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities';
|
|
3798
3857
|
/**
|
|
3799
3858
|
* The state of an entity, which can be a geometry, geometry group, group container, path, model, label, or marker.
|
|
3800
3859
|
*/
|
|
3801
|
-
export type EntityState = GeometryState | GeometryGroupState | GroupContainerState | PathState | ModelState | LabelState | MarkerState | ShapeState;
|
|
3860
|
+
export type EntityState = GeometryState | GeometryGroupState | GroupContainerState | PathState | ModelState | LabelState | MarkerState | ImageState | ShapeState;
|
|
3802
3861
|
/**
|
|
3803
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
|
|
3804
3863
|
* to `getState` and `setState` of the entity.
|
|
@@ -3847,6 +3906,8 @@ declare module '@mappedin/react-sdk/geojson/src/types' {
|
|
|
3847
3906
|
texture?: string;
|
|
3848
3907
|
shading?: Shading;
|
|
3849
3908
|
outline?: boolean;
|
|
3909
|
+
showImage?: boolean;
|
|
3910
|
+
flipImageToFaceCamera?: boolean;
|
|
3850
3911
|
};
|
|
3851
3912
|
export type Cap = 'round' | 'square' | 'butt';
|
|
3852
3913
|
export type Join = 'round' | 'bevel' | 'miter';
|
|
@@ -3880,6 +3941,12 @@ declare module '@mappedin/react-sdk/geojson/src/types' {
|
|
|
3880
3941
|
};
|
|
3881
3942
|
source: string;
|
|
3882
3943
|
};
|
|
3944
|
+
export type PolygonImage = {
|
|
3945
|
+
width: number;
|
|
3946
|
+
height: number;
|
|
3947
|
+
verticalOffset?: number;
|
|
3948
|
+
rotation?: number;
|
|
3949
|
+
};
|
|
3883
3950
|
export type PolygonSource = {
|
|
3884
3951
|
features: {
|
|
3885
3952
|
type: 'Feature';
|
|
@@ -4033,6 +4100,21 @@ declare module '@mappedin/react-sdk/geojson/src/types' {
|
|
|
4033
4100
|
export type MapEventPayload<EventName extends keyof MapEvent> = MapEvent[EventName] extends {
|
|
4034
4101
|
data: null;
|
|
4035
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
|
+
};
|
|
4036
4118
|
}
|
|
4037
4119
|
|
|
4038
4120
|
declare module '@mappedin/react-sdk/geojson/src/components/mesh' {
|
|
@@ -4092,21 +4174,41 @@ declare module '@mappedin/react-sdk/geojson/src/components/mesh' {
|
|
|
4092
4174
|
* Whether the geometry is outlined with a 30% darkened color. This effect adds lines around the geometry to make it stand out.
|
|
4093
4175
|
*/
|
|
4094
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;
|
|
4095
4185
|
/**
|
|
4096
4186
|
* Whether the geometry should emit an event when focused on by the center of the camera
|
|
4097
4187
|
*/
|
|
4098
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;
|
|
4099
4197
|
};
|
|
4100
4198
|
export class MeshComponent {
|
|
4101
4199
|
#private;
|
|
4102
4200
|
mesh?: EntityBatchedMesh;
|
|
4103
4201
|
focusMesh?: Mesh;
|
|
4104
4202
|
outline?: LineSegments;
|
|
4203
|
+
imageMesh?: Mesh;
|
|
4105
4204
|
readonly type = "geometry";
|
|
4205
|
+
dirty: boolean;
|
|
4206
|
+
detached: boolean;
|
|
4106
4207
|
instanceIndex: number;
|
|
4107
4208
|
geometry?: BufferGeometry;
|
|
4108
4209
|
material?: BatchedStandardMaterial;
|
|
4109
4210
|
feature: Feature<Polygon | LineString | MultiPolygon | MultiLineString>;
|
|
4211
|
+
currentHeight: number;
|
|
4110
4212
|
constructor(feature: Feature<Polygon | LineString | MultiPolygon | MultiLineString>);
|
|
4111
4213
|
get visible(): boolean;
|
|
4112
4214
|
set visible(visible: boolean);
|
|
@@ -4115,6 +4217,10 @@ declare module '@mappedin/react-sdk/geojson/src/components/mesh' {
|
|
|
4115
4217
|
color: Color;
|
|
4116
4218
|
topColor: Color;
|
|
4117
4219
|
setColor(color: string, topColor: string): void;
|
|
4220
|
+
getColor(): {
|
|
4221
|
+
color: Color;
|
|
4222
|
+
topColor: Color;
|
|
4223
|
+
} | undefined;
|
|
4118
4224
|
position: Vector3;
|
|
4119
4225
|
get altitude(): number;
|
|
4120
4226
|
set altitude(value: number);
|
|
@@ -4135,8 +4241,8 @@ declare module '@mappedin/react-sdk/geojson/src/components/custom' {
|
|
|
4135
4241
|
import { Color, type Object3D, type LineSegments } from 'three';
|
|
4136
4242
|
import type { EntityId, Position } from '@mappedin/react-sdk/geojson/src/types';
|
|
4137
4243
|
import type { Feature, Point } from 'geojson';
|
|
4138
|
-
import { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4139
|
-
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';
|
|
4140
4246
|
/**
|
|
4141
4247
|
* State representing a Custom Geometry
|
|
4142
4248
|
*/
|
|
@@ -4193,8 +4299,8 @@ declare module '@mappedin/react-sdk/geojson/src/components/model' {
|
|
|
4193
4299
|
import type { BatchedStandardMaterial } from '@mappedin/react-sdk/geojson/src/systems/mesh-creation-and-optimization/batched-material';
|
|
4194
4300
|
import type { Position, EntityId } from '@mappedin/react-sdk/geojson/src/types';
|
|
4195
4301
|
import type { Feature, Point } from 'geojson';
|
|
4196
|
-
import type { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4197
|
-
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';
|
|
4198
4304
|
/**
|
|
4199
4305
|
* State representing a Model, typically loaded via a URL
|
|
4200
4306
|
*/
|
|
@@ -4243,13 +4349,9 @@ declare module '@mappedin/react-sdk/geojson/src/components/model' {
|
|
|
4243
4349
|
|
|
4244
4350
|
declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
4245
4351
|
import './utils/object-this-polyfill';
|
|
4246
|
-
import type { Position as GeoJsonPosition } from 'geojson';
|
|
4247
4352
|
import { Vector3, Raycaster, Camera as ThreeCamera } from 'three';
|
|
4248
|
-
import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4249
|
-
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';
|
|
4250
4354
|
import { PubSub } from '@mappedin/react-sdk/packages/common/pubsub';
|
|
4251
|
-
import { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/three-d';
|
|
4252
|
-
import { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/two-d';
|
|
4253
4355
|
import { CollisionSystem } from '@mappedin/react-sdk/geojson/src/systems/collisions/system';
|
|
4254
4356
|
import { InteractionSystem } from '@mappedin/react-sdk/geojson/src/systems/interactions';
|
|
4255
4357
|
import { ZoomInterpolationSystem } from '@mappedin/react-sdk/geojson/src/systems/zoom-interpolation/zoom-interpolation';
|
|
@@ -4257,7 +4359,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4257
4359
|
import type { GLTFExportOptions } from '@mappedin/react-sdk/geojson/src/systems/exporter';
|
|
4258
4360
|
import { ExporterSystem } from '@mappedin/react-sdk/geojson/src/systems/exporter';
|
|
4259
4361
|
import type { AddLabelOptions, LabelState } from '@mappedin/react-sdk/geojson/src/components/label';
|
|
4260
|
-
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';
|
|
4261
4363
|
import { MeshCreationAndOptimizationSystem } from '@mappedin/react-sdk/geojson/src/systems/mesh-creation-and-optimization/system';
|
|
4262
4364
|
import { DOMVisibilitySystem } from '@mappedin/react-sdk/geojson/src/systems/dom-visiblity/system';
|
|
4263
4365
|
import { TwoDProjectionSystem } from '@mappedin/react-sdk/geojson/src/systems/2d-projection/system';
|
|
@@ -4265,7 +4367,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4265
4367
|
import { DrawSystem } from '@mappedin/react-sdk/geojson/src/systems/draw/system';
|
|
4266
4368
|
import { TwoDVisibilitySystem } from '@mappedin/react-sdk/geojson/src/systems/2d-visibility/system';
|
|
4267
4369
|
import { RenderSystem } from '@mappedin/react-sdk/geojson/src/systems/render/system';
|
|
4268
|
-
import type { FeatureCollection, LineString, MultiPolygon, Polygon, Point, Feature } from 'geojson';
|
|
4370
|
+
import type { Position as GeoJsonPosition, FeatureCollection, LineString, MultiPolygon, Polygon, Point, Feature } from 'geojson';
|
|
4269
4371
|
import type { AddPathOptions, PathState } from '@mappedin/react-sdk/geojson/src/components/path';
|
|
4270
4372
|
import { StackSystem } from '@mappedin/react-sdk/geojson/src/systems/stack/system';
|
|
4271
4373
|
import { CameraSystem } from '@mappedin/react-sdk/geojson/src/systems/camera';
|
|
@@ -4273,8 +4375,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4273
4375
|
import { type Map as MapLibreMap } from '@mappedin/react-sdk/packages/outdoor-context-v4';
|
|
4274
4376
|
import type { GeometryState } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
4275
4377
|
import type { ModelState } from '@mappedin/react-sdk/geojson/src/components/model';
|
|
4276
|
-
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4277
|
-
import { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/entity-group';
|
|
4378
|
+
import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
4278
4379
|
import { DOMResizeSystem } from '@mappedin/react-sdk/geojson/src/systems/dom-resize/system';
|
|
4279
4380
|
import { Camera } from '@mappedin/react-sdk/geojson/src/camera';
|
|
4280
4381
|
import { type WatermarkOptions, WatermarkSystem } from '@mappedin/react-sdk/geojson/src/systems/watermark/system';
|
|
@@ -4283,9 +4384,13 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4283
4384
|
import { type CustomGeometryBuilder, type ShapeState } from '@mappedin/react-sdk/geojson/src/components/custom';
|
|
4284
4385
|
import { CustomGeometrySystem } from '@mappedin/react-sdk/geojson/src/systems/custom-geometry/system';
|
|
4285
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';
|
|
4286
4388
|
import { GeometryInFocusSystem } from '@mappedin/react-sdk/geojson/src/systems/geometry-in-focus/system';
|
|
4287
4389
|
import { OutdoorLayers } from '@mappedin/react-sdk/geojson/src/systems/outdoor-layers/system';
|
|
4288
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';
|
|
4289
4394
|
export type * from '@mappedin/react-sdk/geojson/src/types';
|
|
4290
4395
|
export const raycaster: Raycaster;
|
|
4291
4396
|
export const DEFAULT_ZOOM_LEVEL = 18;
|
|
@@ -4304,21 +4409,6 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4304
4409
|
AFTER_RENDER: number;
|
|
4305
4410
|
AFTER_ALL_UPDATES: number;
|
|
4306
4411
|
};
|
|
4307
|
-
export type Entity3DTypes = Geometry3D | GeometryGroupObject3D | GroupContainerObject3D;
|
|
4308
|
-
export type RendererState = {
|
|
4309
|
-
entity3DMap: Map<string | number, Entity3DTypes>;
|
|
4310
|
-
entity2DMap: Map<string | number, Geometry2D>;
|
|
4311
|
-
entity2DIds: Set<Geometry2D['id']>;
|
|
4312
|
-
threeDEntities: (string | number)[];
|
|
4313
|
-
entityScene: GroupContainerObject3D;
|
|
4314
|
-
hoverColor: string;
|
|
4315
|
-
center?: Position;
|
|
4316
|
-
insetsPadding: InsetPadding;
|
|
4317
|
-
shouldMeasureCanvas: boolean;
|
|
4318
|
-
pixelRatio: number;
|
|
4319
|
-
canvasWidth: number;
|
|
4320
|
-
canvasHeight: number;
|
|
4321
|
-
};
|
|
4322
4412
|
export type Systems = {
|
|
4323
4413
|
cameraSystem: CameraSystem;
|
|
4324
4414
|
panBoundsSystem: PanBoundsSystem;
|
|
@@ -4342,7 +4432,10 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4342
4432
|
outlineInterpolationSystem: OutlineInterpolationSystem;
|
|
4343
4433
|
outdoorLayersSystem: OutdoorLayers;
|
|
4344
4434
|
pathSystem: PathSystem;
|
|
4435
|
+
imageSystem: ImageSystem;
|
|
4345
4436
|
geometryInFocusSystem: GeometryInFocusSystem;
|
|
4437
|
+
meshOpacitySystem: MeshOpacitySystem;
|
|
4438
|
+
meshModificationSystem: MeshModificationSystem;
|
|
4346
4439
|
};
|
|
4347
4440
|
export type MapViewState = {
|
|
4348
4441
|
readonly type: 'map-view';
|
|
@@ -4400,6 +4493,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4400
4493
|
* Add a geometry group from GeoJSON data
|
|
4401
4494
|
*/
|
|
4402
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;
|
|
4403
4497
|
/**
|
|
4404
4498
|
* Add a group of models from GeoJSON data. These will be instanced automatically for better performance.
|
|
4405
4499
|
*/
|
|
@@ -4458,9 +4552,9 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4458
4552
|
* Get the current state of the map view, or any entity that was added, regardless of whether it is visible in the scene
|
|
4459
4553
|
*/
|
|
4460
4554
|
getState(): MapViewState;
|
|
4461
|
-
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;
|
|
4462
4556
|
getState(geometryOrGeometryId?: Record<string | number, any> | string | number): EntityState;
|
|
4463
|
-
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;
|
|
4464
4558
|
/**
|
|
4465
4559
|
* Set the state of the map view or any entity that was added, regardless of whether it is visible in the scene.
|
|
4466
4560
|
*/
|
|
@@ -4473,6 +4567,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4473
4567
|
setState<T extends EntityId<ShapeState>>(object: T | T['id'], state: Partial<ShapeState>): void;
|
|
4474
4568
|
setState<T extends EntityId<PathState>>(object: T | T['id'], state: Partial<PathState>): void;
|
|
4475
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;
|
|
4476
4571
|
setState<T extends EntityState>(object: T | T['id'], state: Partial<T>): void;
|
|
4477
4572
|
/**
|
|
4478
4573
|
* Project a screen coordinate to a geographic coordinate
|
|
@@ -4511,6 +4606,10 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
4511
4606
|
* Sets the background color of the renderer. Only applies to "standalone mode"
|
|
4512
4607
|
*/
|
|
4513
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;
|
|
4514
4613
|
/**
|
|
4515
4614
|
* @internal
|
|
4516
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.
|
|
@@ -4780,40 +4879,40 @@ declare module '@mappedin/react-sdk/geojson/src/utils' {
|
|
|
4780
4879
|
import { Box2 } from 'three';
|
|
4781
4880
|
import { MercatorCoordinate } from '@mappedin/react-sdk/packages/outdoor-context-v4';
|
|
4782
4881
|
import type { CustomLayerInterface } from '@mappedin/react-sdk/packages/outdoor-context-v4';
|
|
4783
|
-
import type { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4784
|
-
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4785
|
-
import type { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
4786
|
-
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';
|
|
4787
4886
|
import type { Position, RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
4788
4887
|
import type { Camera } from '@mappedin/react-sdk/geojson/src/camera';
|
|
4789
4888
|
export function cartesianToGeographic(centerLat: number, centerLon: number, x: number, y: number): {
|
|
4790
|
-
|
|
4791
|
-
|
|
4889
|
+
lat: number;
|
|
4890
|
+
lon: number;
|
|
4792
4891
|
};
|
|
4793
4892
|
export function geographicToCartesian(centerLat: number, centerLon: number, targetLat: number, targetLon: number): {
|
|
4794
|
-
|
|
4795
|
-
|
|
4893
|
+
x: number;
|
|
4894
|
+
y: number;
|
|
4796
4895
|
};
|
|
4797
|
-
export const
|
|
4798
|
-
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>;
|
|
4799
4898
|
export function convertMapLibreStylePaintProps(paint: any): {
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4899
|
+
color: any;
|
|
4900
|
+
height: any;
|
|
4901
|
+
altitude: any;
|
|
4902
|
+
opacity: any;
|
|
4903
|
+
outline: any;
|
|
4805
4904
|
};
|
|
4806
4905
|
export function convertMapLibreLineStylePaintProps(paint: any): {
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4906
|
+
color: any;
|
|
4907
|
+
join: any;
|
|
4908
|
+
opacity: any;
|
|
4909
|
+
width: any;
|
|
4910
|
+
cap: any;
|
|
4812
4911
|
};
|
|
4813
4912
|
export function mergeObjects<T extends Record<string, any>>(obj1: T, obj2: T): T;
|
|
4814
4913
|
export function createCustomLayer(modelAsMercatorCoordinate: MercatorCoordinate, viewCamera: THREECamera, camera: Camera, onRender: () => void): CustomLayerInterface;
|
|
4815
4914
|
export function getRequestHeaders(authURL: string): Promise<{
|
|
4816
|
-
|
|
4915
|
+
'x-mappedin-tiles-key': string;
|
|
4817
4916
|
}>;
|
|
4818
4917
|
export function cyrb53(str: string, seed?: number): number;
|
|
4819
4918
|
export const linearEase: (t: number) => number;
|
|
@@ -4825,38 +4924,53 @@ declare module '@mappedin/react-sdk/geojson/src/utils' {
|
|
|
4825
4924
|
/* getProjectionScaleFactor()
|
|
4826
4925
|
/* finds the scale ratio between screen coordinates and 3D coordinates (in X-Z plane)
|
|
4827
4926
|
/*
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
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
|
+
*/
|
|
4851
4950
|
export function getProjectionScaleFactor(FOV: number, canvasHeight: number, zoom: number): number;
|
|
4852
4951
|
export function getGeometryByGeometryId(state: RendererState, geometryOrGeometryId?: string | number | Record<string, any>): Geometry3D | GroupContainerObject3D | GeometryGroupObject3D | Geometry2D | undefined;
|
|
4853
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;
|
|
4854
4967
|
export { getCornersOfBoundingBox } from '@mappedin/react-sdk/geojson/src/utils/bounding-box';
|
|
4855
4968
|
export function isFiniteBox(box: Box2 | Box3): boolean;
|
|
4856
4969
|
export { getPixelRatio } from '@mappedin/react-sdk/geojson/src/utils/get-pixel-ratio';
|
|
4857
4970
|
export { debounce } from '@mappedin/react-sdk/geojson/src/utils/async';
|
|
4858
4971
|
export { shouldDisableOffscreenCanvas } from '@mappedin/react-sdk/geojson/src/utils/browser';
|
|
4859
4972
|
export { noop } from '@mappedin/react-sdk/geojson/src/utils/fp';
|
|
4973
|
+
export { transformRequest } from '@mappedin/react-sdk/geojson/src/utils/tranform-request';
|
|
4860
4974
|
}
|
|
4861
4975
|
|
|
4862
4976
|
declare module '@mappedin/react-sdk/geojson/src/utils/constants' {
|
|
@@ -5152,6 +5266,23 @@ declare module '@mappedin/react-sdk/mappedin-js/src/analytics/customer' {
|
|
|
5152
5266
|
export {};
|
|
5153
5267
|
}
|
|
5154
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
|
+
|
|
5155
5286
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects/label' {
|
|
5156
5287
|
/**
|
|
5157
5288
|
* Class representing a label on the {@link MapView}.
|
|
@@ -5316,8 +5447,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
|
|
|
5316
5447
|
import type { Position, RendererCore, WatermarkOptions } from '@mappedin/core-sdk';
|
|
5317
5448
|
import { type TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
5318
5449
|
import type MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
|
|
5319
|
-
import { Floor } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
5320
|
-
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';
|
|
5321
5451
|
import type { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
|
|
5322
5452
|
import { Label, Marker, type Model } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
5323
5453
|
import { Navigation } from '@mappedin/react-sdk/mappedin-js/src/navigation';
|
|
@@ -5382,6 +5512,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
|
|
|
5382
5512
|
* @internal
|
|
5383
5513
|
*/
|
|
5384
5514
|
get __core(): RendererCore;
|
|
5515
|
+
clear(): void;
|
|
5385
5516
|
destroy(): void;
|
|
5386
5517
|
}
|
|
5387
5518
|
}
|
|
@@ -5971,7 +6102,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object' {
|
|
|
5971
6102
|
elevation: number;
|
|
5972
6103
|
containerId: string;
|
|
5973
6104
|
layers: Map<string, string>;
|
|
5974
|
-
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);
|
|
5975
6106
|
load: () => this;
|
|
5976
6107
|
}
|
|
5977
6108
|
}
|
|
@@ -6004,17 +6135,18 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metada
|
|
|
6004
6135
|
}
|
|
6005
6136
|
}
|
|
6006
6137
|
|
|
6007
|
-
declare module '@mappedin/react-sdk/geojson/src/entities/
|
|
6138
|
+
declare module '@mappedin/react-sdk/geojson/src/entities/geometry3d' {
|
|
6008
6139
|
import { Object3D } from 'three';
|
|
6009
6140
|
import type { InteractionComponent } from '@mappedin/react-sdk/geojson/src/components/interaction';
|
|
6010
6141
|
import type { MeshComponent } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
6011
6142
|
import type { ModelComponent } from '@mappedin/react-sdk/geojson/src/components/model';
|
|
6012
6143
|
import type { PathComponent } from '@mappedin/react-sdk/geojson/src/components/path';
|
|
6013
6144
|
import type { StyleComponent } from '@mappedin/react-sdk/geojson/src/components/style';
|
|
6145
|
+
import type { ImageComponent } from '@mappedin/react-sdk/geojson/src/components/image';
|
|
6014
6146
|
import type { CustomGeometryComponent } from '@mappedin/react-sdk/geojson/src/components/custom';
|
|
6015
|
-
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
6016
|
-
import { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
6017
|
-
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 {
|
|
6018
6150
|
Mesh = 0,
|
|
6019
6151
|
Style = 1,
|
|
6020
6152
|
Interaction = 2
|
|
@@ -6022,27 +6154,27 @@ declare module '@mappedin/react-sdk/geojson/src/entities/three-d' {
|
|
|
6022
6154
|
export class Geometry3DObject3D extends Object3D {
|
|
6023
6155
|
userData: {
|
|
6024
6156
|
entityId: string;
|
|
6025
|
-
type: 'geometry' | 'path' | 'model' | 'custom-geometry';
|
|
6157
|
+
type: 'geometry' | 'path' | 'model' | 'custom-geometry' | 'image';
|
|
6026
6158
|
};
|
|
6027
6159
|
}
|
|
6028
|
-
export type MeshComponentTypes = MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent;
|
|
6160
|
+
export type MeshComponentTypes = MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent | ImageComponent;
|
|
6029
6161
|
export class Geometry3D {
|
|
6030
6162
|
id: string | number;
|
|
6031
6163
|
components: [MeshComponentTypes, StyleComponent, InteractionComponent?];
|
|
6032
6164
|
get object3d(): import("../components/mesh").EntityBatchedMesh | Geometry3DObject3D | undefined;
|
|
6033
6165
|
get parent(): GroupContainerObject3D | GeometryGroupObject3D | null;
|
|
6034
|
-
get type(): 'geometry' | 'path' | 'model' | 'custom-geometry';
|
|
6035
|
-
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);
|
|
6036
6168
|
}
|
|
6037
6169
|
}
|
|
6038
6170
|
|
|
6039
|
-
declare module '@mappedin/react-sdk/geojson/src/entities/
|
|
6171
|
+
declare module '@mappedin/react-sdk/geojson/src/entities/geometry2d' {
|
|
6040
6172
|
import { Object3D, Vector3 } from 'three';
|
|
6041
6173
|
import type { MarkerComponent } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
6042
6174
|
import type LabelComponent from '@mappedin/react-sdk/geojson/src/components/label';
|
|
6043
|
-
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
6175
|
+
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
6044
6176
|
import type { InteractionComponent } from '@mappedin/react-sdk/geojson/src/components/interaction';
|
|
6045
|
-
export enum
|
|
6177
|
+
export enum Geometry2DComponents {
|
|
6046
6178
|
UI = 0,
|
|
6047
6179
|
Interaction = 1
|
|
6048
6180
|
}
|
|
@@ -6095,6 +6227,11 @@ declare module '@mappedin/react-sdk/geojson/src/components/geometry-group-style'
|
|
|
6095
6227
|
topColor?: string;
|
|
6096
6228
|
opacity: number;
|
|
6097
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;
|
|
6098
6235
|
get shading(): Required<Shading> | undefined;
|
|
6099
6236
|
set shading(value: Shading | undefined);
|
|
6100
6237
|
constructor(style?: Partial<GeometryGroupStyle>);
|
|
@@ -6102,6 +6239,79 @@ declare module '@mappedin/react-sdk/geojson/src/components/geometry-group-style'
|
|
|
6102
6239
|
export {};
|
|
6103
6240
|
}
|
|
6104
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
|
+
|
|
6105
6315
|
declare module '@mappedin/react-sdk/geojson/src/types/options' {
|
|
6106
6316
|
import type { Position } from '@mappedin/react-sdk/geojson/src/types/geometry';
|
|
6107
6317
|
import type { Map as MapLibreMap } from '@mappedin/react-sdk/packages/outdoor-context-v4';
|
|
@@ -6149,6 +6359,10 @@ declare module '@mappedin/react-sdk/geojson/src/systems/mesh-creation-and-optimi
|
|
|
6149
6359
|
set topTexture(texture: Texture);
|
|
6150
6360
|
setGradientShading(start: number, end: number, intensity: number): void;
|
|
6151
6361
|
setColor(batchId: number, color: Color, topColor: Color): void;
|
|
6362
|
+
getColor(batchId: number): {
|
|
6363
|
+
color: Color;
|
|
6364
|
+
topColor: Color;
|
|
6365
|
+
};
|
|
6152
6366
|
showTextures: (batchId: number) => void;
|
|
6153
6367
|
hideTextures(batchId: number): void;
|
|
6154
6368
|
dispose(): void;
|
|
@@ -6225,6 +6439,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/collisions/system' {
|
|
|
6225
6439
|
import { PubSub } from '@mappedin/react-sdk/packages/common/pubsub';
|
|
6226
6440
|
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
6227
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';
|
|
6228
6443
|
export type TMessageEvent = MessageEvent<{
|
|
6229
6444
|
msgId: string;
|
|
6230
6445
|
colliders: TSerializedColliderResponse[];
|
|
@@ -6241,6 +6456,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/collisions/system' {
|
|
|
6241
6456
|
totalHeight: number;
|
|
6242
6457
|
watermarkWidth: number;
|
|
6243
6458
|
watermarkHeight: number;
|
|
6459
|
+
watermarkPosition: WatermarkPosition;
|
|
6244
6460
|
colliders: TSerializedCollider[];
|
|
6245
6461
|
devicePixelRatio: number;
|
|
6246
6462
|
};
|
|
@@ -6256,7 +6472,8 @@ declare module '@mappedin/react-sdk/geojson/src/systems/collisions/system' {
|
|
|
6256
6472
|
totalHeight: number,
|
|
6257
6473
|
totalWidth: number,
|
|
6258
6474
|
watermarkWidth: number,
|
|
6259
|
-
watermarkHeight: number
|
|
6475
|
+
watermarkHeight: number,
|
|
6476
|
+
watermarkPosition: WatermarkPosition
|
|
6260
6477
|
];
|
|
6261
6478
|
export class CollisionSystem extends PubSub<TCollisionSystemEvent, keyof TCollisionSystemEvent> {
|
|
6262
6479
|
dirty: boolean;
|
|
@@ -6275,8 +6492,8 @@ declare module '@mappedin/react-sdk/geojson/src/systems/collisions/system' {
|
|
|
6275
6492
|
currentMsgId: string;
|
|
6276
6493
|
working: boolean;
|
|
6277
6494
|
componentArray: (MarkerComponent | LabelComponent)[];
|
|
6278
|
-
update: (watermarkWidth: number, watermarkHeight: number) => void;
|
|
6279
|
-
resize(watermarkWidth: number, watermarkHeight: number): void;
|
|
6495
|
+
update: (watermarkWidth: number, watermarkHeight: number, watermarkPosition?: WatermarkPosition) => void;
|
|
6496
|
+
resize(watermarkWidth: number, watermarkHeight: number, watermarkPosition: WatermarkPosition): void;
|
|
6280
6497
|
/**
|
|
6281
6498
|
* Resolve collisions
|
|
6282
6499
|
*/
|
|
@@ -6317,7 +6534,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/zoom-interpolation/zoom-
|
|
|
6317
6534
|
declare module '@mappedin/react-sdk/geojson/src/systems/mesh-creation-and-optimization/system' {
|
|
6318
6535
|
import type { BufferGeometry } from 'three';
|
|
6319
6536
|
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
6320
|
-
import { Geometry3D, Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
6537
|
+
import { Geometry3D, Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
6321
6538
|
import type { Feature, LineString, MultiPolygon, Point, Polygon } from 'geojson';
|
|
6322
6539
|
import type { LineStyle, ModelProperties, ModelStyle, PaintStyle } from '@mappedin/react-sdk/geojson/src/types';
|
|
6323
6540
|
import type { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
|
|
@@ -6698,11 +6915,13 @@ declare module '@mappedin/react-sdk/geojson/src/systems/custom-geometry/system'
|
|
|
6698
6915
|
declare module '@mappedin/react-sdk/geojson/src/systems/outline-interpolation/system' {
|
|
6699
6916
|
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
6700
6917
|
export class OutlineInterpolationSystem {
|
|
6918
|
+
#private;
|
|
6701
6919
|
/**
|
|
6702
6920
|
* Set to true when we need to update the outline color of all entities, regardless of zoom level.
|
|
6703
6921
|
*/
|
|
6704
6922
|
dirty: boolean;
|
|
6705
|
-
geometries3DDirty: boolean;
|
|
6923
|
+
get geometries3DDirty(): boolean;
|
|
6924
|
+
set geometries3DDirty(value: boolean);
|
|
6706
6925
|
constructor(rendererState: RendererState);
|
|
6707
6926
|
/**
|
|
6708
6927
|
* Update the outline color of all entities with an outline component.
|
|
@@ -6713,6 +6932,19 @@ declare module '@mappedin/react-sdk/geojson/src/systems/outline-interpolation/sy
|
|
|
6713
6932
|
}
|
|
6714
6933
|
}
|
|
6715
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
|
+
|
|
6716
6948
|
declare module '@mappedin/react-sdk/geojson/src/systems/geometry-in-focus/system' {
|
|
6717
6949
|
import { PubSub } from '@packages/internal/common';
|
|
6718
6950
|
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
@@ -6746,6 +6978,45 @@ declare module '@mappedin/react-sdk/geojson/src/systems/path' {
|
|
|
6746
6978
|
export { PathSystem } from '@mappedin/react-sdk/geojson/src/systems/path/system';
|
|
6747
6979
|
}
|
|
6748
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
|
+
|
|
6749
7020
|
declare module '@mappedin/react-sdk/packages/geojson-navigator/src' {
|
|
6750
7021
|
export { Navigator } from '@mappedin/react-sdk/packages/geojson-navigator/src/navigator';
|
|
6751
7022
|
export type { SimplifyDirectionsOptions } from '@mappedin/react-sdk/packages/geojson-navigator/src/navigator/navigator';
|
|
@@ -6812,10 +7083,13 @@ declare module '@mappedin/react-sdk/geojson/src/utils/fp' {
|
|
|
6812
7083
|
export function noop(): void;
|
|
6813
7084
|
}
|
|
6814
7085
|
|
|
6815
|
-
declare module '@mappedin/react-sdk/geojson/src/
|
|
6816
|
-
export
|
|
6817
|
-
|
|
6818
|
-
|
|
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
|
+
};
|
|
6819
7093
|
}
|
|
6820
7094
|
|
|
6821
7095
|
declare module '@mappedin/react-sdk/geojson/src/systems/exporter/exporter' {
|
|
@@ -6851,6 +7125,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/exporter/exporter' {
|
|
|
6851
7125
|
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils' {
|
|
6852
7126
|
import { Coordinate } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
6853
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';
|
|
6854
7129
|
import type { MultiLineString } from 'geojson';
|
|
6855
7130
|
import type { LabelState, MarkerState, GeometryState, CollisionRankingTier, LineStyle, PaintStyle } from '@mappedin/core-sdk';
|
|
6856
7131
|
import type { TGeometryState, TLabelState, TDirectionInstructionAction, TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
@@ -6874,12 +7149,13 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils' {
|
|
|
6874
7149
|
export type WithId<T> = T & {
|
|
6875
7150
|
id?: string;
|
|
6876
7151
|
};
|
|
6877
|
-
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>>[]>;
|
|
6878
7153
|
export function translateToCoreStyle(style: PolygonStyle | LineStringStyle, userOptions?: TShow3DMapOptions): PaintStyle | LineStyle;
|
|
6879
7154
|
}
|
|
6880
7155
|
|
|
6881
7156
|
declare module '@mappedin/react-sdk/geojson/src/components/style' {
|
|
6882
7157
|
import type { Cap, Join } from '@mappedin/react-sdk/geojson/src/types';
|
|
7158
|
+
export const DEFAULT_HEIGHT = 0.1;
|
|
6883
7159
|
type Style = {
|
|
6884
7160
|
color: string;
|
|
6885
7161
|
width: number;
|
|
@@ -6893,6 +7169,9 @@ declare module '@mappedin/react-sdk/geojson/src/components/style' {
|
|
|
6893
7169
|
texture?: string;
|
|
6894
7170
|
topTexture?: string;
|
|
6895
7171
|
outline: boolean;
|
|
7172
|
+
showImage: boolean;
|
|
7173
|
+
flipImageToFaceCamera: boolean;
|
|
7174
|
+
url?: string;
|
|
6896
7175
|
};
|
|
6897
7176
|
export class StyleComponent implements Style {
|
|
6898
7177
|
initialColor: string;
|
|
@@ -6910,11 +7189,44 @@ declare module '@mappedin/react-sdk/geojson/src/components/style' {
|
|
|
6910
7189
|
join: Join;
|
|
6911
7190
|
cap: Cap;
|
|
6912
7191
|
outline: boolean;
|
|
7192
|
+
showImage: boolean;
|
|
7193
|
+
flipImageToFaceCamera: boolean;
|
|
7194
|
+
url?: string;
|
|
6913
7195
|
constructor(style?: Partial<Style>);
|
|
6914
7196
|
}
|
|
6915
7197
|
export {};
|
|
6916
7198
|
}
|
|
6917
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
|
+
|
|
6918
7230
|
declare module '@mappedin/react-sdk/geojson/src/systems/collisions/collider-processor' {
|
|
6919
7231
|
import { Rectangle } from '@packages/internal/quad-tree';
|
|
6920
7232
|
export type TSerializedCollider = {
|
|
@@ -6930,7 +7242,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/collisions/collider-proc
|
|
|
6930
7242
|
shouldCollideWithScreenEdges?: boolean;
|
|
6931
7243
|
};
|
|
6932
7244
|
export type TSerializedColliderResponse = [number, boolean, Rectangle?];
|
|
6933
|
-
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): {
|
|
6934
7246
|
msgId: string;
|
|
6935
7247
|
colliders: TSerializedColliderResponse[];
|
|
6936
7248
|
debug: {
|
|
@@ -6945,16 +7257,16 @@ declare module '@mappedin/react-sdk/geojson/src/systems/collisions/collider-proc
|
|
|
6945
7257
|
declare module '@mappedin/react-sdk/geojson/src/systems/interactions/system' {
|
|
6946
7258
|
import type { PerspectiveCamera, Vector3, Object3D, Mesh } from 'three';
|
|
6947
7259
|
import { Raycaster } from 'three';
|
|
6948
|
-
import type { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
7260
|
+
import type { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/geometry2d';
|
|
6949
7261
|
import { QuadTree } from '@packages/internal/quad-tree';
|
|
6950
|
-
import type { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
7262
|
+
import type { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
6951
7263
|
import { PubSub } from '@mappedin/react-sdk/packages/common/pubsub';
|
|
6952
7264
|
import type { EntityMesh } from '@mappedin/react-sdk/geojson/src/types';
|
|
6953
7265
|
import { TapsController } from '@mappedin/react-sdk/geojson/src/systems/interactions/tap-controller';
|
|
6954
7266
|
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
6955
7267
|
import 'style.scss';
|
|
6956
7268
|
import type { EntityBatchedMesh } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
6957
|
-
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/
|
|
7269
|
+
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
6958
7270
|
type InteractionPayload = {
|
|
6959
7271
|
entity2D?: Geometry2D;
|
|
6960
7272
|
entity3D?: Geometry3D;
|
|
@@ -6980,8 +7292,8 @@ declare module '@mappedin/react-sdk/geojson/src/systems/interactions/system' {
|
|
|
6980
7292
|
} | undefined;
|
|
6981
7293
|
};
|
|
6982
7294
|
export type InteractionRequiredCoreStateProps = {
|
|
6983
|
-
|
|
6984
|
-
|
|
7295
|
+
geometry2DIdsInScene: Set<Geometry2D['id']>;
|
|
7296
|
+
geometry3DIdsInScene: Set<Geometry3D['id']>;
|
|
6985
7297
|
};
|
|
6986
7298
|
/**
|
|
6987
7299
|
* TODO: touch support
|
|
@@ -7023,6 +7335,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/interactions/system' {
|
|
|
7023
7335
|
* Get the current cursor type determined by the interaction.
|
|
7024
7336
|
*/
|
|
7025
7337
|
getCursor(): CursorTypes;
|
|
7338
|
+
resize: () => void;
|
|
7026
7339
|
}
|
|
7027
7340
|
export {};
|
|
7028
7341
|
}
|
|
@@ -15716,32 +16029,6 @@ declare module '@mappedin/react-sdk/packages/geojson-navigator/src/types/coordin
|
|
|
15716
16029
|
export type CoordinateFeature = Feature<Point, CoordinateProperties>;
|
|
15717
16030
|
}
|
|
15718
16031
|
|
|
15719
|
-
declare module '@mappedin/react-sdk/geojson/src/entities/utils' {
|
|
15720
|
-
import type { CollisionRankingTier, GeometryState, LabelState, PathState, RendererCore } from '@mappedin/react-sdk/geojson/src';
|
|
15721
|
-
import type { MarkerState } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
15722
|
-
import type { Entity3DTypes, Position, RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
15723
|
-
import { GeometryGroupObject3D, type GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/entity-group';
|
|
15724
|
-
import { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/entity-group-container';
|
|
15725
|
-
import { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/three-d';
|
|
15726
|
-
import { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/two-d';
|
|
15727
|
-
export function updateInteractivity(entity: Entity3DTypes | Geometry2D, update: boolean | undefined, state: RendererState): boolean;
|
|
15728
|
-
export function updateGroupColor(entity: GeometryGroupObject3D, state: RendererState, update?: Partial<GeometryGroupState>): boolean;
|
|
15729
|
-
export function updateGroupShading(entity: GeometryGroupObject3D, update?: GeometryGroupState['shading']): boolean;
|
|
15730
|
-
export function updateColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Partial<GeometryState>): void;
|
|
15731
|
-
export function updatePosition(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Position | undefined, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']): void;
|
|
15732
|
-
export function updateParent(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: GroupContainerObject3D | undefined): boolean;
|
|
15733
|
-
export function updateEnabled(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: boolean | undefined): void;
|
|
15734
|
-
export function updatePath(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<PathState> | undefined): void;
|
|
15735
|
-
export function updateMarker(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<MarkerState> | undefined): boolean;
|
|
15736
|
-
export function updateRank(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: CollisionRankingTier | undefined): boolean;
|
|
15737
|
-
export function updateLabel(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<LabelState> | undefined): void;
|
|
15738
|
-
export function updateHoverColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: string): void;
|
|
15739
|
-
export function updateVisibility(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: boolean): boolean;
|
|
15740
|
-
export function updateOpacity(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, state: RendererState, update?: number): void;
|
|
15741
|
-
export function updateAltitude(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: number): void;
|
|
15742
|
-
export function updateOutline(entity: Entity3DTypes, update?: boolean): boolean;
|
|
15743
|
-
}
|
|
15744
|
-
|
|
15745
16032
|
declare module '@mappedin/react-sdk/geojson/src/systems/interactions/tap-controller' {
|
|
15746
16033
|
export enum TapType {
|
|
15747
16034
|
onefinger = 0,
|