@mappedin/mappedin-js 6.0.1-beta.24 → 6.0.1-beta.25

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.
@@ -16,7 +16,9 @@
16
16
  // ../mappedin-js/@packages/internal/shave-text/shave-text
17
17
  // ../mappedin-js/@tweenjs/tween.js
18
18
  // ../mappedin-js/@turf/turf
19
+ // ../mappedin-js/troika-three-text
19
20
  // ../mappedin-js/@packages/internal/quad-tree
21
+ // ../mappedin-js/@mappedin/core-sdk/src/components/text3d
20
22
  // ../mappedin-js/minisearch
21
23
  // ../mappedin-js/three/addons/loaders/GLTFLoader.js
22
24
  // ../mappedin-js/@mapbox/point-geometry
@@ -37,8 +39,9 @@ declare module '@mappedin/mappedin-js' {
37
39
  import type { Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
38
40
  import type { ParsedMVF as TMVF, StyleCollection as TMVFStyleCollection, Style as TMVFStyle, LineStringStyle as TMVFLineStringStyle, PolygonStyle as TMVFPolygonStyle, PointStyle as TMVFPointStyle, ParsedMVFLocalePack, OperationHours, SiblingGroup, LocationState } from '@mappedin/mvf';
39
41
  import { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
40
- import type { InsetPadding, InsetPaddingOption, Shading, PaintStyle, LineStyle, WatermarkOptions } from '@mappedin/mappedin-js/geojson/src';
41
- import { enableTestMode } from '@mappedin/mappedin-js/geojson/src';
42
+ export type { Text3D as Text3DApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/text3d';
43
+ import type { InsetPadding, InsetPaddingOption, Shading, PaintStyle, LineStyle, WatermarkOptions, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, MapViewState } from '@mappedin/mappedin-js/geojson/src';
44
+ import { enableTestMode, preloadFont } from '@mappedin/mappedin-js/geojson/src';
42
45
  export type { PubSub } from '@packages/internal/common/pubsub';
43
46
  import type { TMappedinMapLibreOverlayEvents } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
44
47
  import { MappedinMapLibreOverlay } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
@@ -291,12 +294,13 @@ declare module '@mappedin/mappedin-js' {
291
294
  * @deprecated Use {@link show3dMap} instead.
292
295
  */
293
296
  export const show3dMapGeojson: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
294
- export { parseMVF, unzipMVF, enableTestMode };
295
- export type { MapView, MapData, MappedinMapLibreOverlay, TMappedinMapLibreOverlayEvents, TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TStackedMapsEvents, TExpandOptions, TStackedMapsState, TFollowMode, TFollowCameraOptions, TEvents, TEventPayload, TFloorChangeReason, TClickPayload, THoverPayload, TShow3DMapOptions, TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, TAntialiasingOptions, TMVF, PaintStyle, LineStyle, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, Environment, InsetPadding, InsetPaddingOption, OperationHours, SiblingGroup, LocationState, };
297
+ export { parseMVF, unzipMVF, enableTestMode, preloadFont };
298
+ export type { MapView, MapData, MapViewState, MappedinMapLibreOverlay, TMappedinMapLibreOverlayEvents, TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TStackedMapsEvents, TExpandOptions, TStackedMapsState, TFollowMode, TFollowCameraOptions, TEvents, TEventPayload, TFloorChangeReason, TClickPayload, THoverPayload, TShow3DMapOptions, TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, TAntialiasingOptions, TMVF, PaintStyle, LineStyle, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, Environment, InsetPadding, InsetPaddingOption, OperationHours, SiblingGroup, LocationState, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, };
296
299
  export type * from 'geojson';
297
300
  export type { TUpdateState, TUpdateStates, TLabelState, TGeometryState, TModelState, TShapeState, TDoorsState, TImageState, TWallsState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TCameraFocusOnTarget, TFocusable, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TAddImageOptions, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, TBlueDotOptions, TBlueDotPositionUpdate, } from '@mappedin/mappedin-js/mappedin-js/src/types';
298
301
  export { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
299
- export type { Label, Marker, Path, Shape, CameraTransform, Model, Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
302
+ export type { Label, Marker, Path, Shape, CameraTransform, Model, Image, Text3D } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
303
+ export type { Debug } from '@mappedin/mappedin-js/mappedin-js/src/debug';
300
304
  export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
301
305
  export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
302
306
  export { Coordinate, Annotation, Connection, Door, Floor, FloorStack, MapObject, PointOfInterest, Space, Image as ImageData, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, Facade, Node, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
@@ -575,7 +579,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
575
579
  declare module '@mappedin/mappedin-js/mappedin-js/src/events' {
576
580
  import type { ClickPayload } from '@mappedin/core-sdk';
577
581
  import type { TStackedMapsEvents } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
578
- import type { Coordinate, Floor, MapObject, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
582
+ import type { Coordinate, Facade, Floor, MapObject, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
579
583
  import type { Label, Marker, Model, Path } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
580
584
  import type { CameraTransform } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/camera-transform';
581
585
  import type { TBlueDotEvents } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot';
@@ -619,6 +623,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/events' {
619
623
  * Details about the pointer event which triggered the interaction.
620
624
  */
621
625
  pointerEvent: ClickPayload['pointerEvent'];
626
+ /**
627
+ * The interactive facades which the user interaction passed through.
628
+ */
629
+ facades: Facade[];
622
630
  };
623
631
  export type THoverPayload = Omit<TClickPayload, 'pointerEvent'>;
624
632
  /**
@@ -980,20 +988,22 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
980
988
  }
981
989
 
982
990
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
983
- import type { RendererCore, WatermarkUpdateOptions } from '@mappedin/core-sdk';
991
+ import type { RendererCore, WatermarkUpdateOptions } from '@mappedin/mappedin-js/geojson/src';
984
992
  import { PubSub } from '@packages/internal/common';
985
993
  import { type TEvents, type TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
986
994
  import type { Navigation } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
987
995
  import type { Camera, Labels, Markers, Models, Paths, Exporter, Directions, Style, Outdoor, Images } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
988
996
  import type { BlueDot } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
989
997
  import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
990
- import type { Annotation, Coordinate, Door, Floor, MapObject, PointOfInterest, Space, Node, EnterpriseLocation, FloorStack } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
991
- import type { DOORS, WALLS, TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState, TUpdateStates } from '@mappedin/mappedin-js/mappedin-js/src/types';
992
- import type { Label, Marker, Image, Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
998
+ import type { Annotation, Coordinate, Door, Floor, MapObject, PointOfInterest, Space, Node, EnterpriseLocation, FloorStack, Facade } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
999
+ import type { DOORS, WALLS, TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState, TUpdateStates, GlobalState, UpdateGlobalState } from '@mappedin/mappedin-js/mappedin-js/src/types';
1000
+ import type { Label, Marker, Image, Shape, Text3D as Text3DView } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
993
1001
  import type { TEventPayload } from '@mappedin/mappedin-js/mappedin-js/src/events';
994
1002
  import type { Shapes } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes';
995
1003
  import type { StackedMaps, TCollapseOptions, TExpandOptions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
996
1004
  import type { InspectorOption } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/inspector/inspector';
1005
+ import { Debug } from '@mappedin/mappedin-js/mappedin-js/src/debug';
1006
+ import type { Text3D } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/text3d';
997
1007
  /**
998
1008
  * The MapView class is the main class for rendering and interacting with the map.
999
1009
  *
@@ -1011,6 +1021,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
1011
1021
  * Controls for the map's labels.
1012
1022
  */
1013
1023
  Labels: Labels;
1024
+ /**
1025
+ * @experimental
1026
+ * Controls for the map's 3D texts.
1027
+ */
1028
+ Text3D: Text3D;
1014
1029
  /**
1015
1030
  * Controls for the map's markers.
1016
1031
  */
@@ -1088,8 +1103,16 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
1088
1103
  * // Update the color of a space to red.
1089
1104
  * map.updateState(space, { color: 'red' });
1090
1105
  */
1091
- updateState<T extends Space | MapObject | Label | Marker | Shape | Door | WALLS | DOORS>(target: T, state: TUpdateState<T>): any;
1106
+ updateState<T extends Space | Text3DView | MapObject | Label | Marker | Shape | Door | Facade | WALLS | DOORS>(target: T, state: TUpdateState<T>): any;
1092
1107
  updateState<T extends string & NonNullable<unknown>>(target: T, state: TUpdateStates): any;
1108
+ /**
1109
+ * Update global state of the MapView
1110
+ */
1111
+ updateGlobalState(update: UpdateGlobalState): void;
1112
+ /**
1113
+ * Get global state of the MapView
1114
+ */
1115
+ getGlobalState(): GlobalState;
1093
1116
  update: () => void;
1094
1117
  /**
1095
1118
  * Retrieves the map data for the current map.
@@ -1148,7 +1171,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
1148
1171
  * @hidden
1149
1172
  */
1150
1173
  updateWatermark(options: WatermarkUpdateOptions): void;
1151
- getState<T extends Space | MapObject | Label | Marker | Image | Shape | string>(target: T): TGetState<T> | undefined;
1174
+ getState<T extends Space | Text3DView | MapObject | Label | Marker | Image | Shape | string>(target: T): TGetState<T>;
1152
1175
  setHoverColor(c: string): void;
1153
1176
  getHoverColor(): string | undefined;
1154
1177
  /**
@@ -1267,6 +1290,88 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
1267
1290
  * Enable debug interface. Learn more about the debug interface in the [Debug Mode Guide](https://developer.mappedin.com/web-sdk/getting-started#debug-mode).
1268
1291
  */
1269
1292
  enableDebug(opitons?: InspectorOption): Promise<void>;
1293
+ /**
1294
+ * @experimental
1295
+ * @internal
1296
+ */
1297
+ Debug: Debug;
1298
+ }
1299
+ }
1300
+
1301
+ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/text3d' {
1302
+ import { Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
1303
+ import type { TAddText3DOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
1304
+ import type { CurrentMapGetter } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/types';
1305
+ import { Text3D as Text3DView } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
1306
+ export class Text3D {
1307
+ #private;
1308
+ /**
1309
+ * @internal
1310
+ */
1311
+ constructor({ currentMapGetter }: {
1312
+ currentMapGetter: CurrentMapGetter;
1313
+ });
1314
+ /**
1315
+ * Creates polygon labels for all spaces.
1316
+ *
1317
+ * @param options - Configuration options for text label creation
1318
+ * @returns An array of Text3DView instances representing the created labels. If the space is already labeled, the designated Text3D instance will be returned.
1319
+ *
1320
+ * @example
1321
+ * ```typescript
1322
+ * const labels = mapView.Text3D.labelAll({
1323
+ * // optional configuration options
1324
+ * });
1325
+ * ```
1326
+ */
1327
+ labelAll(options?: TAddText3DOptions): Text3DView[];
1328
+ /**
1329
+ * Creates a 3D text label for a given space.
1330
+ *
1331
+ * @param target - The target space or enterprise space to label.
1332
+ * @param content - The content of the label. If not provided, target.name will be used
1333
+ * @param options={} - Configuration options for the text label creation.
1334
+ * @returns An array of Text3DView instances representing the created labels.
1335
+ *
1336
+ * @throws {Error} If the target is not a Space.
1337
+ *
1338
+ * @example
1339
+ * ```typescript
1340
+ * const labels = mapView.Text3D.label(space, "Label Content", { fontSize: 12 });
1341
+ * ```
1342
+ */
1343
+ label(target: Space, content?: string, options?: TAddText3DOptions): Text3DView | undefined;
1344
+ /**
1345
+ * Removes one or more Text3D labels from the map
1346
+ *
1347
+ * @param target - Can be either:
1348
+ * - A single Text3DView instance
1349
+ * - An array of Text3DView instances
1350
+ * - A string ID of the Text3DView to remove
1351
+ *
1352
+ * @example
1353
+ * ```typescript
1354
+ * // Remove single text label
1355
+ * mapView.Text3D.remove(text);
1356
+ *
1357
+ * // Remove multiple text labels
1358
+ * mapView.Text3D.remove([text, text]);
1359
+ *
1360
+ * // Remove by ID
1361
+ * mapView.Text3D.remove("text3d-123");
1362
+ * ```
1363
+ */
1364
+ remove(text3dView: Text3DView): void;
1365
+ remove(id: string): void;
1366
+ /**
1367
+ * Removes all Text3D labels from the current map
1368
+ *
1369
+ * @example
1370
+ * ```typescript
1371
+ * mapView.Text3D.removeAll();
1372
+ * ```
1373
+ */
1374
+ removeAll(): void;
1270
1375
  }
1271
1376
  }
1272
1377
 
@@ -1286,20 +1391,26 @@ declare module '@mappedin/mappedin-js/geojson/src' {
1286
1391
  import { mountSceneGraphVisualizer } from '@mappedin/mappedin-js/geojson/examples/src/utils/scene-graph-visualizer';
1287
1392
  import '../../packages/outdoor-context-v4/css/maplibre-gl.css';
1288
1393
  import type { CollisionRankingTier } from '@mappedin/mappedin-js/geojson/src/utils/collision-ranking-tier';
1394
+ export type { Text3DState } from '@mappedin/mappedin-js/geojson/src/components/text3d';
1395
+ export { TEXT3D_STYLE_UPDATE_PROPS } from '@mappedin/mappedin-js/geojson/src/entities/utils';
1289
1396
  export { Navigator } from '@mappedin/mappedin-js/packages/geojson-navigator';
1290
1397
  export { interpolate, debounce } from '@mappedin/mappedin-js/geojson/src/utils';
1291
1398
  export { MAPPEDIN_LAYER_ID } from '@mappedin/mappedin-js/geojson/src/utils/constants';
1399
+ export type { DebugState, Debug } from '@mappedin/mappedin-js/geojson/src/utils/debug';
1292
1400
  /**
1293
1401
  * Enable test mode for the renderer. This will disable the WebGLRenderer and WebGL1Renderer and replace them with a dummy object
1294
1402
  * so you can run tests against it
1295
1403
  */
1296
- export { enableTestMode } from '@mappedin/mappedin-js/geojson/src/services/renderer';
1404
+ export { enableTestMode } from '@mappedin/mappedin-js/geojson/src/services/test-mode';
1297
1405
  export { mountSceneGraphVisualizer };
1298
1406
  export type { EntityId, EntityState, LineStyle, PaintStyle, ModelStyle, ModelProperties, Shading } from '@mappedin/mappedin-js/geojson/src/types';
1299
1407
  export type * from 'geojson';
1300
1408
  export type { WatermarkUpdateOptions, WatermarkOptions, WatermarkPosition } from '@mappedin/mappedin-js/geojson/src/systems/watermark/system';
1409
+ export { preloadFont } from '@mappedin/mappedin-js/geojson/src/systems/text3d/system';
1301
1410
  export type { GLTFExportOptions } from '@mappedin/mappedin-js/geojson/src/systems/exporter';
1302
1411
  export type { AttributionControlOptions, AttributionPosition } from '@mappedin/mappedin-js/geojson/src/systems/html-controls/system';
1412
+ export type { Text3DStyle } from '@mappedin/mappedin-js/geojson/src/components/styles';
1413
+ export type { AddText3DOptions, InitializeText3DState, UpdatableText3DState } from '@mappedin/mappedin-js/geojson/src/components/text3d';
1303
1414
  export { ATTRIBUTION_POSITIONS } from '@mappedin/mappedin-js/geojson/src/systems/html-controls/system';
1304
1415
  export { ANIMATION_TWEENS } from '@mappedin/mappedin-js/geojson/src/camera';
1305
1416
  export type { AddPathOptions, AddMarkerOptions, AddLabelOptions, AnimateToOptions, FocusOnOptions, MapViewState, MarkerState, PathState, GroupContainerState, GeometryGroupState, ShapeState, CustomGeometryBuilder, LabelState, GeometryState, ModelState, EasingCurve, Camera, InsetPadding, InsetPaddingOption, Position, ClickPayload, HoverPayload, CameraPayload, MapEvent, MapEventPayload, CollisionRankingTier, LabelAppearance, RendererCore, };
@@ -1381,9 +1492,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay' {
1381
1492
  declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
1382
1493
  import type { Feature, MultiPolygon, Polygon } from 'geojson';
1383
1494
  import type { Coordinate, Floor, Door, Space, MapObject, PointOfInterest, Connection, Annotation, EnterpriseLocation, Node, Area, Facade } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
1384
- import type { Label, Marker, Model, Image, Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
1495
+ import type { Label, Marker, Model, Image, Shape, Text3D } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
1385
1496
  import type { Language, ParsedMVFLocalePack } from '@mappedin/mvf';
1386
- import type { InsetPaddingOption, Position } from '@mappedin/core-sdk';
1497
+ import type { InsetPaddingOption, Position, UpdatableText3DState, Text3DState, AddText3DOptions } from '@mappedin/mappedin-js/geojson/src';
1387
1498
  export type DeepRequired<T> = Required<{
1388
1499
  [K in keyof T]: T[K] extends Required<T[K]> ? T[K] : DeepRequired<T[K]>;
1389
1500
  }>;
@@ -1521,6 +1632,14 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
1521
1632
  * Visibility of the walls.
1522
1633
  */
1523
1634
  visible: boolean;
1635
+ /**
1636
+ * Height of the walls.
1637
+ */
1638
+ height?: number;
1639
+ /**
1640
+ * Opacity of the walls.
1641
+ */
1642
+ opacity?: number;
1524
1643
  };
1525
1644
  export type TDoorsState = {
1526
1645
  type: 'doors';
@@ -1665,9 +1784,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
1665
1784
  /**
1666
1785
  * The type for updating the state of map elements (colors, texts, etc.).
1667
1786
  */
1668
- export type TUpdateState<T> = T extends WALLS ? Partial<TWallsState> : T extends DOORS ? Partial<TDoorsState> : T extends Door ? Partial<TDoorsState> : T extends Marker ? Partial<TMarkerState> : T extends Label ? Partial<TLabelState> : T extends Space | MapObject ? Partial<TGeometryState> : T extends Shape ? Partial<Omit<TShapeState, 'height' | 'type'>> : T extends Door ? Partial<TGeometryState> : T extends string ? Record<string, any> : never;
1787
+ export type TUpdateState<T> = T extends WALLS ? Partial<TWallsState> : T extends DOORS | Door ? Partial<TDoorsState> : T extends Marker ? Partial<TMarkerState> : T extends Label ? Partial<TLabelState> : T extends Space | MapObject | Facade ? Partial<TGeometryState> : T extends Shape ? Partial<Omit<TShapeState, 'height' | 'type'>> : T extends Text3D ? UpdatableText3DState : T extends string ? Record<string, any> : never;
1669
1788
  export type TUpdateStates = Partial<Omit<TGeometryState, 'interactive' | 'hoverColor' | 'type'>> | Partial<TMarkerState> | Partial<TLabelState> | Partial<TGeometryState>;
1670
- export type TGetState<T> = T extends WALLS ? TWallsState | undefined : T extends DOORS ? TDoorsState | undefined : T extends Marker ? TMarkerState | undefined : T extends Shape ? TShapeState | undefined : T extends Model ? TModelState | undefined : T extends Label ? TLabelState | undefined : T extends Image ? TImageState | undefined : T extends Space | MapObject ? TGeometryState | undefined : T extends string ? TLabelState | TGeometryState | TMarkerState | TModelState | undefined : never;
1789
+ export type TGetState<T> = T extends WALLS ? TWallsState | undefined : T extends DOORS ? TDoorsState | undefined : T extends Marker ? TMarkerState | undefined : T extends Shape ? TShapeState | undefined : T extends Model ? TModelState | undefined : T extends Label ? TLabelState | undefined : T extends Image ? TImageState | undefined : T extends Text3D ? Text3DState | undefined : T extends Space | MapObject ? TGeometryState | undefined : T extends string ? TLabelState | TGeometryState | TMarkerState | TModelState | undefined : never;
1671
1790
  /**
1672
1791
  * Options for {@link Camera} animations on the map.
1673
1792
  */
@@ -2140,6 +2259,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
2140
2259
  */
2141
2260
  url: string;
2142
2261
  };
2262
+ /**
2263
+ * @interface
2264
+ */
2265
+ export type TAddText3DOptions = AddText3DOptions;
2143
2266
  /**
2144
2267
  * Options for controlling the behavior of an {@link Image}.
2145
2268
  */
@@ -2353,6 +2476,21 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
2353
2476
  language: Language;
2354
2477
  localePack: ParsedMVFLocalePack;
2355
2478
  };
2479
+ export type GlobalState = {
2480
+ text3d: {
2481
+ /**
2482
+ * hover color of the text3d
2483
+ */
2484
+ hoverColor: string;
2485
+ };
2486
+ geometry: {
2487
+ /**
2488
+ * hover color of the geometries
2489
+ */
2490
+ hoverColor: string;
2491
+ };
2492
+ };
2493
+ export type UpdateGlobalState = DeepPartial<GlobalState>;
2356
2494
  }
2357
2495
 
2358
2496
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot' {
@@ -2642,6 +2780,16 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects' {
2642
2780
  export { Path } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path';
2643
2781
  export { CameraTransform } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/camera-transform';
2644
2782
  export { Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/shape';
2783
+ export { Text3D } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/text3d';
2784
+ }
2785
+
2786
+ declare module '@mappedin/mappedin-js/mappedin-js/src/debug' {
2787
+ import type { RendererCore } from '@mappedin/core-sdk';
2788
+ export class Debug {
2789
+ state: RendererCore['Debug']['state'];
2790
+ constructor(core: RendererCore);
2791
+ update: RendererCore['Debug']['update'];
2792
+ }
2645
2793
  }
2646
2794
 
2647
2795
  declare module '@mappedin/mappedin-js/mappedin-js/src/navigation' {
@@ -3436,8 +3584,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
3436
3584
  import type { Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3437
3585
  import type { ParsedMVF as TMVF, StyleCollection as TMVFStyleCollection, Style as TMVFStyle, LineStringStyle as TMVFLineStringStyle, PolygonStyle as TMVFPolygonStyle, PointStyle as TMVFPointStyle, ParsedMVFLocalePack, OperationHours, SiblingGroup, LocationState } from '@mappedin/mvf';
3438
3586
  import { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
3439
- import type { InsetPadding, InsetPaddingOption, Shading, PaintStyle, LineStyle, WatermarkOptions } from '@mappedin/mappedin-js/geojson/src';
3440
- import { enableTestMode } from '@mappedin/mappedin-js/geojson/src';
3587
+ export type { Text3D as Text3DApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/text3d';
3588
+ import type { InsetPadding, InsetPaddingOption, Shading, PaintStyle, LineStyle, WatermarkOptions, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, MapViewState } from '@mappedin/mappedin-js/geojson/src';
3589
+ import { enableTestMode, preloadFont } from '@mappedin/mappedin-js/geojson/src';
3441
3590
  export type { PubSub } from '@packages/internal/common/pubsub';
3442
3591
  import type { TMappedinMapLibreOverlayEvents } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
3443
3592
  import { MappedinMapLibreOverlay } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
@@ -3690,12 +3839,13 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
3690
3839
  * @deprecated Use {@link show3dMap} instead.
3691
3840
  */
3692
3841
  export const show3dMapGeojson: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
3693
- export { parseMVF, unzipMVF, enableTestMode };
3694
- export type { MapView, MapData, MappedinMapLibreOverlay, TMappedinMapLibreOverlayEvents, TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TStackedMapsEvents, TExpandOptions, TStackedMapsState, TFollowMode, TFollowCameraOptions, TEvents, TEventPayload, TFloorChangeReason, TClickPayload, THoverPayload, TShow3DMapOptions, TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, TAntialiasingOptions, TMVF, PaintStyle, LineStyle, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, Environment, InsetPadding, InsetPaddingOption, OperationHours, SiblingGroup, LocationState, };
3842
+ export { parseMVF, unzipMVF, enableTestMode, preloadFont };
3843
+ export type { MapView, MapData, MapViewState, MappedinMapLibreOverlay, TMappedinMapLibreOverlayEvents, TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TStackedMapsEvents, TExpandOptions, TStackedMapsState, TFollowMode, TFollowCameraOptions, TEvents, TEventPayload, TFloorChangeReason, TClickPayload, THoverPayload, TShow3DMapOptions, TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, TAntialiasingOptions, TMVF, PaintStyle, LineStyle, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, Environment, InsetPadding, InsetPaddingOption, OperationHours, SiblingGroup, LocationState, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, };
3695
3844
  export type * from 'geojson';
3696
3845
  export type { TUpdateState, TUpdateStates, TLabelState, TGeometryState, TModelState, TShapeState, TDoorsState, TImageState, TWallsState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TCameraFocusOnTarget, TFocusable, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TAddImageOptions, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, TBlueDotOptions, TBlueDotPositionUpdate, } from '@mappedin/mappedin-js/mappedin-js/src/types';
3697
3846
  export { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
3698
- export type { Label, Marker, Path, Shape, CameraTransform, Model, Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
3847
+ export type { Label, Marker, Path, Shape, CameraTransform, Model, Image, Text3D } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
3848
+ export type { Debug } from '@mappedin/mappedin-js/mappedin-js/src/debug';
3699
3849
  export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
3700
3850
  export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3701
3851
  export { Coordinate, Annotation, Connection, Door, Floor, FloorStack, MapObject, PointOfInterest, Space, Image as ImageData, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, Facade, Node, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
@@ -4031,6 +4181,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
4031
4181
  * @internal
4032
4182
  */
4033
4183
  readonly __type = "space";
4184
+ getMvfData(): import("@mappedin/mvf").Feature<import("@mappedin/mvf").Point | import("@mappedin/mvf").LineString | import("@mappedin/mvf").Polygon, import("@mappedin/mvf").SpaceProperties>;
4034
4185
  /**
4035
4186
  * Checks if the provided instance is of type Space.
4036
4187
  *
@@ -5197,6 +5348,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/inspector/insp
5197
5348
  export type InspectorOption = Partial<InspectorState>;
5198
5349
  }
5199
5350
 
5351
+ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/types' {
5352
+ import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
5353
+ export type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
5354
+ }
5355
+
5200
5356
  declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
5201
5357
  import './marker.scss';
5202
5358
  import { Vector2 } from 'three';
@@ -5260,14 +5416,14 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
5260
5416
  }, "strip", z.ZodTypeAny, {
5261
5417
  interactive?: boolean | "pointer-events-auto" | undefined;
5262
5418
  id?: string | undefined;
5263
- anchor?: "center" | "left" | "right" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | ("center" | "left" | "right" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right")[] | undefined;
5264
- rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
5419
+ anchor?: "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | ("center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right")[] | undefined;
5420
+ rank?: number | "low" | "medium" | "high" | "always-visible" | undefined;
5265
5421
  dynamicResize?: boolean | undefined;
5266
5422
  }, {
5267
5423
  interactive?: boolean | "pointer-events-auto" | undefined;
5268
5424
  id?: string | undefined;
5269
- anchor?: "center" | "left" | "right" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | ("center" | "left" | "right" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right")[] | undefined;
5270
- rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
5425
+ anchor?: "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | ("center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right")[] | undefined;
5426
+ rank?: number | "low" | "medium" | "high" | "always-visible" | undefined;
5271
5427
  dynamicResize?: boolean | undefined;
5272
5428
  }>;
5273
5429
  export function validateMarker(coordinate: Position, contentHTML: string, options: AddMarkerOptions): void;
@@ -5358,7 +5514,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
5358
5514
 
5359
5515
  declare module '@mappedin/mappedin-js/geojson/src/components/path' {
5360
5516
  import { Vector3 } from 'three';
5361
- import type { Mesh, BufferGeometry } from 'three';
5517
+ import type { BufferGeometry, LineSegments } from 'three';
5362
5518
  import type { EntityId, Position } from '@mappedin/mappedin-js/geojson/src/types';
5363
5519
  import type { PathMaterial, PatMeshContainer } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
5364
5520
  import type { FeatureCollection, Point } from 'geojson';
@@ -5537,7 +5693,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/path' {
5537
5693
  mesh: PatMeshContainer;
5538
5694
  material?: PathMaterial;
5539
5695
  geometry?: BufferGeometry;
5540
- outline?: Mesh;
5696
+ outline?: LineSegments;
5541
5697
  feature: FeatureCollection<Point, PathProperties>;
5542
5698
  options: AddPathOptions;
5543
5699
  nearRadius: number;
@@ -5653,6 +5809,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/label' {
5653
5809
  foregroundColor?: string | undefined;
5654
5810
  backgroundColor?: string | undefined;
5655
5811
  } | undefined;
5812
+ margin?: number | undefined;
5656
5813
  marker?: {
5657
5814
  size?: number | undefined;
5658
5815
  foregroundColor?: {
@@ -5664,7 +5821,6 @@ declare module '@mappedin/mappedin-js/geojson/src/components/label' {
5664
5821
  inactive?: string | undefined;
5665
5822
  } | undefined;
5666
5823
  } | undefined;
5667
- margin?: number | undefined;
5668
5824
  }, {
5669
5825
  text?: {
5670
5826
  size?: number | undefined;
@@ -5674,6 +5830,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/label' {
5674
5830
  foregroundColor?: string | undefined;
5675
5831
  backgroundColor?: string | undefined;
5676
5832
  } | undefined;
5833
+ margin?: number | undefined;
5677
5834
  marker?: {
5678
5835
  size?: number | undefined;
5679
5836
  foregroundColor?: {
@@ -5685,11 +5842,10 @@ declare module '@mappedin/mappedin-js/geojson/src/components/label' {
5685
5842
  inactive?: string | undefined;
5686
5843
  } | undefined;
5687
5844
  } | undefined;
5688
- margin?: number | undefined;
5689
5845
  }>>;
5690
5846
  }, "strip", z.ZodTypeAny, {
5691
5847
  interactive?: boolean | undefined;
5692
- rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
5848
+ rank?: number | "low" | "medium" | "high" | "always-visible" | undefined;
5693
5849
  appearance?: {
5694
5850
  text?: {
5695
5851
  size?: number | undefined;
@@ -5699,6 +5855,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/label' {
5699
5855
  foregroundColor?: string | undefined;
5700
5856
  backgroundColor?: string | undefined;
5701
5857
  } | undefined;
5858
+ margin?: number | undefined;
5702
5859
  marker?: {
5703
5860
  size?: number | undefined;
5704
5861
  foregroundColor?: {
@@ -5710,11 +5867,10 @@ declare module '@mappedin/mappedin-js/geojson/src/components/label' {
5710
5867
  inactive?: string | undefined;
5711
5868
  } | undefined;
5712
5869
  } | undefined;
5713
- margin?: number | undefined;
5714
5870
  } | undefined;
5715
5871
  }, {
5716
5872
  interactive?: boolean | undefined;
5717
- rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
5873
+ rank?: number | "low" | "medium" | "high" | "always-visible" | undefined;
5718
5874
  appearance?: {
5719
5875
  text?: {
5720
5876
  size?: number | undefined;
@@ -5724,6 +5880,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/label' {
5724
5880
  foregroundColor?: string | undefined;
5725
5881
  backgroundColor?: string | undefined;
5726
5882
  } | undefined;
5883
+ margin?: number | undefined;
5727
5884
  marker?: {
5728
5885
  size?: number | undefined;
5729
5886
  foregroundColor?: {
@@ -5735,7 +5892,6 @@ declare module '@mappedin/mappedin-js/geojson/src/components/label' {
5735
5892
  inactive?: string | undefined;
5736
5893
  } | undefined;
5737
5894
  } | undefined;
5738
- margin?: number | undefined;
5739
5895
  } | undefined;
5740
5896
  }>;
5741
5897
  export function validateLabel(coordinate: Position, text: string, options: AddLabelOptions): void;
@@ -6082,9 +6238,12 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/group-container' {
6082
6238
  import type { StackComponent } from '@mappedin/mappedin-js/geojson/src/components/stack';
6083
6239
  import type { MarkerState } from '@mappedin/mappedin-js/geojson/src/components/marker';
6084
6240
  import type { LabelState } from '@mappedin/mappedin-js/geojson/src/components/label';
6241
+ import type { Geometry3DTypes } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
6085
6242
  import { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
6086
6243
  import type { PathState } from '@mappedin/mappedin-js/geojson/src/components/path';
6087
6244
  import type { InteractionComponent } from '@mappedin/mappedin-js/geojson/src/components/interaction';
6245
+ import type { BatchedText } from '@mappedin/mappedin-js/geojson/src/services/text3d/text3d';
6246
+ import type { EntityTypes } from '@mappedin/mappedin-js/geojson/src/renderer';
6088
6247
  export enum GroupContainerComponents {
6089
6248
  Stack = 0,
6090
6249
  Interaction = 1
@@ -6111,7 +6270,8 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/group-container' {
6111
6270
  };
6112
6271
  export class GroupContainerObject3D extends Object3D {
6113
6272
  childrenIds: Set<string | number>;
6114
- readonly type = "group-container";
6273
+ children: (GroupContainerObject3D | GeometryGroupObject3D | BatchedText | Geometry2D['object3d'] | NonNullable<Geometry3D['object3d']>)[];
6274
+ readonly type: "group-container";
6115
6275
  userData: {
6116
6276
  entityId: string | number;
6117
6277
  entities2D: Set<string | number>;
@@ -6119,8 +6279,8 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/group-container' {
6119
6279
  };
6120
6280
  components: [StackComponent?, InteractionComponent?];
6121
6281
  constructor(id: string);
6122
- addEntity(entityGroupOrContainer: GroupContainerObject3D | GeometryGroupObject3D | Geometry2D | Geometry3D): void;
6123
- removeEntity(entityGroupOrContainer: GroupContainerObject3D | GeometryGroupObject3D | Geometry2D | Geometry3D): void;
6282
+ addEntity(entityGroupOrContainer: GroupContainerObject3D | GeometryGroupObject3D | Geometry2D | Geometry3DTypes): void;
6283
+ removeEntity(entityGroupOrContainer: EntityTypes): void;
6124
6284
  setVisible(visible: boolean): void;
6125
6285
  setAltitude(altitude: number): void;
6126
6286
  get altitude(): number;
@@ -6200,7 +6360,7 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry-group' {
6200
6360
  export type ChildUpdatable<T> = T extends LineStyle ? Partial<Pick<LineStyle, 'color' | 'opacity' | 'visible'>> : Partial<Pick<PaintStyle, 'color' | 'opacity' | 'visible'>>;
6201
6361
  export class GeometryGroupObject3D extends Object3D {
6202
6362
  visible: boolean;
6203
- readonly type = "geometry-group";
6363
+ readonly type: "geometry-group";
6204
6364
  components: [GeometryGroupStyleComponent];
6205
6365
  userData: {
6206
6366
  entityId: string | number;
@@ -6231,7 +6391,8 @@ declare module '@mappedin/mappedin-js/geojson/src/types/geometry' {
6231
6391
  }
6232
6392
 
6233
6393
  declare module '@mappedin/mappedin-js/geojson/src/types' {
6234
- import { Mesh, Object3D, InstancedMesh, Camera } from 'three';
6394
+ import type { Camera } from 'three';
6395
+ import { Mesh, Object3D, InstancedMesh } from 'three';
6235
6396
  import type { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/geometry2d';
6236
6397
  import type { Position } from '@mappedin/mappedin-js/geojson/src/types/geometry';
6237
6398
  import type { GeometryState } from '@mappedin/mappedin-js/geojson/src/components/mesh';
@@ -6243,13 +6404,14 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
6243
6404
  import type { MarkerState } from '@mappedin/mappedin-js/geojson/src/components/marker';
6244
6405
  import type { ImageState } from '@mappedin/mappedin-js/geojson/src/components/image';
6245
6406
  import type { ShapeState } from '@mappedin/mappedin-js/geojson/src/components/custom';
6246
- import type { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities';
6247
6407
  import type { Group as TweenGroup } from '@tweenjs/tween.js';
6248
- import { MaterialSide } from '@mappedin/mappedin-js/geojson/src/components/style';
6408
+ import type { MaterialSide } from '@mappedin/mappedin-js/geojson/src/components/styles';
6409
+ import type { Geometry3DTypes } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
6410
+ import type { Text3DState } from '@mappedin/mappedin-js/geojson/src/components/text3d';
6249
6411
  /**
6250
6412
  * The state of an entity, which can be a geometry, geometry group, group container, path, model, label, or marker.
6251
6413
  */
6252
- export type EntityState = GeometryState | GeometryGroupState | GroupContainerState | PathState | ModelState | LabelState | MarkerState | ImageState | ShapeState;
6414
+ export type EntityState = GeometryState | GeometryGroupState | GroupContainerState | PathState | ModelState | LabelState | MarkerState | ImageState | Text3DState | ShapeState;
6253
6415
  /**
6254
6416
  * 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
6255
6417
  * to `getState` and `setState` of the entity.
@@ -6516,14 +6678,18 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
6516
6678
  export type MapEventPayload<EventName extends keyof MapEvent> = MapEvent[EventName] extends {
6517
6679
  data: null;
6518
6680
  } ? MapEvent[EventName]['data'] : MapEvent[EventName];
6519
- export type Geometry3DTypes = Geometry3D | GeometryGroupObject3D | GroupContainerObject3D;
6681
+ /**
6682
+ * All entities in 3D
6683
+ */
6684
+ export type All3DTypes = Geometry3DTypes | GeometryGroupObject3D | GroupContainerObject3D;
6520
6685
  export type RendererState = {
6521
- geometry3DMap: Map<string | number, Geometry3DTypes>;
6686
+ geometry3DMap: Map<string | number, All3DTypes>;
6522
6687
  geometry2DMap: Map<string | number, Geometry2D>;
6523
6688
  geometry2DIdsInScene: Set<Geometry2D['id']>;
6524
- geometry3DIdsInScene: Set<Geometry3DTypes['id']>;
6689
+ geometry3DIdsInScene: Set<All3DTypes['id']>;
6525
6690
  entityScene: GroupContainerObject3D;
6526
6691
  hoverColor: string;
6692
+ text3dHoverColor: string;
6527
6693
  center?: Position;
6528
6694
  insetsPadding: InsetPadding;
6529
6695
  shouldMeasureCanvas: boolean;
@@ -6537,10 +6703,14 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
6537
6703
  tweenGroup: TweenGroup;
6538
6704
  cameraObject: Camera;
6539
6705
  };
6706
+ /**
6707
+ * All of the entities in the scene
6708
+ */
6709
+ export type EntityTypes = Geometry3DTypes | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D;
6540
6710
  }
6541
6711
 
6542
6712
  declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
6543
- import type { Texture, BufferGeometry, LineSegments, Mesh, Object3D } from 'three';
6713
+ import type { Texture, BufferGeometry, LineSegments, Mesh } from 'three';
6544
6714
  import { BatchedMesh, Color, Vector3 } from 'three';
6545
6715
  import type { BatchedStandardMaterial } from '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-optimization/batched-material';
6546
6716
  import type { Position } from '@mappedin/mappedin-js/geojson/src/types';
@@ -6548,7 +6718,9 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
6548
6718
  import type { BBox } from '@turf/turf';
6549
6719
  import { type ImageProperties } from '@mappedin/mappedin-js/geojson/src/components/image';
6550
6720
  import { type BaseTextAreaProperties } from '@mappedin/mvf';
6721
+ import type { Text } from 'troika-three-text';
6551
6722
  export class EntityBatchedMesh extends BatchedMesh {
6723
+ type: "entityBatchedMesh";
6552
6724
  userData: {
6553
6725
  entities: {
6554
6726
  [key: number]: string | number;
@@ -6557,6 +6729,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
6557
6729
  };
6558
6730
  }
6559
6731
  export type MeshComponentProperties = {
6732
+ id: string;
6560
6733
  image?: ImageProperties & {
6561
6734
  position: GeoJsonPosition;
6562
6735
  path: string;
@@ -6636,6 +6809,14 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
6636
6809
  * The top texture URL of the geometry
6637
6810
  */
6638
6811
  topTexture?: string;
6812
+ /**
6813
+ * Whether the geometry is currently in hover state or not
6814
+ */
6815
+ hovered: boolean;
6816
+ /**
6817
+ * The render order of the geometry
6818
+ */
6819
+ renderOrder?: number;
6639
6820
  };
6640
6821
  export class MeshComponent {
6641
6822
  #private;
@@ -6643,7 +6824,11 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
6643
6824
  focusMesh?: Mesh;
6644
6825
  outline?: LineSegments;
6645
6826
  imageMesh?: Mesh;
6646
- textAreaMesh?: Object3D;
6827
+ /**
6828
+ * holds a pointer to space label text if the polygon has label active.
6829
+ */
6830
+ textMesh?: Text;
6831
+ textEntityId?: string;
6647
6832
  readonly type = "geometry";
6648
6833
  dirty: boolean;
6649
6834
  detached: boolean;
@@ -6655,7 +6840,8 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
6655
6840
  constructor(feature: Feature<Polygon | LineString | MultiPolygon | MultiLineString, MeshComponentProperties>);
6656
6841
  get visible(): boolean;
6657
6842
  set visible(visible: boolean);
6658
- setOpacity(opacity: number): void;
6843
+ get renderOrder(): number;
6844
+ set renderOrder(value: number);
6659
6845
  focusable: boolean;
6660
6846
  color: Color;
6661
6847
  topColor: Color;
@@ -6984,9 +7170,9 @@ declare module '@mappedin/mappedin-js/geojson/src/components/model' {
6984
7170
  outline?: LineSegments;
6985
7171
  geometry?: Object3D;
6986
7172
  material?: BatchedStandardMaterial;
6987
- feature: Feature<Point>;
7173
+ feature: Feature<Point, ModelProperties>;
6988
7174
  instanceIndex?: number;
6989
- constructor(feature: Feature<Point>);
7175
+ constructor(feature: Feature<Point, ModelProperties>);
6990
7176
  visible: boolean;
6991
7177
  setOpacity(): void;
6992
7178
  color: Color;
@@ -7005,14 +7191,14 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
7005
7191
  import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
7006
7192
  import { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
7007
7193
  import { PubSub } from '@mappedin/mappedin-js/packages/common/pubsub';
7194
+ import { Renderer } from '@mappedin/mappedin-js/geojson/src/services/renderer';
7008
7195
  import { CollisionSystem } from '@mappedin/mappedin-js/geojson/src/systems/collisions/system';
7009
7196
  import { InteractionSystem } from '@mappedin/mappedin-js/geojson/src/systems/interactions';
7010
- import { ZoomInterpolationSystem } from '@mappedin/mappedin-js/geojson/src/systems/zoom-interpolation/zoom-interpolation';
7011
7197
  import type { AddMarkerOptions, MarkerState } from '@mappedin/mappedin-js/geojson/src/components/marker';
7012
7198
  import type { GLTFExportOptions } from '@mappedin/mappedin-js/geojson/src/systems/exporter';
7013
7199
  import { ExporterSystem } from '@mappedin/mappedin-js/geojson/src/systems/exporter';
7014
7200
  import type { AddLabelOptions, LabelState } from '@mappedin/mappedin-js/geojson/src/components/label';
7015
- import type { LineStyle, PaintStyle, RendererCoreOptions, Position, ModelProperties, ModelStyle, EntityState, EntityId, MapEvent, MapEventPayload, RendererState } from '@mappedin/mappedin-js/geojson/src/types';
7201
+ import type { LineStyle, PaintStyle, RendererCoreOptions, Position, ModelProperties, ModelStyle, EntityState, EntityId, MapEvent, MapEventPayload, RendererState, EntityTypes } from '@mappedin/mappedin-js/geojson/src/types';
7016
7202
  import { MeshCreationAndOptimizationSystem } from '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-optimization/system';
7017
7203
  import { DOMVisibilitySystem } from '@mappedin/mappedin-js/geojson/src/systems/dom-visiblity/system';
7018
7204
  import { TwoDProjectionSystem } from '@mappedin/mappedin-js/geojson/src/systems/2d-projection/system';
@@ -7042,11 +7228,13 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
7042
7228
  import { OutdoorLayers } from '@mappedin/mappedin-js/geojson/src/systems/outdoor-layers/system';
7043
7229
  import { PathSystem } from '@mappedin/mappedin-js/geojson/src/systems/path';
7044
7230
  import { type ImageProperties, type ImageState, type ImageStyle } from '@mappedin/mappedin-js/geojson/src/components/image';
7231
+ import type { AddText3DOptions, Text3DState, UpdatableText3DState } from '@mappedin/mappedin-js/geojson/src/components/text3d';
7045
7232
  import { MeshDetachmentSystem } from '@mappedin/mappedin-js/geojson/src/systems/mesh-detachment/system';
7046
7233
  import { MeshModificationSystem } from '@mappedin/mappedin-js/geojson/src/systems/mesh-modification/system';
7047
7234
  import { PreRenderSystem } from '@mappedin/mappedin-js/geojson/src/systems/pre-render/system';
7048
- import { PolygonLabelSystem } from '@mappedin/mappedin-js/geojson/src/systems/polygon-label/system';
7235
+ import { Text3DSystem } from '@mappedin/mappedin-js/geojson/src/systems/text3d/system';
7049
7236
  import { Group as TweenGroup } from '@tweenjs/tween.js';
7237
+ import { Debug } from '@mappedin/mappedin-js/geojson/src/utils/debug';
7050
7238
  export type * from '@mappedin/mappedin-js/geojson/src/types';
7051
7239
  export const raycaster: Raycaster;
7052
7240
  /**
@@ -7066,7 +7254,6 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
7066
7254
  panBoundsSystem: PanBoundsSystem;
7067
7255
  collisionSystem: CollisionSystem;
7068
7256
  interactionSystem: InteractionSystem;
7069
- zoomInterpolationSystem: ZoomInterpolationSystem;
7070
7257
  meshOptimizationSystem: MeshCreationAndOptimizationSystem;
7071
7258
  domVisiblitySystem: DOMVisibilitySystem;
7072
7259
  domMutationSystem: DOMResizeSystem;
@@ -7089,16 +7276,18 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
7089
7276
  meshDetachmentSystem: MeshDetachmentSystem;
7090
7277
  meshModificationSystem: MeshModificationSystem;
7091
7278
  preRenderSystem: PreRenderSystem;
7092
- polygonLabelSystem: PolygonLabelSystem;
7279
+ text3DSystem: Text3DSystem;
7093
7280
  };
7094
7281
  export type MapViewState = {
7095
7282
  readonly type: 'map-view';
7096
- hoverColor?: string;
7283
+ hoverColor: string;
7284
+ text3dHoverColor: string;
7097
7285
  };
7098
7286
  class Core extends PubSub<MapEvent> {
7099
7287
  #private;
7100
7288
  options: Omit<RendererCoreOptions, 'outdoorView'>;
7101
7289
  container: HTMLElement;
7290
+ Debug: Debug;
7102
7291
  /**
7103
7292
  * The view camera is used for projecting both the outdoor map and our scene
7104
7293
  */
@@ -7157,6 +7346,31 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
7157
7346
  * Add an HTML Marker at a GeoJSON coordinate.
7158
7347
  */
7159
7348
  addMarker2D(coordinate: Position, contentHTML: string, options?: AddMarkerOptions, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<MarkerState> | undefined;
7349
+ /**
7350
+ * Labels an existing 3D geometry with a text area.
7351
+ *
7352
+ * @param meshGeometryId - The ID of the target 3D geometry to label.
7353
+ * @param content - The text content to display.
7354
+ * @param options - Additional options for adding the text label, including:
7355
+ * - parentId: Optional ID of the parent container.
7356
+ * - appearance: Optional appearance settings for the text label.
7357
+ *
7358
+ * @returns An object containing the ID and type of the created or existing text label, or undefined if labeling failed. If geometry is already labeld, the same text id will be returned
7359
+ *
7360
+ * @example
7361
+ * ```typescript
7362
+ * const label = renderer.labelText3D('geometry123', 'Hello World', { parentId: 'parent456', appearance: { color: 'red' } });
7363
+ * if (label) {
7364
+ * console.log(`Label created with ID: ${label.id}`);
7365
+ * }
7366
+ *
7367
+ */
7368
+ labelText3D(meshGeometryId: string, content: string, options?: AddText3DOptions & {
7369
+ parentId?: string;
7370
+ }): {
7371
+ id: string | number;
7372
+ type: "text3d";
7373
+ } | undefined;
7160
7374
  /**
7161
7375
  * Add a 2D label at a GeoJSON coordinate.
7162
7376
  */
@@ -7175,6 +7389,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
7175
7389
  * Remove an entity from the renderer and release associated resources.
7176
7390
  */
7177
7391
  remove(object: string | number): void;
7392
+ remove(object: EntityTypes): void;
7178
7393
  /**
7179
7394
  * Show collision boxes for 2D entities for debugging
7180
7395
  */
@@ -7199,13 +7414,13 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
7199
7414
  * Get the current state of the map view, or any entity that was added, regardless of whether it is visible in the scene
7200
7415
  */
7201
7416
  getState(): MapViewState;
7202
- 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> ? PathState : T extends EntityId<ShapeState> ? ShapeState : T extends EntityId<ImageState> ? ImageState : EntityState;
7417
+ 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> ? PathState : T extends EntityId<ShapeState> ? ShapeState : T extends EntityId<ImageState> ? ImageState : T extends EntityId<Text3DState> ? Text3DState : EntityState;
7203
7418
  getState(geometryOrGeometryId?: Record<string | number, any> | string | number): EntityState;
7204
7419
  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 ? PathState : T extends ShapeState ? ShapeState : T extends ImageState ? ImageState : EntityState;
7205
7420
  /**
7206
7421
  * Set the state of the map view or any entity that was added, regardless of whether it is visible in the scene.
7207
7422
  */
7208
- setState(object: Partial<MapViewState>): void;
7423
+ setState(object: Partial<Omit<MapViewState, 'type'>>): void;
7209
7424
  setState<T extends EntityId<LabelState>>(object: T | T['id'], state: Partial<LabelState>): void;
7210
7425
  setState<T extends EntityId<MarkerState>>(object: T | T['id'], state: Partial<MarkerState>): void;
7211
7426
  setState<T extends EntityId<GeometryGroupState>>(object: T | T['id'], state: Partial<GeometryGroupState>): void;
@@ -7215,6 +7430,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
7215
7430
  setState<T extends EntityId<PathState>>(object: T | T['id'], state: PathUpdateState): void;
7216
7431
  setState<T extends EntityId<ModelState>>(object: T | T['id'], state: Partial<ModelState>): void;
7217
7432
  setState<T extends EntityId<ImageState>>(object: T | T['id'], state: Partial<ImageState>): void;
7433
+ setState<T extends EntityId<Text3DState>>(object: T | T['id'], state: Partial<UpdatableText3DState>): void;
7218
7434
  setState<T extends EntityState>(object: T | T['id'], state: Partial<T>): void;
7219
7435
  /**
7220
7436
  * Project a screen coordinate to a geographic coordinate
@@ -7257,6 +7473,10 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
7257
7473
  * Returns the background color of the renderer. Only applies to "standalone mode"
7258
7474
  */
7259
7475
  get backgroundColor(): import("three").Color;
7476
+ /**
7477
+ * internal
7478
+ */
7479
+ getThreeRenderer(): Renderer;
7260
7480
  /**
7261
7481
  * Returns the current scale of the map in metres per pixel.
7262
7482
  */
@@ -7290,13 +7510,13 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
7290
7510
  * The render happens in an animation frame, not matter how frequently it is called
7291
7511
  * @method render
7292
7512
  */
7293
- render: () => void;
7513
+ render: () => Promise<any> | undefined;
7294
7514
  /**
7295
7515
  * Perform a synchronous render of the scene. This bypasses the animation frame and renders immediately.
7296
7516
  *
7297
7517
  * Note: Only use this if you have an animation frame setup elsewhere
7298
7518
  */
7299
- renderSync: () => void;
7519
+ renderSync: () => Promise<any>;
7300
7520
  /**
7301
7521
  * @internal for testing
7302
7522
  */
@@ -7554,19 +7774,462 @@ declare module '@mappedin/mappedin-js/geojson/src/utils/collision-ranking-tier'
7554
7774
  export function convertNumberToCollisionRankingTier(rank: number): CollisionRankingTier;
7555
7775
  }
7556
7776
 
7777
+ declare module '@mappedin/mappedin-js/geojson/src/components/text3d' {
7778
+ import type { Position } from '@mappedin/mappedin-js/geojson/src/types';
7779
+ import { z } from 'zod';
7780
+ import type { Feature, Point } from 'geojson';
7781
+ import { Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
7782
+ import type { BatchedText, Text } from '@mappedin/mappedin-js/geojson/src/services/text3d/text3d';
7783
+ import type { Text3DStyle } from '@mappedin/mappedin-js/geojson/src/components/styles';
7784
+ import type { MeshComponentProperties } from '@mappedin/mappedin-js/geojson/src/components/mesh';
7785
+ import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
7786
+ /**
7787
+ * State representing an Text3D
7788
+ */
7789
+ export type Text3DState = {
7790
+ readonly id: string | number;
7791
+ readonly type: 'text3d';
7792
+ /**
7793
+ * The position of the Text3D in [lon, lat, altitude]
7794
+ */
7795
+ readonly position: Position;
7796
+ /**
7797
+ * Whether the Text3D is visible
7798
+ */
7799
+ visible: boolean;
7800
+ /**
7801
+ * Attempt to keep the Text3D facing the camera as much as possible
7802
+ */
7803
+ flipToFaceCamera: boolean;
7804
+ /**
7805
+ * Content of the text3d
7806
+ */
7807
+ content: string;
7808
+ } & Text3DStyle;
7809
+ export const text3DStateSchema: z.ZodObject<{
7810
+ visible: z.ZodBoolean;
7811
+ color: z.ZodString;
7812
+ flipToFaceCamera: z.ZodBoolean;
7813
+ font: z.ZodOptional<z.ZodString>;
7814
+ fontSize: z.ZodNumber;
7815
+ margin: z.ZodUnion<[z.ZodNumber, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>]>;
7816
+ outlineColor: z.ZodString;
7817
+ outlineOpacity: z.ZodNumber;
7818
+ outlineBlur: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
7819
+ outlineWidth: z.ZodNumber;
7820
+ outlineOffsetX: z.ZodNumber;
7821
+ outlineOffsetY: z.ZodNumber;
7822
+ strokeWidth: z.ZodNumber;
7823
+ maxWidth: z.ZodOptional<z.ZodNumber>;
7824
+ maxHeight: z.ZodOptional<z.ZodNumber>;
7825
+ strokeOpacity: z.ZodNumber;
7826
+ strokeColor: z.ZodString;
7827
+ fillOpacity: z.ZodNumber;
7828
+ hoverColor: z.ZodOptional<z.ZodString>;
7829
+ id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
7830
+ type: z.ZodLiteral<"text3d">;
7831
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
7832
+ content: z.ZodString;
7833
+ }, "strip", z.ZodTypeAny, {
7834
+ type: "text3d";
7835
+ id: string | number;
7836
+ color: string;
7837
+ position: [number, number, number];
7838
+ visible: boolean;
7839
+ flipToFaceCamera: boolean;
7840
+ fontSize: number;
7841
+ margin: number | [number, number, number, number];
7842
+ outlineColor: string;
7843
+ outlineOpacity: number;
7844
+ outlineBlur: string | number;
7845
+ outlineWidth: number;
7846
+ outlineOffsetX: number;
7847
+ outlineOffsetY: number;
7848
+ strokeWidth: number;
7849
+ strokeOpacity: number;
7850
+ strokeColor: string;
7851
+ fillOpacity: number;
7852
+ content: string;
7853
+ maxWidth?: number | undefined;
7854
+ font?: string | undefined;
7855
+ maxHeight?: number | undefined;
7856
+ hoverColor?: string | undefined;
7857
+ }, {
7858
+ type: "text3d";
7859
+ id: string | number;
7860
+ color: string;
7861
+ position: [number, number, number];
7862
+ visible: boolean;
7863
+ flipToFaceCamera: boolean;
7864
+ fontSize: number;
7865
+ margin: number | [number, number, number, number];
7866
+ outlineColor: string;
7867
+ outlineOpacity: number;
7868
+ outlineBlur: string | number;
7869
+ outlineWidth: number;
7870
+ outlineOffsetX: number;
7871
+ outlineOffsetY: number;
7872
+ strokeWidth: number;
7873
+ strokeOpacity: number;
7874
+ strokeColor: string;
7875
+ fillOpacity: number;
7876
+ content: string;
7877
+ maxWidth?: number | undefined;
7878
+ font?: string | undefined;
7879
+ maxHeight?: number | undefined;
7880
+ hoverColor?: string | undefined;
7881
+ }>;
7882
+ /**
7883
+ * @interface
7884
+ */
7885
+ export type InitializeText3DState = Partial<Omit<Text3DState, 'id' | 'type'>>;
7886
+ export const initializeText3DStateSchema: z.ZodObject<Omit<{
7887
+ visible: z.ZodOptional<z.ZodBoolean>;
7888
+ color: z.ZodOptional<z.ZodString>;
7889
+ flipToFaceCamera: z.ZodOptional<z.ZodBoolean>;
7890
+ font: z.ZodOptional<z.ZodOptional<z.ZodString>>;
7891
+ fontSize: z.ZodOptional<z.ZodNumber>;
7892
+ margin: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>]>>;
7893
+ outlineColor: z.ZodOptional<z.ZodString>;
7894
+ outlineOpacity: z.ZodOptional<z.ZodNumber>;
7895
+ outlineBlur: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
7896
+ outlineWidth: z.ZodOptional<z.ZodNumber>;
7897
+ outlineOffsetX: z.ZodOptional<z.ZodNumber>;
7898
+ outlineOffsetY: z.ZodOptional<z.ZodNumber>;
7899
+ strokeWidth: z.ZodOptional<z.ZodNumber>;
7900
+ maxWidth: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
7901
+ maxHeight: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
7902
+ strokeOpacity: z.ZodOptional<z.ZodNumber>;
7903
+ strokeColor: z.ZodOptional<z.ZodString>;
7904
+ fillOpacity: z.ZodOptional<z.ZodNumber>;
7905
+ hoverColor: z.ZodOptional<z.ZodOptional<z.ZodString>>;
7906
+ id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
7907
+ type: z.ZodOptional<z.ZodLiteral<"text3d">>;
7908
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
7909
+ content: z.ZodOptional<z.ZodString>;
7910
+ }, "type" | "id">, "strict", z.ZodTypeAny, {
7911
+ maxWidth?: number | undefined;
7912
+ color?: string | undefined;
7913
+ position?: [number, number, number] | undefined;
7914
+ visible?: boolean | undefined;
7915
+ flipToFaceCamera?: boolean | undefined;
7916
+ font?: string | undefined;
7917
+ fontSize?: number | undefined;
7918
+ margin?: number | [number, number, number, number] | undefined;
7919
+ outlineColor?: string | undefined;
7920
+ outlineOpacity?: number | undefined;
7921
+ outlineBlur?: string | number | undefined;
7922
+ outlineWidth?: number | undefined;
7923
+ outlineOffsetX?: number | undefined;
7924
+ outlineOffsetY?: number | undefined;
7925
+ strokeWidth?: number | undefined;
7926
+ maxHeight?: number | undefined;
7927
+ strokeOpacity?: number | undefined;
7928
+ strokeColor?: string | undefined;
7929
+ fillOpacity?: number | undefined;
7930
+ hoverColor?: string | undefined;
7931
+ content?: string | undefined;
7932
+ }, {
7933
+ maxWidth?: number | undefined;
7934
+ color?: string | undefined;
7935
+ position?: [number, number, number] | undefined;
7936
+ visible?: boolean | undefined;
7937
+ flipToFaceCamera?: boolean | undefined;
7938
+ font?: string | undefined;
7939
+ fontSize?: number | undefined;
7940
+ margin?: number | [number, number, number, number] | undefined;
7941
+ outlineColor?: string | undefined;
7942
+ outlineOpacity?: number | undefined;
7943
+ outlineBlur?: string | number | undefined;
7944
+ outlineWidth?: number | undefined;
7945
+ outlineOffsetX?: number | undefined;
7946
+ outlineOffsetY?: number | undefined;
7947
+ strokeWidth?: number | undefined;
7948
+ maxHeight?: number | undefined;
7949
+ strokeOpacity?: number | undefined;
7950
+ strokeColor?: string | undefined;
7951
+ fillOpacity?: number | undefined;
7952
+ hoverColor?: string | undefined;
7953
+ content?: string | undefined;
7954
+ }>;
7955
+ /**
7956
+ * At this moment updating text margin is not supported
7957
+ * Margin and content update are not handled at the moment.
7958
+ * @interface
7959
+ */
7960
+ export type UpdatableText3DState = Omit<InitializeText3DState, 'margin' | 'position' | 'content'>;
7961
+ export const updateText3DStateSchema: z.ZodObject<Omit<Omit<{
7962
+ visible: z.ZodOptional<z.ZodBoolean>;
7963
+ color: z.ZodOptional<z.ZodString>;
7964
+ flipToFaceCamera: z.ZodOptional<z.ZodBoolean>;
7965
+ font: z.ZodOptional<z.ZodOptional<z.ZodString>>;
7966
+ fontSize: z.ZodOptional<z.ZodNumber>;
7967
+ margin: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>]>>;
7968
+ outlineColor: z.ZodOptional<z.ZodString>;
7969
+ outlineOpacity: z.ZodOptional<z.ZodNumber>;
7970
+ outlineBlur: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
7971
+ outlineWidth: z.ZodOptional<z.ZodNumber>;
7972
+ outlineOffsetX: z.ZodOptional<z.ZodNumber>;
7973
+ outlineOffsetY: z.ZodOptional<z.ZodNumber>;
7974
+ strokeWidth: z.ZodOptional<z.ZodNumber>;
7975
+ maxWidth: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
7976
+ maxHeight: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
7977
+ strokeOpacity: z.ZodOptional<z.ZodNumber>;
7978
+ strokeColor: z.ZodOptional<z.ZodString>;
7979
+ fillOpacity: z.ZodOptional<z.ZodNumber>;
7980
+ hoverColor: z.ZodOptional<z.ZodOptional<z.ZodString>>;
7981
+ id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
7982
+ type: z.ZodOptional<z.ZodLiteral<"text3d">>;
7983
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
7984
+ content: z.ZodOptional<z.ZodString>;
7985
+ }, "type" | "id">, "maxWidth" | "position" | "margin" | "maxHeight" | "content">, "strict", z.ZodTypeAny, {
7986
+ color?: string | undefined;
7987
+ visible?: boolean | undefined;
7988
+ flipToFaceCamera?: boolean | undefined;
7989
+ font?: string | undefined;
7990
+ fontSize?: number | undefined;
7991
+ outlineColor?: string | undefined;
7992
+ outlineOpacity?: number | undefined;
7993
+ outlineBlur?: string | number | undefined;
7994
+ outlineWidth?: number | undefined;
7995
+ outlineOffsetX?: number | undefined;
7996
+ outlineOffsetY?: number | undefined;
7997
+ strokeWidth?: number | undefined;
7998
+ strokeOpacity?: number | undefined;
7999
+ strokeColor?: string | undefined;
8000
+ fillOpacity?: number | undefined;
8001
+ hoverColor?: string | undefined;
8002
+ }, {
8003
+ color?: string | undefined;
8004
+ visible?: boolean | undefined;
8005
+ flipToFaceCamera?: boolean | undefined;
8006
+ font?: string | undefined;
8007
+ fontSize?: number | undefined;
8008
+ outlineColor?: string | undefined;
8009
+ outlineOpacity?: number | undefined;
8010
+ outlineBlur?: string | number | undefined;
8011
+ outlineWidth?: number | undefined;
8012
+ outlineOffsetX?: number | undefined;
8013
+ outlineOffsetY?: number | undefined;
8014
+ strokeWidth?: number | undefined;
8015
+ strokeOpacity?: number | undefined;
8016
+ strokeColor?: string | undefined;
8017
+ fillOpacity?: number | undefined;
8018
+ hoverColor?: string | undefined;
8019
+ }>;
8020
+ export type Text3DProperties = {
8021
+ id: string;
8022
+ content: string;
8023
+ textArea?: MeshComponentProperties['textArea'];
8024
+ };
8025
+ export type AddText3DOptions = {
8026
+ appearance?: Partial<InitializeText3DState>;
8027
+ };
8028
+ export const addText3DOptionsSchema: z.ZodObject<{
8029
+ appearance: z.ZodOptional<z.ZodObject<Omit<{
8030
+ visible: z.ZodOptional<z.ZodBoolean>;
8031
+ color: z.ZodOptional<z.ZodString>;
8032
+ flipToFaceCamera: z.ZodOptional<z.ZodBoolean>;
8033
+ font: z.ZodOptional<z.ZodOptional<z.ZodString>>;
8034
+ fontSize: z.ZodOptional<z.ZodNumber>;
8035
+ margin: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>]>>;
8036
+ outlineColor: z.ZodOptional<z.ZodString>;
8037
+ outlineOpacity: z.ZodOptional<z.ZodNumber>;
8038
+ outlineBlur: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
8039
+ outlineWidth: z.ZodOptional<z.ZodNumber>;
8040
+ outlineOffsetX: z.ZodOptional<z.ZodNumber>;
8041
+ outlineOffsetY: z.ZodOptional<z.ZodNumber>;
8042
+ strokeWidth: z.ZodOptional<z.ZodNumber>;
8043
+ maxWidth: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
8044
+ maxHeight: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
8045
+ strokeOpacity: z.ZodOptional<z.ZodNumber>;
8046
+ strokeColor: z.ZodOptional<z.ZodString>;
8047
+ fillOpacity: z.ZodOptional<z.ZodNumber>;
8048
+ hoverColor: z.ZodOptional<z.ZodOptional<z.ZodString>>;
8049
+ id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
8050
+ type: z.ZodOptional<z.ZodLiteral<"text3d">>;
8051
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
8052
+ content: z.ZodOptional<z.ZodString>;
8053
+ }, "type" | "id">, "strict", z.ZodTypeAny, {
8054
+ maxWidth?: number | undefined;
8055
+ color?: string | undefined;
8056
+ position?: [number, number, number] | undefined;
8057
+ visible?: boolean | undefined;
8058
+ flipToFaceCamera?: boolean | undefined;
8059
+ font?: string | undefined;
8060
+ fontSize?: number | undefined;
8061
+ margin?: number | [number, number, number, number] | undefined;
8062
+ outlineColor?: string | undefined;
8063
+ outlineOpacity?: number | undefined;
8064
+ outlineBlur?: string | number | undefined;
8065
+ outlineWidth?: number | undefined;
8066
+ outlineOffsetX?: number | undefined;
8067
+ outlineOffsetY?: number | undefined;
8068
+ strokeWidth?: number | undefined;
8069
+ maxHeight?: number | undefined;
8070
+ strokeOpacity?: number | undefined;
8071
+ strokeColor?: string | undefined;
8072
+ fillOpacity?: number | undefined;
8073
+ hoverColor?: string | undefined;
8074
+ content?: string | undefined;
8075
+ }, {
8076
+ maxWidth?: number | undefined;
8077
+ color?: string | undefined;
8078
+ position?: [number, number, number] | undefined;
8079
+ visible?: boolean | undefined;
8080
+ flipToFaceCamera?: boolean | undefined;
8081
+ font?: string | undefined;
8082
+ fontSize?: number | undefined;
8083
+ margin?: number | [number, number, number, number] | undefined;
8084
+ outlineColor?: string | undefined;
8085
+ outlineOpacity?: number | undefined;
8086
+ outlineBlur?: string | number | undefined;
8087
+ outlineWidth?: number | undefined;
8088
+ outlineOffsetX?: number | undefined;
8089
+ outlineOffsetY?: number | undefined;
8090
+ strokeWidth?: number | undefined;
8091
+ maxHeight?: number | undefined;
8092
+ strokeOpacity?: number | undefined;
8093
+ strokeColor?: string | undefined;
8094
+ fillOpacity?: number | undefined;
8095
+ hoverColor?: string | undefined;
8096
+ content?: string | undefined;
8097
+ }>>;
8098
+ parentId: z.ZodOptional<z.ZodString>;
8099
+ }, "strict", z.ZodTypeAny, {
8100
+ parentId?: string | undefined;
8101
+ appearance?: {
8102
+ maxWidth?: number | undefined;
8103
+ color?: string | undefined;
8104
+ position?: [number, number, number] | undefined;
8105
+ visible?: boolean | undefined;
8106
+ flipToFaceCamera?: boolean | undefined;
8107
+ font?: string | undefined;
8108
+ fontSize?: number | undefined;
8109
+ margin?: number | [number, number, number, number] | undefined;
8110
+ outlineColor?: string | undefined;
8111
+ outlineOpacity?: number | undefined;
8112
+ outlineBlur?: string | number | undefined;
8113
+ outlineWidth?: number | undefined;
8114
+ outlineOffsetX?: number | undefined;
8115
+ outlineOffsetY?: number | undefined;
8116
+ strokeWidth?: number | undefined;
8117
+ maxHeight?: number | undefined;
8118
+ strokeOpacity?: number | undefined;
8119
+ strokeColor?: string | undefined;
8120
+ fillOpacity?: number | undefined;
8121
+ hoverColor?: string | undefined;
8122
+ content?: string | undefined;
8123
+ } | undefined;
8124
+ }, {
8125
+ parentId?: string | undefined;
8126
+ appearance?: {
8127
+ maxWidth?: number | undefined;
8128
+ color?: string | undefined;
8129
+ position?: [number, number, number] | undefined;
8130
+ visible?: boolean | undefined;
8131
+ flipToFaceCamera?: boolean | undefined;
8132
+ font?: string | undefined;
8133
+ fontSize?: number | undefined;
8134
+ margin?: number | [number, number, number, number] | undefined;
8135
+ outlineColor?: string | undefined;
8136
+ outlineOpacity?: number | undefined;
8137
+ outlineBlur?: string | number | undefined;
8138
+ outlineWidth?: number | undefined;
8139
+ outlineOffsetX?: number | undefined;
8140
+ outlineOffsetY?: number | undefined;
8141
+ strokeWidth?: number | undefined;
8142
+ maxHeight?: number | undefined;
8143
+ strokeOpacity?: number | undefined;
8144
+ strokeColor?: string | undefined;
8145
+ fillOpacity?: number | undefined;
8146
+ hoverColor?: string | undefined;
8147
+ content?: string | undefined;
8148
+ } | undefined;
8149
+ }>;
8150
+ export class Text3DComponent {
8151
+ mesh: Geometry3DObject3D;
8152
+ textMesh?: Text;
8153
+ readonly type = "text3d";
8154
+ feature: Feature<Point, Text3DProperties>;
8155
+ constructor(feature: Feature<Point, Text3DProperties>);
8156
+ get visible(): boolean;
8157
+ set visible(visible: boolean);
8158
+ parent?: GroupContainerObject3D;
8159
+ batchedText?: BatchedText;
8160
+ /**
8161
+ * if this Text3DComponent is a polygon label, populate this id with the polygon entity id
8162
+ * This id is used to prevent drawing text for the same polygon.
8163
+ */
8164
+ polygonEntityId?: string;
8165
+ }
8166
+ }
8167
+
8168
+ declare module '@mappedin/mappedin-js/geojson/src/entities/utils' {
8169
+ import type { CollisionRankingTier, GeometryState, LabelState, RendererCore } from '@mappedin/mappedin-js/geojson/src';
8170
+ import { type MarkerState } from '@mappedin/mappedin-js/geojson/src/components/marker';
8171
+ import type { PathUpdateState } from '@mappedin/mappedin-js/geojson/src/components/path';
8172
+ import type { EntityTypes, All3DTypes, Position, RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
8173
+ import type { KeysOfUnion } from '@mappedin/mappedin-js/geojson/src/utils';
8174
+ import { GeometryGroupObject3D, type GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
8175
+ import { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
8176
+ import type { Geometry3DTypes, TextGeometry3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
8177
+ import { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
8178
+ import { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/geometry2d';
8179
+ import type { StyleComponent } from '@mappedin/mappedin-js/geojson/src/components/styles/style';
8180
+ import type { GeometryGroupStyleComponent } from '@mappedin/mappedin-js/geojson/src/components/geometry-group-style';
8181
+ import { type Text3DState, type UpdatableText3DState } from '@mappedin/mappedin-js/geojson/src/components/text3d';
8182
+ export function updateInteractivity(entity: All3DTypes | Geometry2D, update: boolean | undefined, state: RendererState): boolean;
8183
+ export function updateGroupColor(entity: GeometryGroupObject3D, state: RendererState, update: Partial<Pick<GeometryGroupState, 'color' | 'topColor'>>): boolean | undefined;
8184
+ export function updateGroupShading(entity: GeometryGroupObject3D, update?: GeometryGroupState['shading']): boolean;
8185
+ export function updateImageProps(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Partial<GeometryState>): void;
8186
+ export function updateHeight(entity: Geometry3D | GeometryGroupObject3D, state: RendererState, update?: number): boolean;
8187
+ export function updateColor(entity: Geometry3DTypes | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Partial<GeometryState>): void;
8188
+ export function updatePosition(entity: EntityTypes, update: Position | undefined, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']): void;
8189
+ export function updateParent(entity: EntityTypes, update: GroupContainerObject3D | undefined): boolean;
8190
+ export function updateEnabled(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: boolean | undefined): void;
8191
+ export function updateMarker(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<MarkerState> | undefined, state: RendererState): boolean;
8192
+ export function updateRank(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: CollisionRankingTier | undefined): boolean;
8193
+ export function updateLabel(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<LabelState> | undefined, state: RendererState): void;
8194
+ export function updateHoverColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: string): void;
8195
+ /** Sets a geometry to be in hovered state, until manually unset or the user interacts with it. */
8196
+ export function updateHovered(entity: Geometry3D, update?: boolean): boolean;
8197
+ export function updateFlipImageToFaceCamera(entity: EntityTypes, update?: boolean): void;
8198
+ export function updateVisibility(entity: EntityTypes, update?: boolean): boolean;
8199
+ export function updateOpacity(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, state: RendererState, update?: number): boolean;
8200
+ export function updateGroupTexture(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Pick<GeometryGroupStyleComponent, 'texture' | 'topTexture'>): void;
8201
+ export function updateIndividualGeometryTexture(entity: Geometry3D, update?: Pick<StyleComponent, 'texture' | 'topTexture'>): boolean;
8202
+ export function updateIndividualGeometryOpacity(entity: Geometry3D, update?: number): boolean;
8203
+ export function updateAltitude(entity: EntityTypes, update?: number): boolean;
8204
+ export function updateOutline(entity: All3DTypes, update?: boolean): boolean;
8205
+ export function updateFocusable(entity: Geometry3D, update?: boolean): boolean;
8206
+ export function updateIndividualGeometryRenderOrder(entity: Geometry3D, update?: number): boolean;
8207
+ export function handlePathUpdate(geometry: Geometry3DTypes, update: PathUpdateState): void;
8208
+ export function pickPathOptions(update: PathUpdateState): Partial<PathUpdateState>;
8209
+ export function assetGeometryIsText3D(geometry: Geometry3DTypes): asserts geometry is TextGeometry3D;
8210
+ /**
8211
+ * @internal
8212
+ */
8213
+ export const TEXT3D_STYLE_UPDATE_PROPS: KeysOfUnion<UpdatableText3DState>[];
8214
+ /**
8215
+ * Handle state update of the text3d geometry.
8216
+ */
8217
+ export function handleText3DUpdate(geometry: TextGeometry3D, update: Partial<Text3DState>): void;
8218
+ }
8219
+
7557
8220
  declare module '@mappedin/mappedin-js/packages/geojson-navigator' {
7558
8221
  export * from '@mappedin/mappedin-js/packages/geojson-navigator/src';
7559
8222
  }
7560
8223
 
7561
8224
  declare module '@mappedin/mappedin-js/geojson/src/utils' {
7562
- import type { Box3, Camera as THREECamera } from 'three';
8225
+ import type { Box3, Object3D, Camera as THREECamera } from 'three';
7563
8226
  import { Box2 } from 'three';
7564
8227
  import { MercatorCoordinate } from '@mappedin/mappedin-js/packages/outdoor-context-v4';
7565
8228
  import type { CustomLayerInterface } from '@mappedin/mappedin-js/packages/outdoor-context-v4';
7566
8229
  import type { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
7567
8230
  import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
7568
8231
  import type { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/geometry2d';
7569
- import type { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
8232
+ import type { Geometry3DTypes } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
7570
8233
  import type { Position, RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
7571
8234
  import type { Camera } from '@mappedin/mappedin-js/geojson/src/camera';
7572
8235
  export function cartesianToGeographic(centerLat: number, centerLon: number, x: number, y: number): {
@@ -7577,7 +8240,7 @@ declare module '@mappedin/mappedin-js/geojson/src/utils' {
7577
8240
  x: number;
7578
8241
  y: number;
7579
8242
  };
7580
- export const populateGeometry3DIdsInScene: (tree: any, entities: RendererState["geometry3DIdsInScene"]) => Set<string | number>;
8243
+ export const populateGeometry3DIdsInScene: (tree: GroupContainerObject3D["children"][0] | Object3D, entities: RendererState["geometry3DIdsInScene"]) => Set<string | number>;
7581
8244
  export const populateGeometry2DIdsInScene: (tree: any, entities: Set<Geometry2D["id"]>) => Set<string | number>;
7582
8245
  export function convertMapLibreStylePaintProps(paint: any): {
7583
8246
  color: any;
@@ -7633,7 +8296,7 @@ declare module '@mappedin/mappedin-js/geojson/src/utils' {
7633
8296
  * so OR = CO * tan(F/2)
7634
8297
  */
7635
8298
  export function getProjectionScaleFactor(FOV: number, canvasHeight: number, zoom: number): number;
7636
- export function getGeometryByGeometryId(state: RendererState, geometryOrGeometryId?: string | number | Record<string, any>): Geometry3D | GroupContainerObject3D | GeometryGroupObject3D | Geometry2D | undefined;
8299
+ export function getGeometryByGeometryId(state: RendererState, geometryOrGeometryId?: string | number | Record<string, any>): Geometry3DTypes | GeometryGroupObject3D | GroupContainerObject3D | Geometry2D | undefined;
7637
8300
  export function getBoundingBoxCenter(bbox: Position[]): [number, number];
7638
8301
  export { getCornersOfBoundingBox } from '@mappedin/mappedin-js/geojson/src/utils/bounding-box';
7639
8302
  export function isFiniteBox(box: Box2 | Box3): boolean;
@@ -7642,6 +8305,7 @@ declare module '@mappedin/mappedin-js/geojson/src/utils' {
7642
8305
  export { shouldDisableOffscreenCanvas } from '@mappedin/mappedin-js/geojson/src/utils/browser';
7643
8306
  export { noop, pick, isEmpty, type KeysOfUnion } from '@mappedin/mappedin-js/geojson/src/utils/fp';
7644
8307
  export { transformRequest } from '@mappedin/mappedin-js/geojson/src/utils/tranform-request';
8308
+ export { normalizeAngle } from '@mappedin/mappedin-js/geojson/src/utils/math';
7645
8309
  }
7646
8310
 
7647
8311
  declare module '@mappedin/mappedin-js/geojson/src/utils/constants' {
@@ -7652,56 +8316,26 @@ declare module '@mappedin/mappedin-js/geojson/src/utils/constants' {
7652
8316
  }
7653
8317
  }
7654
8318
 
7655
- declare module '@mappedin/mappedin-js/geojson/src/services/renderer' {
7656
- import type { Scene, Camera } from 'three';
7657
- import { Color, WebGL1Renderer, WebGLRenderer } from 'three';
7658
- export function enableTestMode(): void;
7659
- export type TRendererOptions = {
7660
- alpha: boolean;
7661
- onWebGLRendererError: (e: Error) => void;
7662
- xRayPath: boolean;
8319
+ declare module '@mappedin/mappedin-js/geojson/src/utils/debug' {
8320
+ import type Core from '@mappedin/mappedin-js/geojson/src/renderer';
8321
+ const DEFAULT_DEBUG_STATE: {
8322
+ showPolygonLabelTextAreaMesh: boolean;
7663
8323
  };
7664
- export class Renderer {
7665
- backgroundAlpha: number;
7666
- backgroundColor: Color;
7667
- width: number;
7668
- height: number;
7669
- options: TRendererOptions;
7670
- renderer?: WebGLRenderer | WebGL1Renderer;
7671
- constructor(renderOptions: any, targetWebGLVersion?: number);
7672
- /**
7673
- * Dispose of the renderer and its buffers.
7674
- */
7675
- destroy(): void;
7676
- /**
7677
- * Re-render the scene, depending on which parts of the scene have been
7678
- * invalidated.
7679
- *
7680
- * @method render
7681
- * @param renderTarget {null or WebGLRenderTarget}
7682
- * @param scene {Scene}
7683
- * @param sceneCamera {Camera}
7684
- */
7685
- render(scene: Scene, sceneCamera: Camera): void;
7686
- clear(): void;
7687
- /**
7688
- * Set the size of the renderer, composer, and all its internal buffers.
7689
- *
7690
- * @method setBufferSize
7691
- * @param width {number}
7692
- * @param height {number}
7693
- */
7694
- setBufferSize(width: number, height: number): void;
7695
- /**
7696
- * Set the color and opacity that will be drawn behind the scene.
7697
- *
7698
- * @method setBackgroundColor
7699
- * @param color {Color}
7700
- * @param alpha {number}
7701
- */
7702
- setBackgroundColor(color: any, alpha: any): void;
7703
- domElement(): HTMLCanvasElement | undefined;
8324
+ export type DebugState = typeof DEFAULT_DEBUG_STATE;
8325
+ export class Debug {
8326
+ state: {
8327
+ showPolygonLabelTextAreaMesh: boolean;
8328
+ };
8329
+ core: Core;
8330
+ constructor(core: Core);
8331
+ update(updateState: Partial<DebugState>): void;
7704
8332
  }
8333
+ export {};
8334
+ }
8335
+
8336
+ declare module '@mappedin/mappedin-js/geojson/src/services/test-mode' {
8337
+ export function enableTestMode(): void;
8338
+ export function isTestMode(): boolean;
7705
8339
  }
7706
8340
 
7707
8341
  declare module '@mappedin/mappedin-js/geojson/src/systems/watermark/system' {
@@ -7789,9 +8423,39 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/watermark/system' {
7789
8423
  }
7790
8424
  }
7791
8425
 
7792
- declare module '@mappedin/mappedin-js/geojson/src/systems/exporter' {
7793
- export { ExporterSystem, type GLTFExportOptions } from '@mappedin/mappedin-js/geojson/src/systems/exporter/exporter';
7794
- }
8426
+ declare module '@mappedin/mappedin-js/geojson/src/systems/text3d/system' {
8427
+ import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
8428
+ import type { RendererCore } from '@mappedin/mappedin-js/geojson/src';
8429
+ import { PubSub } from '@packages/internal/common';
8430
+ import type { BatchedText } from '@mappedin/mappedin-js/geojson/src/services/text3d/text3d';
8431
+ import { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
8432
+ import type { Text } from 'troika-three-text';
8433
+ export class Text3DSystem extends PubSub<{
8434
+ render: undefined;
8435
+ }> {
8436
+ textSet: Set<string>;
8437
+ batchedTextMap: Map<GroupContainerObject3D, Promise<BatchedText>>;
8438
+ remove(id: string): void;
8439
+ constructor(rendererState: RendererState, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']);
8440
+ update(cameraRotationRadians: number): Promise<void[]>;
8441
+ showTextAreaMesh(): void;
8442
+ hideTextAreaMesh(): void;
8443
+ }
8444
+ /**
8445
+ * Preload fonts and optionally pre-generate the SDF textures for particular glyphs up front.
8446
+ * This is to avoid ondemand font generation can take long.
8447
+ * @param fontUrl - url of the font file served.
8448
+ * @returns A promise that resolves when the font is loaded
8449
+ *
8450
+ */
8451
+ export function preloadFont(fontUrl?: string): Promise<string>;
8452
+ export function doesBatchedTextContainsText(batchedText: BatchedText, text: Text): boolean;
8453
+ export const DEFAULT_VERTICAL_OFFSET = 0.5;
8454
+ }
8455
+
8456
+ declare module '@mappedin/mappedin-js/geojson/src/systems/exporter' {
8457
+ export { ExporterSystem, type GLTFExportOptions } from '@mappedin/mappedin-js/geojson/src/systems/exporter/exporter';
8458
+ }
7795
8459
 
7796
8460
  declare module '@mappedin/mappedin-js/geojson/src/systems/html-controls/system' {
7797
8461
  import type { Map } from '@mappedin/mappedin-js/packages/outdoor-context-v4';
@@ -7828,15 +8492,21 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/html-controls/system'
7828
8492
  }
7829
8493
  }
7830
8494
 
8495
+ declare module '@mappedin/mappedin-js/geojson/src/components/styles' {
8496
+ export { StyleComponent, DEFAULT_COLOR, type MaterialSide } from '@mappedin/mappedin-js/geojson/src/components/styles/style';
8497
+ export { Text3DStyleComponent, type Text3DStyle, DEFAULT_TEXT_STYLE } from '@mappedin/mappedin-js/geojson/src/components/styles/text-style';
8498
+ }
8499
+
7831
8500
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
7832
8501
  import type { Position, RendererCore, WatermarkOptions } from '@mappedin/core-sdk';
7833
8502
  import { type TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
7834
8503
  import { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
7835
8504
  import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
7836
8505
  import type { FloorStack, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
7837
- import { Coordinate, MapObject, Space, Floor, Door } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
8506
+ import { Facade, Coordinate, MapObject, Space, Floor, Door } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
7838
8507
  import type { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
7839
- import { Label, Marker, type Model, type Image, Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
8508
+ import { Label, Marker, Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
8509
+ import { Text3D as Text3DView, type Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
7840
8510
  import { Navigation } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
7841
8511
  import type { TGetState, TUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/types';
7842
8512
  import { Camera } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera';
@@ -7852,6 +8522,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
7852
8522
  import { Shapes } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes';
7853
8523
  import { Style } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/style';
7854
8524
  import Outdoor from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor';
8525
+ import { Text3D } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/text3d';
7855
8526
  export class GeoJsonApi {
7856
8527
  core: RendererCore;
7857
8528
  mapObjects: GeojsonApiMapObject[];
@@ -7865,6 +8536,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
7865
8536
  mapView: MapView;
7866
8537
  Camera: Camera;
7867
8538
  Labels: Labels;
8539
+ Text3D: Text3D;
7868
8540
  Markers: Markers;
7869
8541
  Models: Models;
7870
8542
  Paths: Paths;
@@ -7878,7 +8550,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
7878
8550
  get DynamicFocus(): import("./dynamic-focus").DynamicFocus;
7879
8551
  get StackedMaps(): import("..").StackedMaps;
7880
8552
  constructor(rendererCore: RendererCore, mapView: MapView);
7881
- updateState<T extends Space | MapObject | Label | Shape | Marker | Door | WALLS | DOORS | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
8553
+ updateState<T extends Space | Text3DView | MapObject | Label | Shape | Marker | Door | Facade | WALLS | DOORS | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
7882
8554
  update: () => void;
7883
8555
  getMapDataInternal(): MapDataInternal | undefined;
7884
8556
  getMapData(): MapData | undefined;
@@ -7888,7 +8560,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
7888
8560
  updateWatermark(options: Omit<WatermarkOptions, 'onClick'>): void;
7889
8561
  get currentFloorStack(): FloorStack;
7890
8562
  get currentFloor(): Floor;
7891
- getState<T extends Space | MapObject | Label | Marker | Shape | Model | Image | string>(target: T): TGetState<T> | undefined;
8563
+ getState<T extends Space | Text3DView | MapObject | Label | Marker | Image | Shape | string>(target: T): TGetState<T>;
7892
8564
  setHoverColor(c: string): void;
7893
8565
  getHoverColor(): string | undefined;
7894
8566
  createCoordinate(latitude: number, longitude: number, floor?: Floor): Coordinate;
@@ -7911,16 +8583,17 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
7911
8583
  import type { Position, AddLabelOptions, RendererCore, PathState, MarkerState, LineStyle, PaintStyle, EntityId } from '@mappedin/core-sdk';
7912
8584
  import { FloorObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object';
7913
8585
  import type { Coordinate, Directions, Floor, TAddMarkerOptions, TAddPathOptions, TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
7914
- import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddModel, TAddImageOptions, TDirectionInstruction } from '@mappedin/mappedin-js/mappedin-js/src/types';
8586
+ import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddModel, TAddImageOptions, TDirectionInstruction, TAddText3DOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
7915
8587
  import { type AggregatedStyleMap } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils';
7916
8588
  import { StackedMaps } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
7917
8589
  import type { TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
7918
8590
  import type { Path, Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
7919
- import type { Space, Door, PointOfInterest, MapObject, Node, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
8591
+ import type { Door, PointOfInterest, MapObject, Node, MapDataInternal, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
7920
8592
  import { type GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
7921
8593
  import { FloorStackObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-stack-object';
7922
8594
  import { DynamicFocus } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/dynamic-focus';
7923
8595
  export const FLOOR_HEIGHT = 5;
8596
+ import type { Text3DState } from '@mappedin/core-sdk/src/components/text3d';
7924
8597
  export class GeojsonApiMapObject extends PubSub<{
7925
8598
  'floor-change': {
7926
8599
  reason?: TFloorChangeReason;
@@ -7968,7 +8641,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
7968
8641
  Images: {
7969
8642
  add: (target: Position, url: string, opts: TAddImageOptions & {
7970
8643
  floorId?: string;
7971
- }) => EntityId<import("../../../geojson/src/components/image").ImageState> | undefined;
8644
+ }) => EntityId<import("@mappedin/core-sdk/src/components/image").ImageState> | undefined;
7972
8645
  remove: (id: string) => void;
7973
8646
  removeAll: () => void;
7974
8647
  };
@@ -7989,6 +8662,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
7989
8662
  }) => string;
7990
8663
  remove: (customGeometry: Shape) => string;
7991
8664
  };
8665
+ Text3D: {
8666
+ label: (target: Space, content?: string, options?: TAddText3DOptions) => Text3DInfo | undefined;
8667
+ labelAll: (option?: TAddText3DOptions) => Text3DInfo[];
8668
+ remove: (id: string) => string | undefined;
8669
+ };
7992
8670
  Labels: {
7993
8671
  all: ({ onCreate, }: {
7994
8672
  onCreate: (labelId: string | number, text: string, target: Space | Door | Coordinate | PointOfInterest | MapObject | Node) => void;
@@ -8010,6 +8688,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
8010
8688
  };
8011
8689
  constructor(id: string, mapDataInternal: MapDataInternal | undefined, options: TShow3DMapOptions | undefined, api: GeoJsonApi);
8012
8690
  }
8691
+ export type Text3DInfo = {
8692
+ target: Space;
8693
+ textInfo: EntityId<Text3DState>;
8694
+ };
8013
8695
  }
8014
8696
 
8015
8697
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/label' {
@@ -8257,6 +8939,39 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/shape' {
8257
8939
  }
8258
8940
  }
8259
8941
 
8942
+ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/text3d' {
8943
+ import type { Space, EnterpriseLocation } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
8944
+ /**
8945
+ * Class representing an Text3D on the {@link MapView}.
8946
+ */
8947
+ export class Text3D {
8948
+ /**
8949
+ * The text3d's id
8950
+ */
8951
+ readonly id: string;
8952
+ /**
8953
+ * @internal
8954
+ */
8955
+ constructor(id: string, target: Space | EnterpriseLocation);
8956
+ /**
8957
+ * The text3d's target
8958
+ */
8959
+ readonly target: Space | EnterpriseLocation;
8960
+ /**
8961
+ * @internal
8962
+ */
8963
+ static readonly __type = "Text3D";
8964
+ readonly __type = "Text3D";
8965
+ /**
8966
+ * Checks if the provided instance is of type Text3D
8967
+ *
8968
+ * @param instance The instance to check.
8969
+ * @returns {boolean} True if the instance is a text3d, false otherwise.
8970
+ */
8971
+ static is(instance: object): instance is Text3D;
8972
+ }
8973
+ }
8974
+
8260
8975
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera' {
8261
8976
  import type { TCameraAnimationOptions, TCameraFocusOnTarget, TCameraTarget, TFocusOnOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
8262
8977
  import type { InsetPadding, RendererCore } from '@mappedin/core-sdk';
@@ -8577,7 +9292,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/markers' {
8577
9292
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/models' {
8578
9293
  import type { TAddModelOptions, TAddModel } from '@mappedin/mappedin-js/mappedin-js/src/types';
8579
9294
  import { Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
8580
- import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
9295
+ import type { CurrentMapGetter } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/types';
8581
9296
  /**
8582
9297
  * Adding 3D models to a map can be a great way to represent landmarks to help users find key locations. They could also be used to show the location of assets or represent furniture to provide a rich indoor layout.
8583
9298
 
@@ -8596,7 +9311,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/models' {
8596
9311
  /**
8597
9312
  * @internal
8598
9313
  */
8599
- get currentMap(): GeojsonApiMapObject | undefined;
9314
+ get currentMap(): import("./map-object").GeojsonApiMapObject | undefined;
8600
9315
  /**
8601
9316
  * @internal
8602
9317
  */
@@ -8638,8 +9353,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/models' {
8638
9353
  */
8639
9354
  removeAll(): Model[];
8640
9355
  }
8641
- type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
8642
- export {};
8643
9356
  }
8644
9357
 
8645
9358
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/paths' {
@@ -9832,20 +10545,24 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry3d' {
9832
10545
  import type { MeshComponent } from '@mappedin/mappedin-js/geojson/src/components/mesh';
9833
10546
  import type { ModelComponent } from '@mappedin/mappedin-js/geojson/src/components/model';
9834
10547
  import type { PathComponent } from '@mappedin/mappedin-js/geojson/src/components/path';
9835
- import type { StyleComponent } from '@mappedin/mappedin-js/geojson/src/components/style';
10548
+ import type { StyleComponent } from '@mappedin/mappedin-js/geojson/src/components/styles/style';
9836
10549
  import type { ImageComponent } from '@mappedin/mappedin-js/geojson/src/components/image';
9837
10550
  import type { CustomGeometryComponent } from '@mappedin/mappedin-js/geojson/src/components/custom';
9838
10551
  import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
9839
10552
  import type { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
10553
+ import type { Text3DComponent } from '@mappedin/mappedin-js/geojson/src/components/text3d';
10554
+ import type { Text3DStyleComponent } from '@mappedin/mappedin-js/geojson/src/components/styles';
9840
10555
  export enum Geometry3DComponents {
9841
10556
  Mesh = 0,
9842
10557
  Style = 1,
9843
10558
  Interaction = 2
9844
10559
  }
10560
+ type Geometry3DObjectTypes = 'geometry' | 'path' | 'model' | 'custom-geometry' | 'image' | 'text3d';
9845
10561
  export class Geometry3DObject3D extends Object3D {
10562
+ type: Geometry3DObjectTypes;
9846
10563
  userData: {
9847
10564
  entityId: string;
9848
- type: 'geometry' | 'path' | 'model' | 'custom-geometry' | 'image';
10565
+ type: Geometry3DObjectTypes;
9849
10566
  };
9850
10567
  }
9851
10568
  export type PathMaterial = ShaderMaterial & {
@@ -9855,15 +10572,23 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry3d' {
9855
10572
  export class PatMeshContainer extends Geometry3DObject3D {
9856
10573
  children: [PathMesh, PathMesh];
9857
10574
  }
9858
- export type MeshComponentTypes = MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent | ImageComponent;
9859
- export class Geometry3D {
10575
+ export type MeshComponentTypes = MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent | Text3DComponent | ImageComponent;
10576
+ type MappedComponentType<M> = M extends MeshComponent ? 'geometry' : M extends PathComponent ? 'path' : M extends ModelComponent ? 'model' : M extends CustomGeometryComponent ? 'custom-geometry' : M extends ImageComponent ? 'image' : M extends Text3DComponent ? 'text3d' : never;
10577
+ export class Geometry3D<M extends MeshComponentTypes = MeshComponent, S extends StyleComponent | Text3DStyleComponent = StyleComponent, I extends InteractionComponent = InteractionComponent, T extends MappedComponentType<M> = MappedComponentType<M>> {
9860
10578
  id: string | number;
9861
- components: [MeshComponentTypes, StyleComponent, InteractionComponent?];
9862
- get object3d(): Geometry3DObject3D | PatMeshContainer | import("../components/mesh").EntityBatchedMesh | undefined;
10579
+ components: [M, S, I?];
10580
+ get object3d(): M["mesh"];
9863
10581
  get parent(): GroupContainerObject3D | GeometryGroupObject3D | null;
9864
- get type(): 'geometry' | 'path' | 'model' | 'custom-geometry' | 'image';
9865
- constructor(meshComponent: MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent | ImageComponent, styleComponent: StyleComponent);
9866
- }
10582
+ get type(): T;
10583
+ constructor(meshComponent: M, styleComponent: S);
10584
+ }
10585
+ export type TextGeometry3D = Geometry3D<Text3DComponent, Text3DStyleComponent, InteractionComponent, 'text3d'>;
10586
+ export type CustomGeometry3D = Geometry3D<CustomGeometryComponent, StyleComponent, InteractionComponent, 'custom-geometry'>;
10587
+ export type ModelGeometry3D = Geometry3D<ModelComponent, StyleComponent, InteractionComponent, 'model'>;
10588
+ export type PathGeometry3D = Geometry3D<PathComponent, StyleComponent, InteractionComponent, 'path'>;
10589
+ export type ImageGeometry3D = Geometry3D<ImageComponent, StyleComponent, InteractionComponent, 'image'>;
10590
+ export type MeshGeometry3D = Geometry3D<MeshComponent, StyleComponent, InteractionComponent, 'geometry'>;
10591
+ export type Geometry3DTypes = TextGeometry3D | CustomGeometry3D | PathGeometry3D | ImageGeometry3D | MeshGeometry3D | ModelGeometry3D;
9867
10592
  export interface PathUniforms {
9868
10593
  vertexes: {
9869
10594
  type: 'f';
@@ -9946,6 +10671,7 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry3d' {
9946
10671
  value: number;
9947
10672
  };
9948
10673
  }
10674
+ export {};
9949
10675
  }
9950
10676
 
9951
10677
  declare module '@mappedin/mappedin-js/geojson/src/entities/geometry2d' {
@@ -9959,6 +10685,7 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry2d' {
9959
10685
  Interaction = 1
9960
10686
  }
9961
10687
  export class Geometry2DObject3D extends Object3D {
10688
+ readonly type: "geometry2dObject3d";
9962
10689
  }
9963
10690
  export class Geometry2D {
9964
10691
  id: string | number;
@@ -9987,17 +10714,44 @@ declare module '@mappedin/mappedin-js/geojson/src/components/stack' {
9987
10714
 
9988
10715
  declare module '@mappedin/mappedin-js/geojson/src/components/interaction' {
9989
10716
  export class InteractionComponent {
9990
- hover: boolean;
10717
+ hover: boolean | 'user-interaction';
9991
10718
  dirty: boolean;
9992
10719
  }
9993
10720
  }
9994
10721
 
10722
+ declare module '@mappedin/mappedin-js/geojson/src/services/text3d/text3d' {
10723
+ import { type Text3DStyleComponent } from '@mappedin/mappedin-js/geojson/src/components/styles';
10724
+ import { Text, BatchedText } from 'troika-three-text';
10725
+ import type { RendererCore } from '@mappedin/mappedin-js/geojson/src';
10726
+ import type { Text3DComponent } from '@mappedin/mappedin-js/geojson/src/components/text3d';
10727
+ export function createTroikaText(entityId: string | number, text3DComponent: Text3DComponent, styleComponent: Text3DStyleComponent, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']): Promise<{
10728
+ text: Text;
10729
+ } | undefined>;
10730
+ export { BatchedText, Text };
10731
+ /**
10732
+ * typeof module is forbiten in typescript. see: [@typescript-eslint/consistent-type-imports]
10733
+ */
10734
+ export type ModuleType = {
10735
+ createTroikaText: typeof createTroikaText;
10736
+ preloadFont: typeof preloadFont;
10737
+ BatchedText: typeof BatchedText;
10738
+ };
10739
+ /**
10740
+ * Preloads a font from the given URL. Enable developer to preload font way before scene is ready
10741
+ *
10742
+ * @param fontUrl - The URL of the font to preload. When undefined, default font (Roboto) is loaded
10743
+ * @returns A promise that resolves when the font is successfully preloaded, or rejects with an error if the font cannot be loaded.
10744
+ */
10745
+ export function preloadFont(fontUrl?: string): Promise<string>;
10746
+ }
10747
+
9995
10748
  declare module '@mappedin/mappedin-js/geojson/src/components/geometry-group-style' {
9996
10749
  import { type Shading } from '@mappedin/mappedin-js/geojson/src/types';
9997
10750
  type GeometryGroupStyle = {
9998
10751
  color: string;
9999
10752
  topColor?: string;
10000
10753
  opacity: number;
10754
+ height?: number;
10001
10755
  shading?: Shading;
10002
10756
  outline: boolean;
10003
10757
  texture?: string;
@@ -10008,6 +10762,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/geometry-group-styl
10008
10762
  color: string;
10009
10763
  topColor?: string;
10010
10764
  opacity: number;
10765
+ height?: number;
10011
10766
  outline: boolean;
10012
10767
  texture?: string;
10013
10768
  topTexture?: string;
@@ -10154,68 +10909,6 @@ declare module '@mappedin/mappedin-js/geojson/src/components/image' {
10154
10909
  }
10155
10910
  }
10156
10911
 
10157
- declare module '@mappedin/mappedin-js/geojson/src/entities' {
10158
- export { updateInteractivity } from '@mappedin/mappedin-js/geojson/src/entities/utils';
10159
- export { Geometry2D, Geometry2DComponents } from '@mappedin/mappedin-js/geojson/src/entities/geometry2d';
10160
- export { Geometry3D, Geometry3DComponents, type PathMesh, type PatMeshContainer, type PathMaterial, } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
10161
- }
10162
-
10163
- declare module '@mappedin/mappedin-js/geojson/src/components/style' {
10164
- import type { LineStyle } from '@mappedin/mappedin-js/geojson/src/renderer';
10165
- export const DEFAULT_COLOR = "#ffffff";
10166
- export const DEFAULT_HEIGHT = 0.1;
10167
- /**
10168
- * Determines how a material is rendered, back face, front face or both (default)
10169
- */
10170
- export type MaterialSide = 'back' | 'front' | 'double';
10171
- type Style = {
10172
- color: string;
10173
- width: number;
10174
- opacity: number;
10175
- visible: boolean;
10176
- height: number;
10177
- altitude: number;
10178
- join: LineStyle['join'];
10179
- cap: LineStyle['cap'];
10180
- topColor?: string;
10181
- texture?: string;
10182
- topTexture?: string;
10183
- outline: boolean;
10184
- showImage: boolean;
10185
- showTextLabel: boolean;
10186
- flipImageToFaceCamera: boolean;
10187
- flipTextToFaceCamera: boolean;
10188
- url?: string;
10189
- side?: MaterialSide;
10190
- };
10191
- export class StyleComponent implements Style {
10192
- initialColor: string;
10193
- color: string;
10194
- topColor?: string;
10195
- topTexture?: string;
10196
- texture?: string;
10197
- hoverColor?: string;
10198
- dirty: boolean;
10199
- visible: boolean;
10200
- opacity: number;
10201
- width: number;
10202
- height: number;
10203
- initialHeight: number;
10204
- altitude: number;
10205
- join: LineStyle['join'];
10206
- cap: LineStyle['cap'];
10207
- outline: boolean;
10208
- showImage: boolean;
10209
- showTextLabel: boolean;
10210
- flipImageToFaceCamera: boolean;
10211
- flipTextToFaceCamera: boolean;
10212
- url?: string;
10213
- side: MaterialSide;
10214
- constructor(style?: Partial<Style>);
10215
- }
10216
- export {};
10217
- }
10218
-
10219
10912
  declare module '@mappedin/mappedin-js/geojson/src/types/options' {
10220
10913
  import type { Position } from '@mappedin/mappedin-js/geojson/src/types/geometry';
10221
10914
  import type { Map as MapLibreMap } from '@mappedin/mappedin-js/packages/outdoor-context-v4';
@@ -10344,38 +11037,71 @@ declare module '@mappedin/mappedin-js/packages/common/pubsub' {
10344
11037
  }
10345
11038
  }
10346
11039
 
10347
- declare module '@mappedin/mappedin-js/geojson/src/systems/interactions' {
10348
- export { InteractionSystem } from '@mappedin/mappedin-js/geojson/src/systems/interactions/system';
10349
- }
10350
-
10351
- declare module '@mappedin/mappedin-js/geojson/src/systems/zoom-interpolation/zoom-interpolation' {
10352
- import { PubSub } from '@mappedin/mappedin-js/packages/common/pubsub';
10353
- import LabelComponent from '@mappedin/mappedin-js/geojson/src/components/label';
10354
- import type { MarkerComponent } from '@mappedin/mappedin-js/geojson/src/components/marker';
10355
- import { MeshComponent } from '@mappedin/mappedin-js/geojson/src/components/mesh';
10356
- type SomeEvent = {
10357
- 'invalidate:2d': undefined;
11040
+ declare module '@mappedin/mappedin-js/geojson/src/services/renderer' {
11041
+ import type { Scene, Camera } from 'three';
11042
+ import { Color, WebGL1Renderer, WebGLRenderer } from 'three';
11043
+ export type TRendererOptions = {
11044
+ alpha: boolean;
11045
+ onWebGLRendererError: (e: Error) => void;
11046
+ xRayPath: boolean;
10358
11047
  };
10359
- export class ZoomInterpolationSystem extends PubSub<SomeEvent, keyof SomeEvent> {
10360
- constructor();
10361
- interpolators: Map<any, any>;
10362
- addEntity3D(meshComponent: MeshComponent, interpolateProps: any): void;
10363
- addEntity2D(uiComponent: MarkerComponent | LabelComponent, interpolateProps: any): void;
10364
- addAny(id: string, interpolateFn: any): void;
10365
- update: (zoomLevel: number) => void;
10366
- destroy(): void;
11048
+ export class Renderer {
11049
+ backgroundAlpha: number;
11050
+ backgroundColor: Color;
11051
+ width: number;
11052
+ height: number;
11053
+ options: TRendererOptions;
11054
+ renderer?: WebGLRenderer | WebGL1Renderer;
11055
+ constructor(renderOptions: any, targetWebGLVersion?: number);
11056
+ /**
11057
+ * Dispose of the renderer and its buffers.
11058
+ */
11059
+ destroy(): void;
11060
+ /**
11061
+ * Re-render the scene, depending on which parts of the scene have been
11062
+ * invalidated.
11063
+ *
11064
+ * @method render
11065
+ * @param renderTarget {null or WebGLRenderTarget}
11066
+ * @param scene {Scene}
11067
+ * @param sceneCamera {Camera}
11068
+ */
11069
+ render(scene: Scene, sceneCamera: Camera): void;
11070
+ clear(): void;
11071
+ /**
11072
+ * Set the size of the renderer, composer, and all its internal buffers.
11073
+ *
11074
+ * @method setBufferSize
11075
+ * @param width {number}
11076
+ * @param height {number}
11077
+ */
11078
+ setBufferSize(width: number, height: number): void;
11079
+ /**
11080
+ * Set the color and opacity that will be drawn behind the scene.
11081
+ *
11082
+ * @method setBackgroundColor
11083
+ * @param color {Color}
11084
+ * @param alpha {number}
11085
+ */
11086
+ setBackgroundColor(color: any, alpha: any): void;
11087
+ domElement(): HTMLCanvasElement | undefined;
10367
11088
  }
10368
- export {};
11089
+ }
11090
+
11091
+ declare module '@mappedin/mappedin-js/geojson/src/systems/interactions' {
11092
+ export { InteractionSystem } from '@mappedin/mappedin-js/geojson/src/systems/interactions/system';
10369
11093
  }
10370
11094
 
10371
11095
  declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-optimization/system' {
10372
11096
  import type { BufferGeometry } from 'three';
10373
11097
  import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
10374
11098
  import { Geometry3D, Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
10375
- import { type MeshComponentProperties } from '@mappedin/mappedin-js/geojson/src/components/mesh';
11099
+ import { MeshComponent, type MeshComponentProperties } from '@mappedin/mappedin-js/geojson/src/components/mesh';
11100
+ import { StyleComponent } from '@mappedin/mappedin-js/geojson/src/components/styles/style';
10376
11101
  import type { Feature, LineString, MultiPolygon, Point, Polygon } from 'geojson';
10377
11102
  import type { LineStyle, ModelProperties, ModelStyle, PaintStyle } from '@mappedin/mappedin-js/geojson/src/types';
10378
11103
  import type { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
11104
+ import type { ModelGeometry3D } from '@mappedin/mappedin-js/geojson/src/entities';
10379
11105
  import { PubSub } from '@packages/internal/common';
10380
11106
  export class MeshCreationAndOptimizationSystem extends PubSub<{
10381
11107
  'model-loaded': void;
@@ -10385,8 +11111,8 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-opti
10385
11111
  loader?: GLTFLoader;
10386
11112
  constructor(state: RendererState, convertTo3DMapPosition: any);
10387
11113
  getGLTFLoader(): Promise<void>;
10388
- createEntityFromFeature(id: string | number, feature: Feature<Polygon | LineString | MultiPolygon, MeshComponentProperties>, style?: LineStyle | PaintStyle): Geometry3D;
10389
- createModelFromFeature(id: string | number, feature: Feature<Point, ModelProperties>, style?: ModelStyle): Geometry3D;
11114
+ createEntityFromFeature(id: string | number, feature: Feature<Polygon | LineString | MultiPolygon, MeshComponentProperties>, style?: LineStyle | PaintStyle): Geometry3D<MeshComponent, StyleComponent, import("../../components/interaction").InteractionComponent, "geometry">;
11115
+ createModelFromFeature(id: string | number, feature: Feature<Point, ModelProperties>, style?: ModelStyle): ModelGeometry3D;
10390
11116
  populateEntityMesh(entity: Geometry3D, geometry: BufferGeometry): void;
10391
11117
  populateModelGroup(entities: Set<string | number>, url: string, tree: any): Promise<Geometry3DObject3D>;
10392
11118
  populateEntityGroup(entities: Set<string | number>): Set<string | number>;
@@ -10470,9 +11196,9 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/2d-draw/system' {
10470
11196
  declare module '@mappedin/mappedin-js/geojson/src/systems/draw/system' {
10471
11197
  import { PubSub } from '@packages/internal/common';
10472
11198
  import { MeshComponent } from '@mappedin/mappedin-js/geojson/src/components/mesh';
10473
- import { StyleComponent } from '@mappedin/mappedin-js/geojson/src/components/style';
11199
+ import type { StyleComponent } from '@mappedin/mappedin-js/geojson/src/components/styles/style';
10474
11200
  import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
10475
- import { InteractionComponent } from '@mappedin/mappedin-js/geojson/src/components/interaction';
11201
+ import type { InteractionComponent } from '@mappedin/mappedin-js/geojson/src/components/interaction';
10476
11202
  import type { GeometryGroupStyleComponent } from '@mappedin/mappedin-js/geojson/src/components/geometry-group-style';
10477
11203
  export class DrawSystem extends PubSub<{
10478
11204
  'texture-loaded': void;
@@ -10519,7 +11245,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/render/system' {
10519
11245
  constructor(renderer: Renderer, state: RendererState, mode: RendererCore['mode'], scene: Scene, cameraObject: PerspectiveCamera, viewCamera: Camera, systems: Systems);
10520
11246
  twoDdirty: boolean;
10521
11247
  threeDdirty: boolean;
10522
- update: (sync?: boolean) => void;
11248
+ update: (sync?: boolean) => Promise<any>;
10523
11249
  destroy(): void;
10524
11250
  }
10525
11251
  }
@@ -10835,7 +11561,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/path' {
10835
11561
  }
10836
11562
 
10837
11563
  declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-detachment/system' {
10838
- import { type Geometry3DTypes, type RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
11564
+ import { type All3DTypes, type RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
10839
11565
  /**
10840
11566
  * This system is responsible for updating the opacity of the mesh, which results in the mesh
10841
11567
  * being detached from the parent's optimized geometry group and rendered as a separate mesh.
@@ -10845,16 +11571,13 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-detachment/system
10845
11571
  rendererState: RendererState;
10846
11572
  dirty: boolean;
10847
11573
  constructor(rendererState: RendererState);
10848
- updateOne(geometry: Geometry3DTypes | undefined): void;
11574
+ updateOne(geometry: All3DTypes | undefined): void;
10849
11575
  update(): void;
10850
11576
  }
10851
11577
  }
10852
11578
 
10853
11579
  declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-modification/system' {
10854
- import { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities';
10855
- import type { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
10856
- import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
10857
- import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
11580
+ import type { EntityTypes, RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
10858
11581
  /**
10859
11582
  * Any physical changes to geometry should go in here. This includes height changes, etc.
10860
11583
  * This is to ensure that physical changes apply before any other systems need to do their work,
@@ -10867,7 +11590,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-modification/syst
10867
11590
  rendererState: RendererState;
10868
11591
  dirty: boolean;
10869
11592
  constructor(rendererState: RendererState);
10870
- updateOne(entity: Geometry3D | GeometryGroupObject3D | GroupContainerObject3D | undefined): void;
11593
+ updateOne(entity?: EntityTypes): void;
10871
11594
  update(): void;
10872
11595
  cleanup(): void;
10873
11596
  }
@@ -10886,14 +11609,58 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/pre-render/system' {
10886
11609
  }
10887
11610
  }
10888
11611
 
10889
- declare module '@mappedin/mappedin-js/geojson/src/systems/polygon-label/system' {
10890
- import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
10891
- import type { RendererCore } from '@mappedin/mappedin-js/geojson/src';
10892
- export const DEFAULT_VERTICAL_OFFSET = 0.01;
10893
- export class PolygonLabelSystem {
10894
- constructor(rendererState: RendererState, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']);
10895
- update(cameraRotationRadians: number): void;
11612
+ declare module '@mappedin/mappedin-js/geojson/src/components/styles/style' {
11613
+ import type { LineStyle } from '@mappedin/mappedin-js/geojson/src/renderer';
11614
+ export const DEFAULT_COLOR = "#ffffff";
11615
+ export const DEFAULT_HEIGHT = 0.1;
11616
+ /**
11617
+ * Determines how a material is rendered, back face, front face or both (default)
11618
+ */
11619
+ export type MaterialSide = 'back' | 'front' | 'double';
11620
+ type Style = {
11621
+ color: string;
11622
+ width: number;
11623
+ opacity: number;
11624
+ visible: boolean;
11625
+ height: number;
11626
+ altitude: number;
11627
+ join: LineStyle['join'];
11628
+ cap: LineStyle['cap'];
11629
+ topColor?: string;
11630
+ texture?: string;
11631
+ topTexture?: string;
11632
+ outline: boolean;
11633
+ showImage: boolean;
11634
+ flipImageToFaceCamera: boolean;
11635
+ url?: string;
11636
+ side?: MaterialSide;
11637
+ renderOrder?: number;
11638
+ };
11639
+ export class StyleComponent implements Style {
11640
+ initialColor: string;
11641
+ color: string;
11642
+ topColor?: string;
11643
+ topTexture?: string;
11644
+ texture?: string;
11645
+ hoverColor?: string;
11646
+ dirty: boolean;
11647
+ visible: boolean;
11648
+ opacity: number;
11649
+ width: number;
11650
+ height: number;
11651
+ initialHeight: number;
11652
+ altitude: number;
11653
+ join: LineStyle['join'];
11654
+ cap: LineStyle['cap'];
11655
+ outline: boolean;
11656
+ showImage: boolean;
11657
+ flipImageToFaceCamera: boolean;
11658
+ url?: string;
11659
+ side: MaterialSide;
11660
+ renderOrder: number;
11661
+ constructor(style?: Partial<Style>);
10896
11662
  }
11663
+ export {};
10897
11664
  }
10898
11665
 
10899
11666
  declare module '@mappedin/mappedin-js/packages/geojson-navigator/src' {
@@ -10988,6 +11755,17 @@ declare module '@mappedin/mappedin-js/geojson/src/utils/tranform-request' {
10988
11755
  };
10989
11756
  }
10990
11757
 
11758
+ declare module '@mappedin/mappedin-js/geojson/src/utils/math' {
11759
+ export function normalizeAngle(angle: number): number;
11760
+ }
11761
+
11762
+ declare module '@mappedin/mappedin-js/geojson/src/entities' {
11763
+ export { updateInteractivity } from '@mappedin/mappedin-js/geojson/src/entities/utils';
11764
+ export { Geometry2D, Geometry2DComponents } from '@mappedin/mappedin-js/geojson/src/entities/geometry2d';
11765
+ export { Geometry3D, Geometry3DComponents } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
11766
+ export type { PathMesh, PatMeshContainer, PathMaterial, Geometry3DTypes, ImageGeometry3D, TextGeometry3D, ModelGeometry3D, CustomGeometry3D, MeshGeometry3D, } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
11767
+ }
11768
+
10991
11769
  declare module '@mappedin/mappedin-js/geojson/src/systems/exporter/exporter' {
10992
11770
  import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
10993
11771
  export type GLTFExportOptions = {
@@ -11018,6 +11796,155 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/exporter/exporter' {
11018
11796
  }
11019
11797
  }
11020
11798
 
11799
+ declare module '@mappedin/mappedin-js/geojson/src/components/styles/text-style' {
11800
+ /**
11801
+ * avoid storying default values on the text style to save space
11802
+ */
11803
+ export class Text3DStyleComponent implements Partial<Text3DStyle> {
11804
+ visible?: boolean;
11805
+ altitude?: number;
11806
+ color?: string;
11807
+ dirty: boolean;
11808
+ maxWidth?: number;
11809
+ maxHeight?: number;
11810
+ hoverByPolygon?: boolean;
11811
+ flipToFaceCamera?: boolean | undefined;
11812
+ font?: string;
11813
+ fillOpacity?: number;
11814
+ fontSize?: number;
11815
+ margin?: number;
11816
+ outlineWidth?: number;
11817
+ outlineBlur?: number | string;
11818
+ outlineOffsetX?: number;
11819
+ strokeColor?: string;
11820
+ strokeOpacity?: number;
11821
+ strokeWidth?: number;
11822
+ hoverColor?: string | undefined;
11823
+ outlineOffsetY?: number;
11824
+ outlineColor?: string;
11825
+ outlineOpacity?: number;
11826
+ constructor(initialState?: Partial<Text3DStyle>);
11827
+ /**
11828
+ * Put together a json ignore all the undefined fields.
11829
+ * This is helpful when we Object.assign(instance, json) to update the instance.
11830
+ */
11831
+ getState(includeDirty?: boolean): Partial<Text3DStyle>;
11832
+ }
11833
+ /**
11834
+ * Not directly storing default values on the text style to save space
11835
+ * TODO: lookign at text style spec from maplibre. we can also support:
11836
+ * letterSpacing?: number;
11837
+ * lineHeight: number;
11838
+ * anchor: number; => .anchorX & .anchorY
11839
+ * justify: nubmer; => .textAlign
11840
+ * tarnsform: string;
11841
+ * offset: number;
11842
+ */
11843
+ export const DEFAULT_TEXT_STYLE: Readonly<Text3DStyle>;
11844
+ export type Text3DStyle = {
11845
+ /**
11846
+ * Controls the visibility of the text element.
11847
+ * @default true
11848
+ */
11849
+ visible: boolean;
11850
+ /**
11851
+ * The color of the text. Will change to hoverColor when the associated polygon is hovered.
11852
+ * Accepts any CSS color string.
11853
+ * @default 'black'
11854
+ */
11855
+ color: string;
11856
+ /**
11857
+ * When true, the text will flip to face the camera while maintaining its position.
11858
+ * @default true
11859
+ */
11860
+ flipToFaceCamera: boolean;
11861
+ /**
11862
+ * URL to a custom font file (.ttf, .otf, .woff).
11863
+ * Falls back to Roboto if undefined.
11864
+ */
11865
+ font: string | undefined;
11866
+ /**
11867
+ * The size of the text in meters. Will be automatically adjusted if it exceeds
11868
+ * the text area bounds.
11869
+ */
11870
+ fontSize: number;
11871
+ /**
11872
+ * Padding between the text and its bounding box, in meters.
11873
+ * Can be specified as either:
11874
+ * - A single number for uniform padding on all sides
11875
+ * - An array of 4 numbers [top, right, bottom, left] for individual side padding
11876
+ * @default [0.2, 1, 0.2, 1.5]
11877
+ */
11878
+ margin: number | [number, number, number, number];
11879
+ /**
11880
+ * Color of the text outline.
11881
+ * Accepts any CSS color string.
11882
+ * @default 'black'
11883
+ */
11884
+ outlineColor: string;
11885
+ /**
11886
+ * Opacity of the text outline.
11887
+ * Accepts values between 0 and 1.
11888
+ * @default 1
11889
+ */
11890
+ outlineOpacity: number;
11891
+ /**
11892
+ * Blur radius for the text outline.
11893
+ * Can be a number in pixels or a string with units.
11894
+ */
11895
+ outlineBlur: number | string;
11896
+ /**
11897
+ * Width of the text outline effect in pixels.
11898
+ */
11899
+ outlineWidth: number;
11900
+ /**
11901
+ * Horizontal offset of the outline effect from the text, in pixels.
11902
+ */
11903
+ outlineOffsetX: number;
11904
+ /**
11905
+ * Vertical offset of the outline effect from the text, in pixels.
11906
+ */
11907
+ outlineOffsetY: number;
11908
+ /**
11909
+ * Width of the inner stroke of each text glyph.
11910
+ * @default 0
11911
+ */
11912
+ strokeWidth: number;
11913
+ /**
11914
+ * Maximum width constraint for the text area in meters.
11915
+ * Overrides default text field constraints when set.
11916
+ */
11917
+ maxWidth: number | undefined;
11918
+ /**
11919
+ * Maximum height constraint for the text area in meters.
11920
+ * Overrides default text field constraints when set.
11921
+ */
11922
+ maxHeight: number | undefined;
11923
+ /**
11924
+ * Opacity of the text stroke when strokeWidth > 0.
11925
+ * @default 1
11926
+ */
11927
+ strokeOpacity: number;
11928
+ /**
11929
+ * Color of the text stroke when strokeWidth > 0.
11930
+ * Accepts any CSS color string.
11931
+ * @default 'black'
11932
+ */
11933
+ strokeColor: string;
11934
+ /**
11935
+ * Opacity of the text fill, independent of stroke and outline opacity.
11936
+ * Set to 0 to show only stroke/outline.
11937
+ * Accepts values between 0 and 1.
11938
+ */
11939
+ fillOpacity: number;
11940
+ /**
11941
+ * Color to display when text is hovered.
11942
+ * Falls back to global hover color if undefined.
11943
+ */
11944
+ hoverColor: string | undefined;
11945
+ };
11946
+ }
11947
+
11021
11948
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object' {
11022
11949
  import type { Polygon, MultiPolygon, FloorProperties as MVFFloor, ParsedMVF, Feature } from '@mappedin/mvf';
11023
11950
  import type { RendererCore } from '@mappedin/core-sdk';
@@ -11056,7 +11983,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils' {
11056
11983
  import type { LabelState, MarkerState, GeometryState, CollisionRankingTier, LineStyle, PaintStyle } from '@mappedin/core-sdk';
11057
11984
  import { type TGeometryState, type TLabelState, type TDirectionInstructionAction, type TShow3DMapOptions, type Label, type Marker, type Model } from '@mappedin/mappedin-js/mappedin-js/src';
11058
11985
  import type { TDoorsState, TMarkerState, TWallsState } from '@mappedin/mappedin-js/mappedin-js/src/types';
11059
- import type { Image, Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
11986
+ import type { Image, Shape, Text3D } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
11060
11987
  import type { GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
11061
11988
  import type { Tween } from '@tweenjs/tween.js';
11062
11989
  export function convertCoordinateToPosition(coord: Coordinate): Position;
@@ -11085,7 +12012,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils' {
11085
12012
  };
11086
12013
  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>>[]>;
11087
12014
  export function translateToCoreStyle(style: PolygonStyle | LineStringStyle, userOptions?: TShow3DMapOptions): PaintStyle | LineStyle;
11088
- export const getTargetID: <T extends Space | Shape | MapObject | Label | Marker | Model | Image | string>(target: T, api: GeoJsonApi) => string | undefined;
12015
+ export const getTargetID: <T extends Space | Shape | MapObject | Label | Text3D | Marker | Model | Image | string>(target: T, api: GeoJsonApi) => string | undefined;
11089
12016
  export function tweenToPromise(tween: Tween): Promise<void>;
11090
12017
  export function unique<T>(array: T[]): T[];
11091
12018
  }
@@ -11149,42 +12076,6 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/collisions/collider-pr
11149
12076
  };
11150
12077
  }
11151
12078
 
11152
- declare module '@mappedin/mappedin-js/geojson/src/entities/utils' {
11153
- import type { CollisionRankingTier, GeometryState, LabelState, RendererCore } from '@mappedin/mappedin-js/geojson/src';
11154
- import { type MarkerState } from '@mappedin/mappedin-js/geojson/src/components/marker';
11155
- import type { PathUpdateState } from '@mappedin/mappedin-js/geojson/src/components/path';
11156
- import type { Geometry3DTypes, Position, RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
11157
- import { GeometryGroupObject3D, type GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
11158
- import { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
11159
- import { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
11160
- import { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/geometry2d';
11161
- import type { StyleComponent } from '@mappedin/mappedin-js/geojson/src/components/style';
11162
- import type { GeometryGroupStyleComponent } from '@mappedin/mappedin-js/geojson/src/components/geometry-group-style';
11163
- export function updateInteractivity(entity: Geometry3DTypes | Geometry2D, update: boolean | undefined, state: RendererState): boolean;
11164
- export function updateGroupColor(entity: GeometryGroupObject3D, state: RendererState, update: Partial<Pick<GeometryGroupState, 'color' | 'topColor'>>): boolean | undefined;
11165
- export function updateGroupShading(entity: GeometryGroupObject3D, update?: GeometryGroupState['shading']): boolean;
11166
- export function updateImageProps(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Partial<GeometryState>): void;
11167
- export function updateHeight(entity: Geometry3D | GeometryGroupObject3D, state: RendererState, update?: number): boolean;
11168
- export function updateColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Partial<GeometryState>): void;
11169
- export function updatePosition(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Position | undefined, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']): void;
11170
- export function updateParent(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: GroupContainerObject3D | undefined): boolean;
11171
- export function updateEnabled(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: boolean | undefined): void;
11172
- export function updateMarker(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<MarkerState> | undefined, state: RendererState): boolean;
11173
- export function updateRank(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: CollisionRankingTier | undefined): boolean;
11174
- export function updateLabel(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<LabelState> | undefined, state: RendererState): void;
11175
- export function updateHoverColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: string): void;
11176
- export function updateFlipImageToFaceCamera(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: boolean): void;
11177
- export function updateVisibility(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: boolean): boolean;
11178
- export function updateOpacity(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, state: RendererState, update?: number): boolean;
11179
- export function updateGroupTexture(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Pick<GeometryGroupStyleComponent, 'texture' | 'topTexture'>): void;
11180
- export function updateIndividualGeometryTexture(entity: Geometry3D, update?: Pick<StyleComponent, 'texture' | 'topTexture'>): boolean;
11181
- export function updateIndividualGeometryOpacity(entity: Geometry3D, update?: number): boolean;
11182
- export function updateAltitude(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: number): boolean;
11183
- export function updateOutline(entity: Geometry3DTypes, update?: boolean): boolean;
11184
- export function handlePathUpdate(geometry: Geometry3D, update: PathUpdateState): void;
11185
- export function pickPathOptions(update: PathUpdateState): Partial<PathUpdateState>;
11186
- }
11187
-
11188
12079
  declare module '@mappedin/mappedin-js/geojson/src/systems/interactions/system' {
11189
12080
  import type { PerspectiveCamera, Vector3, Object3D, Mesh } from 'three';
11190
12081
  import { Raycaster } from 'three';