@mappedin/mappedin-js 6.0.1-beta.30 → 6.0.1-beta.31

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.
@@ -20,7 +20,7 @@
20
20
  // ../mappedin-js/@packages/internal/quad-tree
21
21
  // ../mappedin-js/@mappedin/core-sdk/src/components/text3d
22
22
  // ../mappedin-js/minisearch
23
- // ../mappedin-js/three/addons/loaders/GLTFLoader.js
23
+ // ../mappedin-js/three/examples/jsm/loaders/GLTFLoader.js
24
24
  // ../mappedin-js/@mapbox/point-geometry
25
25
  // ../mappedin-js/@maplibre/maplibre-gl-style-spec
26
26
  // ../mappedin-js/gl-matrix
@@ -40,12 +40,13 @@ declare module '@mappedin/mappedin-js' {
40
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';
41
41
  import { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
42
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';
43
+ import type { InsetPadding, InsetPaddingOption, Shading, PaintStyle, LineStyle, WatermarkOptions, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, EnvMapOptions, MapViewState, UpdateModelState, InitializeModelState } from '@mappedin/mappedin-js/geojson/src';
44
44
  import { enableTestMode, preloadFont } from '@mappedin/mappedin-js/geojson/src';
45
45
  export type { PubSub } from '@packages/internal/common/pubsub';
46
46
  import type { TMappedinMapLibreOverlayEvents } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
47
47
  import { MappedinMapLibreOverlay } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
48
48
  import type { LanguagePackHydrationItem } from '@mappedin/mappedin-js/mappedin-js/src/types';
49
+ import { MAPPEDIN_COLORS } from '@mappedin/mappedin-js/mappedin-js/src/constants';
49
50
  import { type Environment } from '@packages/internal/mvf-utils/mvf-utils';
50
51
  import type { TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TFollowMode, TFollowCameraOptions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
51
52
  import type { TExpandOptions, TStackedMapsEvents, TStackedMapsState } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
@@ -305,8 +306,8 @@ declare module '@mappedin/mappedin-js' {
305
306
  * @deprecated Use {@link show3dMap} instead.
306
307
  */
307
308
  export const show3dMapGeojson: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
308
- export { parseMVF, unzipMVF, enableTestMode, preloadFont };
309
- 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, };
309
+ export { parseMVF, unzipMVF, enableTestMode, preloadFont, MAPPEDIN_COLORS };
310
+ 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, EnvMapOptions, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, Environment, InsetPadding, InsetPaddingOption, OperationHours, SiblingGroup, LocationState, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, UpdateModelState, InitializeModelState, };
310
311
  export type * from 'geojson';
311
312
  export type { TUpdateState, TUpdateStates, TLabelState, TGeometryState, TModelState, TShapeState, TDoorsState, TImageState, TWallsState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TAddImageOptions, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, TBlueDotOptions, TBlueDotPositionUpdate, TFocusTarget, IFocusable, IAnchorable, TMapDataObjectTypes, } from '@mappedin/mappedin-js/mappedin-js/src/types';
312
313
  export { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
@@ -1031,7 +1032,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
1031
1032
  import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
1032
1033
  import type { Annotation, Coordinate, Door, Floor, MapObject, PointOfInterest, Space, Node, EnterpriseLocation, FloorStack, Facade } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
1033
1034
  import type { DOORS, WALLS, TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState, TUpdateStates, GlobalState, UpdateGlobalState } from '@mappedin/mappedin-js/mappedin-js/src/types';
1034
- import type { Label, Marker, Image, Shape, Text3D as Text3DView } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
1035
+ import type { Label, Marker, Image, Shape, Text3D as Text3DView, Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
1035
1036
  import type { TEventPayload } from '@mappedin/mappedin-js/mappedin-js/src/events';
1036
1037
  import type { Shapes } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes';
1037
1038
  import type { StackedMaps, TCollapseOptions, TExpandOptions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
@@ -1137,7 +1138,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
1137
1138
  * // Update the color of a space to red.
1138
1139
  * map.updateState(space, { color: 'red' });
1139
1140
  */
1140
- updateState<T extends Space | Text3DView | MapObject | Label | Marker | Shape | Door | Facade | WALLS | DOORS>(target: T, state: TUpdateState<T>): any;
1141
+ updateState<T extends Space | Text3DView | MapObject | Label | Marker | Shape | Door | Facade | WALLS | DOORS | Model>(target: T, state: TUpdateState<T>): any;
1141
1142
  updateState<T extends string & NonNullable<unknown>>(target: T, state: TUpdateStates): any;
1142
1143
  /**
1143
1144
  * Update global state of the MapView
@@ -1205,7 +1206,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
1205
1206
  * @hidden
1206
1207
  */
1207
1208
  updateWatermark(options: WatermarkUpdateOptions): void;
1208
- getState<T extends Space | Text3DView | MapObject | Label | Marker | Image | Shape | string>(target: T): TGetState<T>;
1209
+ getState<T extends Space | Model | Text3DView | MapObject | Label | Marker | Image | Shape | string>(target: T): TGetState<T>;
1209
1210
  setHoverColor(c: string): void;
1210
1211
  getHoverColor(): string | undefined;
1211
1212
  /**
@@ -1416,10 +1417,10 @@ declare module '@mappedin/mappedin-js/geojson/src' {
1416
1417
  import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
1417
1418
  import type { GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
1418
1419
  import type { Position } from '@mappedin/mappedin-js/geojson/src/types/geometry';
1419
- import type { InsetPadding, InsetPaddingOption, RendererCoreOptions, ClickPayload, HoverPayload, CameraPayload, MapEvent, MapEventPayload } from '@mappedin/mappedin-js/geojson/src/types';
1420
+ import type { InsetPadding, InsetPaddingOption, RendererCoreOptions, ClickPayload, HoverPayload, CameraPayload, MapEvent, MapEventPayload, EnvMapOptions } from '@mappedin/mappedin-js/geojson/src/types';
1420
1421
  import type { GeometryState } from '@mappedin/mappedin-js/geojson/src/components/mesh';
1421
1422
  import type { ShapeState, CustomGeometryBuilder } from '@mappedin/mappedin-js/geojson/src/components/custom';
1422
- import type { ModelState } from '@mappedin/mappedin-js/geojson/src/components/model';
1423
+ import type { ModelState, UpdateModelState, InitializeModelState } from '@mappedin/mappedin-js/geojson/src/components/model';
1423
1424
  import RendererCore, { type MapViewState } from '@mappedin/mappedin-js/geojson/src/renderer';
1424
1425
  import type { Camera, AnimateToOptions, FocusOnOptions, EasingCurve } from '@mappedin/mappedin-js/geojson/src/camera';
1425
1426
  import { mountSceneGraphVisualizer } from '@mappedin/mappedin-js/geojson/examples/src/utils/scene-graph-visualizer';
@@ -1437,17 +1438,17 @@ declare module '@mappedin/mappedin-js/geojson/src' {
1437
1438
  */
1438
1439
  export { enableTestMode } from '@mappedin/mappedin-js/geojson/src/services/test-mode';
1439
1440
  export { mountSceneGraphVisualizer };
1440
- export type { EntityId, EntityState, LineStyle, PaintStyle, ModelStyle, ModelProperties, Shading } from '@mappedin/mappedin-js/geojson/src/types';
1441
+ export type { EntityId, EntityState, LineStyle, PaintStyle, ModelProperties, Shading } from '@mappedin/mappedin-js/geojson/src/types';
1441
1442
  export type * from 'geojson';
1442
1443
  export type { WatermarkUpdateOptions, WatermarkOptions, WatermarkPosition } from '@mappedin/mappedin-js/geojson/src/systems/watermark/system';
1443
1444
  export { preloadFont } from '@mappedin/mappedin-js/geojson/src/systems/text3d/system';
1444
1445
  export type { GLTFExportOptions } from '@mappedin/mappedin-js/geojson/src/systems/exporter';
1445
1446
  export type { AttributionControlOptions, AttributionPosition } from '@mappedin/mappedin-js/geojson/src/systems/html-controls/system';
1446
- export type { Text3DStyle } from '@mappedin/mappedin-js/geojson/src/components/styles';
1447
+ export type { Text3DStyle, ModelStyle } from '@mappedin/mappedin-js/geojson/src/components/styles';
1447
1448
  export type { AddText3DOptions, InitializeText3DState, UpdatableText3DState } from '@mappedin/mappedin-js/geojson/src/components/text3d';
1448
1449
  export { ATTRIBUTION_POSITIONS } from '@mappedin/mappedin-js/geojson/src/systems/html-controls/system';
1449
1450
  export { ANIMATION_TWEENS } from '@mappedin/mappedin-js/geojson/src/camera';
1450
- 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, RendererCoreOptions, };
1451
+ export type { AddPathOptions, AddMarkerOptions, AddLabelOptions, AnimateToOptions, FocusOnOptions, MapViewState, MarkerState, PathState, GroupContainerState, GeometryGroupState, ShapeState, CustomGeometryBuilder, LabelState, GeometryState, ModelState, UpdateModelState, InitializeModelState, EasingCurve, Camera, InsetPadding, InsetPaddingOption, Position, ClickPayload, HoverPayload, CameraPayload, MapEvent, MapEventPayload, CollisionRankingTier, LabelAppearance, RendererCore, EnvMapOptions, RendererCoreOptions, };
1451
1452
  export function createRenderer(container: HTMLElement, options?: RendererCoreOptions & {
1452
1453
  [key: string]: any;
1453
1454
  }): Promise<RendererCore>;
@@ -1528,7 +1529,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
1528
1529
  import type { Coordinate, Floor, Door, Space, MapObject, PointOfInterest, Connection, EnterpriseLocation, Node, Area, Facade, FloorStack, Annotation, EnterpriseCategory, EnterpriseVenue } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
1529
1530
  import type { Label, Marker, Model, Image, Shape, Text3D } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
1530
1531
  import type { Language, ParsedMVFLocalePack } from '@mappedin/mvf';
1531
- import type { InsetPaddingOption, UpdatableText3DState, Text3DState, AddText3DOptions } from '@mappedin/mappedin-js/geojson/src';
1532
+ import type { InsetPaddingOption, UpdatableText3DState, Text3DState, AddText3DOptions, EnvMapOptions, InitializeModelState, ModelState, UpdateModelState } from '@mappedin/mappedin-js/geojson/src';
1532
1533
  export type DeepRequired<T> = Required<{
1533
1534
  [K in keyof T]: T[K] extends Required<T[K]> ? T[K] : DeepRequired<T[K]>;
1534
1535
  }>;
@@ -1617,7 +1618,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
1617
1618
  */
1618
1619
  export type TModelState = {
1619
1620
  type: 'model';
1620
- };
1621
+ } & ModelState;
1621
1622
  /**
1622
1623
  * Defines the state for an image when its appearance is updated.
1623
1624
  */
@@ -1789,7 +1790,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
1789
1790
  /**
1790
1791
  * The type for updating the state of map elements (colors, texts, etc.).
1791
1792
  */
1792
- 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;
1793
+ export type TUpdateState<T> = T extends WALLS ? Partial<TWallsState> : T extends DOORS | Door ? Partial<TDoorsState> : T extends Model ? Partial<UpdateModelState> : 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;
1793
1794
  export type TUpdateStates = Partial<Omit<TGeometryState, 'interactive' | 'hoverColor' | 'type'>> | Partial<TMarkerState> | Partial<TLabelState> | Partial<TGeometryState>;
1794
1795
  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;
1795
1796
  /**
@@ -2260,16 +2261,15 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
2260
2261
  * @default false
2261
2262
  */
2262
2263
  interactive?: boolean;
2264
+ /**
2265
+ * Vertical offset of the model in meters.
2266
+ */
2267
+ verticalOffset?: number;
2263
2268
  };
2264
2269
  /**
2265
2270
  * Options for controlling the behavior of a {@link Model}.
2266
2271
  */
2267
- export type TAddModelOptions = {
2268
- /**
2269
- * Model's URL.
2270
- */
2271
- url: string;
2272
- };
2272
+ export type TAddModelOptions = Omit<InitializeModelState, 'verticalOffset'>;
2273
2273
  /**
2274
2274
  * @interface
2275
2275
  */
@@ -2480,6 +2480,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
2480
2480
  localePack: ParsedMVFLocalePack;
2481
2481
  };
2482
2482
  export type GlobalState = {
2483
+ /**
2484
+ * environment map for reflections.
2485
+ * @default 'basic'
2486
+ */
2487
+ environment: EnvMapOptions;
2483
2488
  text3d: {
2484
2489
  /**
2485
2490
  * hover color of the text3d
@@ -2531,6 +2536,44 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
2531
2536
  };
2532
2537
  }
2533
2538
 
2539
+ declare module '@mappedin/mappedin-js/mappedin-js/src/constants' {
2540
+ /**
2541
+ * Default map options used if no custom options are provided.
2542
+ *
2543
+ * @internal
2544
+ */
2545
+ export const DEFAULT_MAP_OPTIONS: {
2546
+ auto: true;
2547
+ debug: false;
2548
+ pitch: number;
2549
+ bearing: number;
2550
+ antialiasing: {
2551
+ enabled: true;
2552
+ };
2553
+ shadingAndOutlines: true;
2554
+ outdoorView: {
2555
+ layersHiddenByGeometry: string[];
2556
+ };
2557
+ };
2558
+ export const EXTERIOR_WALLS_ID = "ExteriorWalls";
2559
+ export const WALLS_ID = "Walls";
2560
+ export const ADD_MAP_FOCUS_ON_DURATION = 0;
2561
+ export const INTERIOR_DOORS_ID = "InteriorDoors";
2562
+ export const EXTERIOR_DOORS_ID = "ExteriorDoors";
2563
+ export const GEOMETRY_LAYER = "GeometryLayer";
2564
+ export const LABELS_LAYER = "LabelsLayer";
2565
+ export const MARKERS_LAYER = "MarkersLayer";
2566
+ export const FOOTPRINT_LAYER = "FootprintLayer";
2567
+ export const IMAGES_LAYER = "ImagesLayer";
2568
+ export const SELF_SERVE_API_AUDIENCE: string[];
2569
+ export const ENTERPRISE_API_AUDIENCE: string[];
2570
+ export const MAPPEDIN_COLORS: {
2571
+ orange: string;
2572
+ teal: string;
2573
+ lightTeal: string;
2574
+ };
2575
+ }
2576
+
2534
2577
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot' {
2535
2578
  import type { EasingCurve, RendererCore } from '@mappedin/core-sdk';
2536
2579
  import { PubSub } from '@packages/internal/common';
@@ -3273,12 +3316,13 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
3273
3316
  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';
3274
3317
  import { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
3275
3318
  export type { Text3D as Text3DApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/text3d';
3276
- import type { InsetPadding, InsetPaddingOption, Shading, PaintStyle, LineStyle, WatermarkOptions, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, MapViewState } from '@mappedin/mappedin-js/geojson/src';
3319
+ import type { InsetPadding, InsetPaddingOption, Shading, PaintStyle, LineStyle, WatermarkOptions, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, EnvMapOptions, MapViewState, UpdateModelState, InitializeModelState } from '@mappedin/mappedin-js/geojson/src';
3277
3320
  import { enableTestMode, preloadFont } from '@mappedin/mappedin-js/geojson/src';
3278
3321
  export type { PubSub } from '@packages/internal/common/pubsub';
3279
3322
  import type { TMappedinMapLibreOverlayEvents } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
3280
3323
  import { MappedinMapLibreOverlay } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
3281
3324
  import type { LanguagePackHydrationItem } from '@mappedin/mappedin-js/mappedin-js/src/types';
3325
+ import { MAPPEDIN_COLORS } from '@mappedin/mappedin-js/mappedin-js/src/constants';
3282
3326
  import { type Environment } from '@packages/internal/mvf-utils/mvf-utils';
3283
3327
  import type { TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TFollowMode, TFollowCameraOptions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
3284
3328
  import type { TExpandOptions, TStackedMapsEvents, TStackedMapsState } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
@@ -3538,8 +3582,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
3538
3582
  * @deprecated Use {@link show3dMap} instead.
3539
3583
  */
3540
3584
  export const show3dMapGeojson: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
3541
- export { parseMVF, unzipMVF, enableTestMode, preloadFont };
3542
- 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, };
3585
+ export { parseMVF, unzipMVF, enableTestMode, preloadFont, MAPPEDIN_COLORS };
3586
+ 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, EnvMapOptions, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, Environment, InsetPadding, InsetPaddingOption, OperationHours, SiblingGroup, LocationState, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, UpdateModelState, InitializeModelState, };
3543
3587
  export type * from 'geojson';
3544
3588
  export type { TUpdateState, TUpdateStates, TLabelState, TGeometryState, TModelState, TShapeState, TDoorsState, TImageState, TWallsState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TAddImageOptions, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, TBlueDotOptions, TBlueDotPositionUpdate, TFocusTarget, IFocusable, IAnchorable, TMapDataObjectTypes, } from '@mappedin/mappedin-js/mappedin-js/src/types';
3545
3589
  export { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
@@ -3925,6 +3969,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
3925
3969
  * @internal
3926
3970
  */
3927
3971
  readonly __type = "space";
3972
+ /**
3973
+ * @internal
3974
+ * @hidden
3975
+ */
3928
3976
  getMvfData(): import("@mappedin/mvf").Feature<import("@mappedin/mvf").LineString | import("@mappedin/mvf").Polygon | import("@mappedin/mvf").Point, import("@mappedin/mvf").SpaceProperties>;
3929
3977
  /**
3930
3978
  * Checks if the provided instance is of type Space.
@@ -5017,7 +5065,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location'
5017
5065
  *
5018
5066
  * Refer to the [EnterpriseLocation Guide](https://developer.mappedin.com/web-sdk/enterprise-data#enterprise-locations) for more information and interactive examples.
5019
5067
  */
5020
- class EnterpriseLocation extends BaseMetaData implements Omit<MVFEnterpriseLocation, 'polygons' | 'nodes' | 'links'>, IFocusable {
5068
+ class EnterpriseLocation extends BaseMetaData implements Omit<MVFEnterpriseLocation, 'polygons' | 'nodes' | 'links' | 'spaces'>, IFocusable {
5021
5069
  #private;
5022
5070
  /**
5023
5071
  * @internal
@@ -5573,16 +5621,16 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
5573
5621
  dynamicResize: z.ZodOptional<z.ZodBoolean>;
5574
5622
  zIndex: z.ZodOptional<z.ZodNumber>;
5575
5623
  }, "strip", z.ZodTypeAny, {
5576
- interactive?: boolean | "pointer-events-auto" | undefined;
5577
- id?: string | undefined;
5578
5624
  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;
5625
+ id?: string | undefined;
5626
+ interactive?: boolean | "pointer-events-auto" | undefined;
5579
5627
  dynamicResize?: boolean | undefined;
5580
5628
  zIndex?: number | undefined;
5581
5629
  rank?: number | "low" | "medium" | "high" | "always-visible" | undefined;
5582
5630
  }, {
5583
- interactive?: boolean | "pointer-events-auto" | undefined;
5584
- id?: string | undefined;
5585
5631
  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;
5632
+ id?: string | undefined;
5633
+ interactive?: boolean | "pointer-events-auto" | undefined;
5586
5634
  dynamicResize?: boolean | undefined;
5587
5635
  zIndex?: number | undefined;
5588
5636
  rank?: number | "low" | "medium" | "high" | "always-visible" | undefined;
@@ -5802,16 +5850,16 @@ declare module '@mappedin/mappedin-js/geojson/src/components/path' {
5802
5850
  displayArrowsOnPath: z.ZodOptional<z.ZodBoolean>;
5803
5851
  animateArrowsOnPath: z.ZodOptional<z.ZodBoolean>;
5804
5852
  }, "strip", z.ZodTypeAny, {
5805
- interactive?: boolean | undefined;
5806
5853
  id?: string | undefined;
5854
+ interactive?: boolean | undefined;
5807
5855
  accentColor?: string | undefined;
5808
5856
  displayArrowsOnPath?: boolean | undefined;
5809
5857
  animateArrowsOnPath?: boolean | undefined;
5810
5858
  nearRadius?: number | undefined;
5811
5859
  farRadius?: number | undefined;
5812
5860
  }, {
5813
- interactive?: boolean | undefined;
5814
5861
  id?: string | undefined;
5862
+ interactive?: boolean | undefined;
5815
5863
  accentColor?: string | undefined;
5816
5864
  displayArrowsOnPath?: boolean | undefined;
5817
5865
  animateArrowsOnPath?: boolean | undefined;
@@ -6503,10 +6551,18 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry-group' {
6503
6551
  * The opacity of the geometry group. This will affect all children of the geometry group and override their opacity.
6504
6552
  */
6505
6553
  opacity: number;
6554
+ /**
6555
+ * The initial color of the geometry and its children. This is used to reset the color of the geometry to its initial value.
6556
+ */
6557
+ initialColor: string;
6506
6558
  /**
6507
6559
  * The color of the geometry and its children. Updating this will affect any children whose color was not updated after generation
6508
6560
  */
6509
6561
  color: string;
6562
+ /**
6563
+ * The initial top color of the geometry and its children. This is used to reset the top color of the geometry to its initial value.
6564
+ */
6565
+ initialTopColor?: string;
6510
6566
  /**
6511
6567
  * The top color of the geometry and its children. Updating this will affect any children whose top color was not updated after generation
6512
6568
  */
@@ -6702,15 +6758,23 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
6702
6758
  export * from '@mappedin/mappedin-js/geojson/src/types/options';
6703
6759
  export type ModelProperties = {
6704
6760
  rotation?: [number, number, number];
6705
- altitude?: number;
6706
6761
  scale?: [number, number, number];
6707
6762
  interactive?: boolean;
6708
6763
  id?: string | number;
6764
+ verticalOffset?: number;
6709
6765
  };
6710
- export type ModelStyle = {
6766
+ export type ModelGroupStyle = {
6711
6767
  url: string;
6712
6768
  color?: string;
6713
6769
  opacity?: number;
6770
+ /**
6771
+ * traverse the scene and update the materials by name
6772
+ */
6773
+ material?: {
6774
+ [name: string]: {
6775
+ color: string;
6776
+ };
6777
+ };
6714
6778
  };
6715
6779
  export type InsetPadding = {
6716
6780
  top: number;
@@ -6939,6 +7003,10 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
6939
7003
  * The color of the geometry
6940
7004
  */
6941
7005
  color: string;
7006
+ /**
7007
+ * The initial top color of the geometry. This is used to reset the top color of the geometry to its initial value.
7008
+ */
7009
+ initialTopColor?: string;
6942
7010
  /**
6943
7011
  * The color of geometry faces that are facing up
6944
7012
  */
@@ -7116,24 +7184,28 @@ declare module '@mappedin/mappedin-js/geojson/src/components/custom' {
7116
7184
  constructor(feature: Feature<Point>, builder: CustomGeometryBuilder);
7117
7185
  get visible(): boolean;
7118
7186
  set visible(value: boolean);
7119
- setOpacity(): void;
7187
+ set opacity(_v: number);
7188
+ get opacity(): number;
7120
7189
  color: Color;
7121
7190
  setColor(): void;
7122
7191
  get position(): import("three").Vector3;
7123
7192
  get altitude(): number;
7124
7193
  set altitude(value: number);
7194
+ get renderOrder(): number;
7195
+ set renderOrder(_: number);
7125
7196
  }
7126
7197
  }
7127
7198
 
7128
7199
  declare module '@mappedin/mappedin-js/geojson/src/components/model' {
7129
- import type { LineSegments, Object3D } from 'three';
7200
+ import type { Group, LineSegments, Object3D } from 'three';
7130
7201
  import { Color, Vector3 } from 'three';
7131
7202
  import type { BatchedStandardMaterial } from '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-optimization/batched-material';
7132
- import type { Position, EntityId, ModelProperties, ModelStyle } from '@mappedin/mappedin-js/geojson/src/types';
7203
+ import type { Position, EntityId, ModelProperties, ModelGroupStyle } from '@mappedin/mappedin-js/geojson/src/types';
7133
7204
  import type { Feature, FeatureCollection, Point } from 'geojson';
7134
7205
  import type { Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
7135
7206
  import type { GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
7136
7207
  import { z } from 'zod';
7208
+ import type { ModelStyle } from '@mappedin/mappedin-js/geojson/src/components/styles';
7137
7209
  /**
7138
7210
  * State representing a Model, typically loaded via a URL
7139
7211
  */
@@ -7157,25 +7229,38 @@ declare module '@mappedin/mappedin-js/geojson/src/components/model' {
7157
7229
  * ```
7158
7230
  */
7159
7231
  interactive: boolean;
7160
- };
7232
+ } & Partial<ModelStyle>;
7233
+ /**
7234
+ * initialize model state
7235
+ * @interface
7236
+ */
7237
+ export type InitializeModelState = Omit<Partial<Omit<ModelState, 'url'> & Pick<ModelStyle, 'url'>>, 'id' | 'type' | 'parent' | 'position'>;
7238
+ /**
7239
+ * updatable model state
7240
+ * @interface
7241
+ */
7242
+ export type UpdateModelState = Omit<InitializeModelState, 'url'>;
7161
7243
  export const modelPropertiesSchema: z.ZodObject<{
7162
7244
  rotation: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
7163
7245
  altitude: z.ZodOptional<z.ZodNumber>;
7164
7246
  scale: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
7165
7247
  interactive: z.ZodOptional<z.ZodBoolean>;
7248
+ verticalOffset: z.ZodOptional<z.ZodNumber>;
7166
7249
  id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
7167
7250
  }, "strip", z.ZodTypeAny, {
7168
- rotation?: number[] | undefined;
7169
7251
  altitude?: number | undefined;
7170
- scale?: number[] | undefined;
7171
- interactive?: boolean | undefined;
7252
+ verticalOffset?: number | undefined;
7172
7253
  id?: string | number | undefined;
7173
- }, {
7254
+ interactive?: boolean | undefined;
7174
7255
  rotation?: number[] | undefined;
7175
- altitude?: number | undefined;
7176
7256
  scale?: number[] | undefined;
7177
- interactive?: boolean | undefined;
7257
+ }, {
7258
+ altitude?: number | undefined;
7259
+ verticalOffset?: number | undefined;
7178
7260
  id?: string | number | undefined;
7261
+ interactive?: boolean | undefined;
7262
+ rotation?: number[] | undefined;
7263
+ scale?: number[] | undefined;
7179
7264
  }>;
7180
7265
  export const featureSchema: z.ZodObject<{
7181
7266
  type: z.ZodEnum<["Feature"]>;
@@ -7194,19 +7279,22 @@ declare module '@mappedin/mappedin-js/geojson/src/components/model' {
7194
7279
  altitude: z.ZodOptional<z.ZodNumber>;
7195
7280
  scale: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
7196
7281
  interactive: z.ZodOptional<z.ZodBoolean>;
7282
+ verticalOffset: z.ZodOptional<z.ZodNumber>;
7197
7283
  id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
7198
7284
  }, "strip", z.ZodTypeAny, {
7199
- rotation?: number[] | undefined;
7200
7285
  altitude?: number | undefined;
7201
- scale?: number[] | undefined;
7202
- interactive?: boolean | undefined;
7286
+ verticalOffset?: number | undefined;
7203
7287
  id?: string | number | undefined;
7204
- }, {
7288
+ interactive?: boolean | undefined;
7205
7289
  rotation?: number[] | undefined;
7206
- altitude?: number | undefined;
7207
7290
  scale?: number[] | undefined;
7208
- interactive?: boolean | undefined;
7291
+ }, {
7292
+ altitude?: number | undefined;
7293
+ verticalOffset?: number | undefined;
7209
7294
  id?: string | number | undefined;
7295
+ interactive?: boolean | undefined;
7296
+ rotation?: number[] | undefined;
7297
+ scale?: number[] | undefined;
7210
7298
  }>;
7211
7299
  }, "strip", z.ZodTypeAny, {
7212
7300
  type: "Feature";
@@ -7215,11 +7303,12 @@ declare module '@mappedin/mappedin-js/geojson/src/components/model' {
7215
7303
  coordinates: number[];
7216
7304
  };
7217
7305
  properties: {
7218
- rotation?: number[] | undefined;
7219
7306
  altitude?: number | undefined;
7220
- scale?: number[] | undefined;
7221
- interactive?: boolean | undefined;
7307
+ verticalOffset?: number | undefined;
7222
7308
  id?: string | number | undefined;
7309
+ interactive?: boolean | undefined;
7310
+ rotation?: number[] | undefined;
7311
+ scale?: number[] | undefined;
7223
7312
  };
7224
7313
  }, {
7225
7314
  type: "Feature";
@@ -7228,11 +7317,12 @@ declare module '@mappedin/mappedin-js/geojson/src/components/model' {
7228
7317
  coordinates: number[];
7229
7318
  };
7230
7319
  properties: {
7231
- rotation?: number[] | undefined;
7232
7320
  altitude?: number | undefined;
7233
- scale?: number[] | undefined;
7234
- interactive?: boolean | undefined;
7321
+ verticalOffset?: number | undefined;
7235
7322
  id?: string | number | undefined;
7323
+ interactive?: boolean | undefined;
7324
+ rotation?: number[] | undefined;
7325
+ scale?: number[] | undefined;
7236
7326
  };
7237
7327
  }>;
7238
7328
  export const addModelFeatureSchema: z.ZodObject<{
@@ -7254,19 +7344,22 @@ declare module '@mappedin/mappedin-js/geojson/src/components/model' {
7254
7344
  altitude: z.ZodOptional<z.ZodNumber>;
7255
7345
  scale: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
7256
7346
  interactive: z.ZodOptional<z.ZodBoolean>;
7347
+ verticalOffset: z.ZodOptional<z.ZodNumber>;
7257
7348
  id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
7258
7349
  }, "strip", z.ZodTypeAny, {
7259
- rotation?: number[] | undefined;
7260
7350
  altitude?: number | undefined;
7261
- scale?: number[] | undefined;
7262
- interactive?: boolean | undefined;
7351
+ verticalOffset?: number | undefined;
7263
7352
  id?: string | number | undefined;
7264
- }, {
7353
+ interactive?: boolean | undefined;
7265
7354
  rotation?: number[] | undefined;
7266
- altitude?: number | undefined;
7267
7355
  scale?: number[] | undefined;
7268
- interactive?: boolean | undefined;
7356
+ }, {
7357
+ altitude?: number | undefined;
7358
+ verticalOffset?: number | undefined;
7269
7359
  id?: string | number | undefined;
7360
+ interactive?: boolean | undefined;
7361
+ rotation?: number[] | undefined;
7362
+ scale?: number[] | undefined;
7270
7363
  }>;
7271
7364
  }, "strip", z.ZodTypeAny, {
7272
7365
  type: "Feature";
@@ -7275,11 +7368,12 @@ declare module '@mappedin/mappedin-js/geojson/src/components/model' {
7275
7368
  coordinates: number[];
7276
7369
  };
7277
7370
  properties: {
7278
- rotation?: number[] | undefined;
7279
7371
  altitude?: number | undefined;
7280
- scale?: number[] | undefined;
7281
- interactive?: boolean | undefined;
7372
+ verticalOffset?: number | undefined;
7282
7373
  id?: string | number | undefined;
7374
+ interactive?: boolean | undefined;
7375
+ rotation?: number[] | undefined;
7376
+ scale?: number[] | undefined;
7283
7377
  };
7284
7378
  }, {
7285
7379
  type: "Feature";
@@ -7288,11 +7382,12 @@ declare module '@mappedin/mappedin-js/geojson/src/components/model' {
7288
7382
  coordinates: number[];
7289
7383
  };
7290
7384
  properties: {
7291
- rotation?: number[] | undefined;
7292
7385
  altitude?: number | undefined;
7293
- scale?: number[] | undefined;
7294
- interactive?: boolean | undefined;
7386
+ verticalOffset?: number | undefined;
7295
7387
  id?: string | number | undefined;
7388
+ interactive?: boolean | undefined;
7389
+ rotation?: number[] | undefined;
7390
+ scale?: number[] | undefined;
7296
7391
  };
7297
7392
  }>, "many">;
7298
7393
  }, "strip", z.ZodTypeAny, {
@@ -7304,11 +7399,12 @@ declare module '@mappedin/mappedin-js/geojson/src/components/model' {
7304
7399
  coordinates: number[];
7305
7400
  };
7306
7401
  properties: {
7307
- rotation?: number[] | undefined;
7308
7402
  altitude?: number | undefined;
7309
- scale?: number[] | undefined;
7310
- interactive?: boolean | undefined;
7403
+ verticalOffset?: number | undefined;
7311
7404
  id?: string | number | undefined;
7405
+ interactive?: boolean | undefined;
7406
+ rotation?: number[] | undefined;
7407
+ scale?: number[] | undefined;
7312
7408
  };
7313
7409
  }[];
7314
7410
  }, {
@@ -7320,31 +7416,45 @@ declare module '@mappedin/mappedin-js/geojson/src/components/model' {
7320
7416
  coordinates: number[];
7321
7417
  };
7322
7418
  properties: {
7323
- rotation?: number[] | undefined;
7324
7419
  altitude?: number | undefined;
7325
- scale?: number[] | undefined;
7326
- interactive?: boolean | undefined;
7420
+ verticalOffset?: number | undefined;
7327
7421
  id?: string | number | undefined;
7422
+ interactive?: boolean | undefined;
7423
+ rotation?: number[] | undefined;
7424
+ scale?: number[] | undefined;
7328
7425
  };
7329
7426
  }[];
7330
7427
  }>;
7331
- export const modelStyleSchema: z.ZodObject<{
7428
+ export const modelGroupStyleSchema: z.ZodObject<{
7332
7429
  url: z.ZodString;
7333
7430
  color: z.ZodOptional<z.ZodString>;
7334
7431
  opacity: z.ZodOptional<z.ZodNumber>;
7432
+ material: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
7433
+ color: z.ZodString;
7434
+ }, "strip", z.ZodTypeAny, {
7435
+ color: string;
7436
+ }, {
7437
+ color: string;
7438
+ }>>>;
7335
7439
  }, "strip", z.ZodTypeAny, {
7336
7440
  url: string;
7337
7441
  color?: string | undefined;
7338
7442
  opacity?: number | undefined;
7443
+ material?: Record<string, {
7444
+ color: string;
7445
+ }> | undefined;
7339
7446
  }, {
7340
7447
  url: string;
7341
7448
  color?: string | undefined;
7342
7449
  opacity?: number | undefined;
7450
+ material?: Record<string, {
7451
+ color: string;
7452
+ }> | undefined;
7343
7453
  }>;
7344
- export function validateModelGroup(id: string | number, geometry: FeatureCollection<Point, ModelProperties>, style: ModelStyle): void;
7454
+ export function validateModelGroup(id: string | number, geometry: FeatureCollection<Point, ModelProperties>, style: Partial<ModelGroupStyle>): void;
7345
7455
  export class ModelComponent {
7346
7456
  #private;
7347
- mesh?: Geometry3DObject3D;
7457
+ mesh?: Geometry3DObject3D | Group;
7348
7458
  readonly type = "model";
7349
7459
  outline?: LineSegments;
7350
7460
  geometry?: Object3D;
@@ -7366,7 +7476,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/model' {
7366
7476
 
7367
7477
  declare module '@mappedin/mappedin-js/geojson/src/renderer' {
7368
7478
  import './utils/object-this-polyfill';
7369
- import { Vector3, Raycaster, Camera as ThreeCamera } from 'three';
7479
+ import { Scene, Vector3, Raycaster, Camera as ThreeCamera } from 'three';
7370
7480
  import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
7371
7481
  import { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
7372
7482
  import { PubSub } from '@mappedin/mappedin-js/packages/common/pubsub';
@@ -7377,7 +7487,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
7377
7487
  import type { GLTFExportOptions } from '@mappedin/mappedin-js/geojson/src/systems/exporter';
7378
7488
  import { ExporterSystem } from '@mappedin/mappedin-js/geojson/src/systems/exporter';
7379
7489
  import type { AddLabelOptions, LabelState } from '@mappedin/mappedin-js/geojson/src/components/label';
7380
- import type { LineStyle, PaintStyle, RendererCoreOptions, Position, ModelProperties, ModelStyle, EntityState, EntityId, MapEvent, MapEventPayload, RendererState, EntityTypes } from '@mappedin/mappedin-js/geojson/src/types';
7490
+ import type { LineStyle, PaintStyle, RendererCoreOptions, Position, ModelProperties, EntityState, EntityId, MapEvent, MapEventPayload, RendererState, EntityTypes, EnvMapOptions } from '@mappedin/mappedin-js/geojson/src/types';
7381
7491
  import { MeshCreationAndOptimizationSystem } from '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-optimization/system';
7382
7492
  import { DOMVisibilitySystem } from '@mappedin/mappedin-js/geojson/src/systems/dom-visiblity/system';
7383
7493
  import { TwoDProjectionSystem } from '@mappedin/mappedin-js/geojson/src/systems/2d-projection/system';
@@ -7392,7 +7502,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
7392
7502
  import { DOMDrawSystem } from '@mappedin/mappedin-js/geojson/src/systems/dom-draw/system';
7393
7503
  import { type Map as MapLibreMap } from '@mappedin/mappedin-js/packages/outdoor-context-v4';
7394
7504
  import type { GeometryState } from '@mappedin/mappedin-js/geojson/src/components/mesh';
7395
- import type { ModelState } from '@mappedin/mappedin-js/geojson/src/components/model';
7505
+ import type { InitializeModelState, ModelState, UpdateModelState } from '@mappedin/mappedin-js/geojson/src/components/model';
7396
7506
  import type { GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
7397
7507
  import { DOMResizeSystem } from '@mappedin/mappedin-js/geojson/src/systems/dom-resize/system';
7398
7508
  import { Camera } from '@mappedin/mappedin-js/geojson/src/camera';
@@ -7520,7 +7630,10 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
7520
7630
  /**
7521
7631
  * Add a group of models from GeoJSON data. These will be instanced automatically for better performance.
7522
7632
  */
7523
- addModelGroup(id: string, geometry: FeatureCollection<Point, ModelProperties>, style: ModelStyle, parent?: EntityId<GroupContainerState> | string | null): EntityId<GeometryGroupState> | undefined;
7633
+ addModelGroup(id: string, geometry: FeatureCollection<Point, ModelProperties>, style: Partial<InitializeModelState>, { parent, onComplete: onAdd, }?: {
7634
+ parent?: EntityId<GroupContainerState> | string | null;
7635
+ onComplete?: () => void;
7636
+ }): EntityId<GeometryGroupState> | undefined;
7524
7637
  /**
7525
7638
  * Add an HTML Marker at a GeoJSON coordinate.
7526
7639
  */
@@ -7581,6 +7694,9 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
7581
7694
  * Recursively get the state for the whole scene. Can be an expensive operation.
7582
7695
  */
7583
7696
  getScene(): GroupContainerState;
7697
+ getThreeScene(): Scene | undefined;
7698
+ setEnvironment(update: EnvMapOptions): Promise<void>;
7699
+ getEnvironment(): EnvMapOptions;
7584
7700
  /**
7585
7701
  * Get the current scene as a GLB file
7586
7702
  */
@@ -7607,7 +7723,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
7607
7723
  setState<T extends EntityId<GeometryState>>(object: T | T['id'], state: Partial<GeometryState>): void;
7608
7724
  setState<T extends EntityId<ShapeState>>(object: T | T['id'], state: Partial<ShapeState>): void;
7609
7725
  setState<T extends EntityId<PathState>>(object: T | T['id'], state: PathUpdateState): void;
7610
- setState<T extends EntityId<ModelState>>(object: T | T['id'], state: Partial<ModelState>): void;
7726
+ setState<T extends EntityId<ModelState>>(object: T | T['id'], state: Partial<UpdateModelState>): void;
7611
7727
  setState<T extends EntityId<ImageState>>(object: T | T['id'], state: Partial<ImageState>): void;
7612
7728
  setState<T extends EntityId<Text3DState>>(object: T | T['id'], state: Partial<UpdatableText3DState>): void;
7613
7729
  setState<T extends EntityState>(object: T | T['id'], state: Partial<T>): void;
@@ -7702,7 +7818,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
7702
7818
  *
7703
7819
  * Note: Only use this if you have an animation frame setup elsewhere
7704
7820
  */
7705
- renderSync: () => Promise<any>;
7821
+ renderSync: () => Promise<any> | undefined;
7706
7822
  /**
7707
7823
  * @internal for testing
7708
7824
  */
@@ -7909,7 +8025,7 @@ declare module '@mappedin/mappedin-js/geojson/src/camera' {
7909
8025
  /**
7910
8026
  * The camera's current pan mode.
7911
8027
  */
7912
- get panMode(): "elevation" | "default";
8028
+ get panMode(): "default" | "elevation";
7913
8029
  /**
7914
8030
  * Set the camera's pan mode. 'elevation' moves the camera up and down, while 'default' allows the camera to pan along the ground.
7915
8031
  */
@@ -7920,6 +8036,10 @@ declare module '@mappedin/mappedin-js/geojson/src/camera' {
7920
8036
  */
7921
8037
  setInsetPadding(padding: InsetPadding): void;
7922
8038
  animateTo(options: AnimateToOptions): Promise<void>;
8039
+ getCameraFrameForCoordinates(coordinates: (GeoJSONPosition | Position)[], options?: FocusOnOptions): {
8040
+ center: Position;
8041
+ zoomLevel: number;
8042
+ };
7923
8043
  /**
7924
8044
  * Focuses the camera on a set of coordinates, with optional animation
7925
8045
  *
@@ -8023,10 +8143,8 @@ declare module '@mappedin/mappedin-js/geojson/src/components/text3d' {
8023
8143
  content: z.ZodString;
8024
8144
  }, "strip", z.ZodTypeAny, {
8025
8145
  type: "text3d";
8026
- id: string | number;
8027
- color: string;
8028
- position: [number, number, number];
8029
8146
  visible: boolean;
8147
+ color: string;
8030
8148
  flipToFaceCamera: boolean;
8031
8149
  fontSize: number;
8032
8150
  margin: number | [number, number, number, number];
@@ -8040,6 +8158,8 @@ declare module '@mappedin/mappedin-js/geojson/src/components/text3d' {
8040
8158
  strokeOpacity: number;
8041
8159
  strokeColor: string;
8042
8160
  fillOpacity: number;
8161
+ id: string | number;
8162
+ position: [number, number, number];
8043
8163
  content: string;
8044
8164
  maxWidth?: number | undefined;
8045
8165
  font?: string | undefined;
@@ -8047,10 +8167,8 @@ declare module '@mappedin/mappedin-js/geojson/src/components/text3d' {
8047
8167
  hoverColor?: string | undefined;
8048
8168
  }, {
8049
8169
  type: "text3d";
8050
- id: string | number;
8051
- color: string;
8052
- position: [number, number, number];
8053
8170
  visible: boolean;
8171
+ color: string;
8054
8172
  flipToFaceCamera: boolean;
8055
8173
  fontSize: number;
8056
8174
  margin: number | [number, number, number, number];
@@ -8064,6 +8182,8 @@ declare module '@mappedin/mappedin-js/geojson/src/components/text3d' {
8064
8182
  strokeOpacity: number;
8065
8183
  strokeColor: string;
8066
8184
  fillOpacity: number;
8185
+ id: string | number;
8186
+ position: [number, number, number];
8067
8187
  content: string;
8068
8188
  maxWidth?: number | undefined;
8069
8189
  font?: string | undefined;
@@ -8100,9 +8220,8 @@ declare module '@mappedin/mappedin-js/geojson/src/components/text3d' {
8100
8220
  content: z.ZodOptional<z.ZodString>;
8101
8221
  }, "type" | "id">, "strict", z.ZodTypeAny, {
8102
8222
  maxWidth?: number | undefined;
8103
- color?: string | undefined;
8104
- position?: [number, number, number] | undefined;
8105
8223
  visible?: boolean | undefined;
8224
+ color?: string | undefined;
8106
8225
  flipToFaceCamera?: boolean | undefined;
8107
8226
  font?: string | undefined;
8108
8227
  fontSize?: number | undefined;
@@ -8119,12 +8238,12 @@ declare module '@mappedin/mappedin-js/geojson/src/components/text3d' {
8119
8238
  strokeColor?: string | undefined;
8120
8239
  fillOpacity?: number | undefined;
8121
8240
  hoverColor?: string | undefined;
8241
+ position?: [number, number, number] | undefined;
8122
8242
  content?: string | undefined;
8123
8243
  }, {
8124
8244
  maxWidth?: number | undefined;
8125
- color?: string | undefined;
8126
- position?: [number, number, number] | undefined;
8127
8245
  visible?: boolean | undefined;
8246
+ color?: string | undefined;
8128
8247
  flipToFaceCamera?: boolean | undefined;
8129
8248
  font?: string | undefined;
8130
8249
  fontSize?: number | undefined;
@@ -8141,6 +8260,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/text3d' {
8141
8260
  strokeColor?: string | undefined;
8142
8261
  fillOpacity?: number | undefined;
8143
8262
  hoverColor?: string | undefined;
8263
+ position?: [number, number, number] | undefined;
8144
8264
  content?: string | undefined;
8145
8265
  }>;
8146
8266
  /**
@@ -8173,9 +8293,9 @@ declare module '@mappedin/mappedin-js/geojson/src/components/text3d' {
8173
8293
  type: z.ZodOptional<z.ZodLiteral<"text3d">>;
8174
8294
  position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
8175
8295
  content: z.ZodOptional<z.ZodString>;
8176
- }, "type" | "id">, "maxWidth" | "position" | "margin" | "maxHeight" | "content">, "strict", z.ZodTypeAny, {
8177
- color?: string | undefined;
8296
+ }, "type" | "id">, "maxWidth" | "margin" | "maxHeight" | "position" | "content">, "strict", z.ZodTypeAny, {
8178
8297
  visible?: boolean | undefined;
8298
+ color?: string | undefined;
8179
8299
  flipToFaceCamera?: boolean | undefined;
8180
8300
  font?: string | undefined;
8181
8301
  fontSize?: number | undefined;
@@ -8191,8 +8311,8 @@ declare module '@mappedin/mappedin-js/geojson/src/components/text3d' {
8191
8311
  fillOpacity?: number | undefined;
8192
8312
  hoverColor?: string | undefined;
8193
8313
  }, {
8194
- color?: string | undefined;
8195
8314
  visible?: boolean | undefined;
8315
+ color?: string | undefined;
8196
8316
  flipToFaceCamera?: boolean | undefined;
8197
8317
  font?: string | undefined;
8198
8318
  fontSize?: number | undefined;
@@ -8243,9 +8363,8 @@ declare module '@mappedin/mappedin-js/geojson/src/components/text3d' {
8243
8363
  content: z.ZodOptional<z.ZodString>;
8244
8364
  }, "type" | "id">, "strict", z.ZodTypeAny, {
8245
8365
  maxWidth?: number | undefined;
8246
- color?: string | undefined;
8247
- position?: [number, number, number] | undefined;
8248
8366
  visible?: boolean | undefined;
8367
+ color?: string | undefined;
8249
8368
  flipToFaceCamera?: boolean | undefined;
8250
8369
  font?: string | undefined;
8251
8370
  fontSize?: number | undefined;
@@ -8262,12 +8381,12 @@ declare module '@mappedin/mappedin-js/geojson/src/components/text3d' {
8262
8381
  strokeColor?: string | undefined;
8263
8382
  fillOpacity?: number | undefined;
8264
8383
  hoverColor?: string | undefined;
8384
+ position?: [number, number, number] | undefined;
8265
8385
  content?: string | undefined;
8266
8386
  }, {
8267
8387
  maxWidth?: number | undefined;
8268
- color?: string | undefined;
8269
- position?: [number, number, number] | undefined;
8270
8388
  visible?: boolean | undefined;
8389
+ color?: string | undefined;
8271
8390
  flipToFaceCamera?: boolean | undefined;
8272
8391
  font?: string | undefined;
8273
8392
  fontSize?: number | undefined;
@@ -8284,6 +8403,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/text3d' {
8284
8403
  strokeColor?: string | undefined;
8285
8404
  fillOpacity?: number | undefined;
8286
8405
  hoverColor?: string | undefined;
8406
+ position?: [number, number, number] | undefined;
8287
8407
  content?: string | undefined;
8288
8408
  }>>;
8289
8409
  parentId: z.ZodOptional<z.ZodString>;
@@ -8291,9 +8411,8 @@ declare module '@mappedin/mappedin-js/geojson/src/components/text3d' {
8291
8411
  parentId?: string | undefined;
8292
8412
  appearance?: {
8293
8413
  maxWidth?: number | undefined;
8294
- color?: string | undefined;
8295
- position?: [number, number, number] | undefined;
8296
8414
  visible?: boolean | undefined;
8415
+ color?: string | undefined;
8297
8416
  flipToFaceCamera?: boolean | undefined;
8298
8417
  font?: string | undefined;
8299
8418
  fontSize?: number | undefined;
@@ -8310,15 +8429,15 @@ declare module '@mappedin/mappedin-js/geojson/src/components/text3d' {
8310
8429
  strokeColor?: string | undefined;
8311
8430
  fillOpacity?: number | undefined;
8312
8431
  hoverColor?: string | undefined;
8432
+ position?: [number, number, number] | undefined;
8313
8433
  content?: string | undefined;
8314
8434
  } | undefined;
8315
8435
  }, {
8316
8436
  parentId?: string | undefined;
8317
8437
  appearance?: {
8318
8438
  maxWidth?: number | undefined;
8319
- color?: string | undefined;
8320
- position?: [number, number, number] | undefined;
8321
8439
  visible?: boolean | undefined;
8440
+ color?: string | undefined;
8322
8441
  flipToFaceCamera?: boolean | undefined;
8323
8442
  font?: string | undefined;
8324
8443
  fontSize?: number | undefined;
@@ -8335,6 +8454,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/text3d' {
8335
8454
  strokeColor?: string | undefined;
8336
8455
  fillOpacity?: number | undefined;
8337
8456
  hoverColor?: string | undefined;
8457
+ position?: [number, number, number] | undefined;
8338
8458
  content?: string | undefined;
8339
8459
  } | undefined;
8340
8460
  }>;
@@ -8357,14 +8477,15 @@ declare module '@mappedin/mappedin-js/geojson/src/components/text3d' {
8357
8477
  }
8358
8478
 
8359
8479
  declare module '@mappedin/mappedin-js/geojson/src/entities/utils' {
8360
- import type { CollisionRankingTier, GeometryState, LabelState, RendererCore } from '@mappedin/mappedin-js/geojson/src';
8480
+ import type { CollisionRankingTier, GeometryState, LabelState, ModelState, RendererCore } from '@mappedin/mappedin-js/geojson/src';
8361
8481
  import { type MarkerState } from '@mappedin/mappedin-js/geojson/src/components/marker';
8362
8482
  import type { PathUpdateState } from '@mappedin/mappedin-js/geojson/src/components/path';
8363
8483
  import type { EntityTypes, All3DTypes, Position, RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
8364
8484
  import type { KeysOfUnion } from '@mappedin/mappedin-js/geojson/src/utils';
8365
8485
  import { GeometryGroupObject3D, type GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
8366
8486
  import { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
8367
- import { Geometry3D, Geometry3DObject3D, type Geometry3DTypes, type TextGeometry3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
8487
+ import { Geometry3D, Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
8488
+ import type { ModelGeometry3D, Geometry3DTypes, TextGeometry3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
8368
8489
  import { Geometry2D, Geometry2DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry2d';
8369
8490
  import type { StyleComponent } from '@mappedin/mappedin-js/geojson/src/components/styles/style';
8370
8491
  import type { GeometryGroupStyleComponent } from '@mappedin/mappedin-js/geojson/src/components/geometry-group-style';
@@ -8406,6 +8527,11 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/utils' {
8406
8527
  * Handle state update of the text3d geometry.
8407
8528
  */
8408
8529
  export function handleText3DUpdate(geometry: TextGeometry3D, update: Partial<Text3DState>): void;
8530
+ /**
8531
+ * @internal
8532
+ */
8533
+ export const MODEL_UPATE_PROPS: KeysOfUnion<ModelState>[];
8534
+ export function handleModelStyleUpdate(geometry: ModelGeometry3D, update: Partial<ModelState>): void;
8409
8535
  }
8410
8536
 
8411
8537
  declare module '@mappedin/mappedin-js/packages/geojson-navigator' {
@@ -8511,11 +8637,13 @@ declare module '@mappedin/mappedin-js/geojson/src/utils/debug' {
8511
8637
  import type Core from '@mappedin/mappedin-js/geojson/src/renderer';
8512
8638
  const DEFAULT_DEBUG_STATE: {
8513
8639
  showPolygonLabelTextAreaMesh: boolean;
8640
+ showEnvMap: boolean;
8514
8641
  };
8515
8642
  export type DebugState = typeof DEFAULT_DEBUG_STATE;
8516
8643
  export class Debug {
8517
8644
  state: {
8518
8645
  showPolygonLabelTextAreaMesh: boolean;
8646
+ showEnvMap: boolean;
8519
8647
  };
8520
8648
  core: Core;
8521
8649
  constructor(core: Core);
@@ -8688,6 +8816,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/html-controls/system'
8688
8816
  declare module '@mappedin/mappedin-js/geojson/src/components/styles' {
8689
8817
  export { StyleComponent, DEFAULT_COLOR, type MaterialSide } from '@mappedin/mappedin-js/geojson/src/components/styles/style';
8690
8818
  export { Text3DStyleComponent, type Text3DStyle, DEFAULT_TEXT_STYLE } from '@mappedin/mappedin-js/geojson/src/components/styles/text-style';
8819
+ export { ModelStyleComponnet, type ModelStyle } from '@mappedin/mappedin-js/geojson/src/components/styles/model-style';
8691
8820
  }
8692
8821
 
8693
8822
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
@@ -8699,7 +8828,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
8699
8828
  import { Facade, Coordinate, MapObject, Space, Floor, Door } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
8700
8829
  import type { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
8701
8830
  import { Label, Marker, Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
8702
- import { Text3D as Text3DView, type Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
8831
+ import { Text3D as Text3DView, Model, type Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
8703
8832
  import { Navigation } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
8704
8833
  import type { TGetState, TUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/types';
8705
8834
  import { Camera } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera';
@@ -8748,7 +8877,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
8748
8877
  get DynamicFocus(): import("..").DynamicFocus;
8749
8878
  get StackedMaps(): import("..").StackedMaps;
8750
8879
  constructor(rendererCore: RendererCore, mapView: MapView);
8751
- updateState<T extends Space | Text3DView | MapObject | Label | Shape | Marker | Door | Facade | WALLS | DOORS | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
8880
+ updateState<T extends Space | Text3DView | MapObject | Label | Shape | Marker | Model | Door | Facade | WALLS | DOORS | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
8752
8881
  update: () => void;
8753
8882
  getMapDataInternal(): MapDataInternal | undefined;
8754
8883
  getMapData(): MapData | undefined;
@@ -8758,7 +8887,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
8758
8887
  updateWatermark(options: WatermarkUpdateOptions): void;
8759
8888
  get currentFloorStack(): FloorStack;
8760
8889
  get currentFloor(): Floor;
8761
- getState<T extends Space | Text3DView | MapObject | Label | Marker | Image | Shape | string>(target: T): TGetState<T>;
8890
+ getState<T extends Space | Text3DView | MapObject | Label | Marker | Image | Shape | Model | string>(target: T): TGetState<T>;
8762
8891
  setHoverColor(c: string): void;
8763
8892
  getHoverColor(): string | undefined;
8764
8893
  createCoordinate(latitude: number, longitude: number, floor?: Floor): Coordinate;
@@ -8780,13 +8909,14 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
8780
8909
  import { PubSub } from '@packages/internal/common';
8781
8910
  import type { Position, AddLabelOptions, RendererCore, PathState, MarkerState, LineStyle, PaintStyle, EntityId } from '@mappedin/core-sdk';
8782
8911
  import { FloorObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object';
8783
- import type { Coordinate, Directions, Floor, TAddMarkerOptions, TAddPathOptions, TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
8912
+ import type { Directions, Floor, TAddMarkerOptions, TAddPathOptions, TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
8784
8913
  import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddModel, TAddImageOptions, TDirectionInstruction, TAddText3DOptions, IAnchorable } from '@mappedin/mappedin-js/mappedin-js/src/types';
8785
8914
  import { type AggregatedStyleMap } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils';
8786
8915
  import { StackedMaps } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
8787
8916
  import type { TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
8788
8917
  import type { Path, Shape, Label } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
8789
- import { type MapDataInternal, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
8918
+ import { Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
8919
+ import type { Coordinate, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
8790
8920
  import { type GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
8791
8921
  import { FloorStackObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-stack-object';
8792
8922
  import { DynamicFocus } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/dynamic-focus';
@@ -9220,6 +9350,18 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera' {
9220
9350
  * @param panMode The new pan mode.
9221
9351
  */
9222
9352
  setPanMode(panMode: 'default' | 'elevation'): void;
9353
+ /**
9354
+ * Get the camera transform that can be used to focus on a target or array of targets. Similar to {@link Camera.focusOn} but returns the transform directly.
9355
+ * @param target The target(s) to get the camera transform for.
9356
+ * @param options Optional settings for the camera transform.
9357
+ * @returns The camera transform which can then be passed to {@link Camera.set} or {@link Camera.animateTo}.
9358
+ *
9359
+ * @example
9360
+ * // Focus on a single space
9361
+ * const transform = mapView.Camera.getCameraFocusTransform(space, { minZoomLevel: 5 });
9362
+ * mapView.Camera.animateTo(transform);
9363
+ */
9364
+ getFocusOnTransform(target: IFocusable | IFocusable[], options?: TFocusOnOptions): TCameraTarget;
9223
9365
  /**
9224
9366
  * Focuses the camera on a specific target or array of targets.
9225
9367
  *
@@ -9546,7 +9688,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/models' {
9546
9688
  * // Add a {@link Model} to the map.
9547
9689
  * mapView.Models.add(coordinate);
9548
9690
  */
9549
- add(models: TAddModel | TAddModel[], options: TAddModelOptions): Model[];
9691
+ add(models: TAddModel, options: TAddModelOptions): Model;
9550
9692
  /**
9551
9693
  * Removes a model from the map.
9552
9694
  *
@@ -10772,7 +10914,7 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry3d' {
10772
10914
  import type { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/geometry2d';
10773
10915
  import { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
10774
10916
  import type { Text3DComponent } from '@mappedin/mappedin-js/geojson/src/components/text3d';
10775
- import type { Text3DStyleComponent } from '@mappedin/mappedin-js/geojson/src/components/styles';
10917
+ import type { ModelStyleComponnet, Text3DStyleComponent } from '@mappedin/mappedin-js/geojson/src/components/styles';
10776
10918
  export enum Geometry3DComponents {
10777
10919
  Mesh = 0,
10778
10920
  Style = 1,
@@ -10783,6 +10925,10 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry3d' {
10783
10925
  type: Geometry3DObjectTypes;
10784
10926
  userData: {
10785
10927
  entityId: string;
10928
+ /**
10929
+ * TODO: remove this when proper instancing is handled
10930
+ */
10931
+ isSingleModel?: boolean;
10786
10932
  type: Geometry3DObjectTypes;
10787
10933
  };
10788
10934
  }
@@ -10795,7 +10941,7 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry3d' {
10795
10941
  }
10796
10942
  export type MeshComponentTypes = MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent | Text3DComponent | ImageComponent;
10797
10943
  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;
10798
- export class Geometry3D<M extends MeshComponentTypes = MeshComponent, S extends StyleComponent | Text3DStyleComponent = StyleComponent, I extends InteractionComponent = InteractionComponent, T extends MappedComponentType<M> = MappedComponentType<M>> {
10944
+ export class Geometry3D<M extends MeshComponentTypes = MeshComponent, S extends StyleComponent | Text3DStyleComponent | ModelStyleComponnet = StyleComponent, I extends InteractionComponent = InteractionComponent, T extends MappedComponentType<M> = MappedComponentType<M>> {
10799
10945
  id: string | number;
10800
10946
  components: [M, S, I?];
10801
10947
  get object3d(): M["mesh"];
@@ -10809,7 +10955,7 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry3d' {
10809
10955
  }
10810
10956
  export type TextGeometry3D = Geometry3D<Text3DComponent, Text3DStyleComponent, InteractionComponent, 'text3d'>;
10811
10957
  export type CustomGeometry3D = Geometry3D<CustomGeometryComponent, StyleComponent, InteractionComponent, 'custom-geometry'>;
10812
- export type ModelGeometry3D = Geometry3D<ModelComponent, StyleComponent, InteractionComponent, 'model'>;
10958
+ export type ModelGeometry3D = Geometry3D<ModelComponent, ModelStyleComponnet, InteractionComponent, 'model'>;
10813
10959
  export type PathGeometry3D = Geometry3D<PathComponent, StyleComponent, InteractionComponent, 'path'>;
10814
10960
  export type ImageGeometry3D = Geometry3D<ImageComponent, StyleComponent, InteractionComponent, 'image'>;
10815
10961
  export type MeshGeometry3D = Geometry3D<MeshComponent, StyleComponent, InteractionComponent, 'geometry'>;
@@ -10986,7 +11132,9 @@ declare module '@mappedin/mappedin-js/geojson/src/components/geometry-group-styl
10986
11132
  export class GeometryGroupStyleComponent implements GeometryGroupStyle {
10987
11133
  #private;
10988
11134
  color: string;
11135
+ initialColor: string;
10989
11136
  topColor?: string;
11137
+ initialTopColor?: string;
10990
11138
  opacity: number;
10991
11139
  height?: number;
10992
11140
  outline: boolean;
@@ -11052,13 +11200,13 @@ declare module '@mappedin/mappedin-js/geojson/src/components/image' {
11052
11200
  }, "strip", z.ZodTypeAny, {
11053
11201
  height: number;
11054
11202
  width: number;
11055
- rotation?: number | undefined;
11056
11203
  verticalOffset?: number | undefined;
11204
+ rotation?: number | undefined;
11057
11205
  }, {
11058
11206
  height: number;
11059
11207
  width: number;
11060
- rotation?: number | undefined;
11061
11208
  verticalOffset?: number | undefined;
11209
+ rotation?: number | undefined;
11062
11210
  }>;
11063
11211
  geometry: z.ZodObject<{
11064
11212
  type: z.ZodEnum<["Point"]>;
@@ -11079,8 +11227,8 @@ declare module '@mappedin/mappedin-js/geojson/src/components/image' {
11079
11227
  properties: {
11080
11228
  height: number;
11081
11229
  width: number;
11082
- rotation?: number | undefined;
11083
11230
  verticalOffset?: number | undefined;
11231
+ rotation?: number | undefined;
11084
11232
  };
11085
11233
  }, {
11086
11234
  type: "Feature";
@@ -11091,8 +11239,8 @@ declare module '@mappedin/mappedin-js/geojson/src/components/image' {
11091
11239
  properties: {
11092
11240
  height: number;
11093
11241
  width: number;
11094
- rotation?: number | undefined;
11095
11242
  verticalOffset?: number | undefined;
11243
+ rotation?: number | undefined;
11096
11244
  };
11097
11245
  }>;
11098
11246
  export function validateImage(id: string | number, feature: Feature<Point, ImageProperties>, style: ImageStyle): void;
@@ -11140,6 +11288,7 @@ declare module '@mappedin/mappedin-js/geojson/src/types/options' {
11140
11288
  import type { Map as MapLibreMap } from '@mappedin/mappedin-js/packages/outdoor-context-v4';
11141
11289
  import type { AttributionControlOptions } from '@mappedin/mappedin-js/geojson/src/systems/html-controls/system';
11142
11290
  import type { WatermarkOptions } from '@mappedin/mappedin-js/geojson/src';
11291
+ export type EnvMapOptions = 'basic' | false;
11143
11292
  export type RendererCoreOptions = Partial<{
11144
11293
  center?: Position;
11145
11294
  zoomLevel?: number;
@@ -11164,6 +11313,11 @@ declare module '@mappedin/mappedin-js/geojson/src/types/options' {
11164
11313
  onWebGLRendererError?: (error: Error) => void;
11165
11314
  watermark?: WatermarkOptions;
11166
11315
  attribution?: AttributionControlOptions;
11316
+ /**
11317
+ * environment map for reflections.
11318
+ * @default 'basic'
11319
+ */
11320
+ environment?: EnvMapOptions;
11167
11321
  }>;
11168
11322
  }
11169
11323
 
@@ -11265,7 +11419,7 @@ declare module '@mappedin/mappedin-js/packages/common/pubsub' {
11265
11419
 
11266
11420
  declare module '@mappedin/mappedin-js/geojson/src/services/renderer' {
11267
11421
  import type { Scene, Camera } from 'three';
11268
- import { Color, WebGL1Renderer, WebGLRenderer } from 'three';
11422
+ import { Color, WebGLRenderer } from 'three';
11269
11423
  export type TRendererOptions = {
11270
11424
  alpha: boolean;
11271
11425
  onWebGLRendererError: (e: Error) => void;
@@ -11277,12 +11431,13 @@ declare module '@mappedin/mappedin-js/geojson/src/services/renderer' {
11277
11431
  width: number;
11278
11432
  height: number;
11279
11433
  options: TRendererOptions;
11280
- renderer?: WebGLRenderer | WebGL1Renderer;
11281
- constructor(renderOptions: any, targetWebGLVersion?: number);
11434
+ renderer?: WebGLRenderer;
11435
+ constructor(renderOptions: any);
11282
11436
  /**
11283
11437
  * Dispose of the renderer and its buffers.
11284
11438
  */
11285
11439
  destroy(): void;
11440
+ enabledLayers: Set<number>;
11286
11441
  /**
11287
11442
  * Re-render the scene, depending on which parts of the scene have been
11288
11443
  * invalidated.
@@ -11325,10 +11480,12 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-opti
11325
11480
  import { MeshComponent, type MeshComponentProperties } from '@mappedin/mappedin-js/geojson/src/components/mesh';
11326
11481
  import { StyleComponent } from '@mappedin/mappedin-js/geojson/src/components/styles/style';
11327
11482
  import type { Feature, LineString, MultiPolygon, Point, Polygon } from 'geojson';
11328
- import type { LineStyle, ModelProperties, ModelStyle, PaintStyle } from '@mappedin/mappedin-js/geojson/src/types';
11329
- import type { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
11483
+ import type { LineStyle, ModelProperties, PaintStyle } from '@mappedin/mappedin-js/geojson/src/types';
11484
+ import { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
11330
11485
  import type { ModelGeometry3D } from '@mappedin/mappedin-js/geojson/src/entities';
11331
11486
  import { PubSub } from '@packages/internal/common';
11487
+ import type { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
11488
+ import type { ModelStyle } from '@mappedin/mappedin-js/geojson/src/components/styles';
11332
11489
  export class MeshCreationAndOptimizationSystem extends PubSub<{
11333
11490
  'model-loaded': void;
11334
11491
  }> {
@@ -11336,14 +11493,14 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-opti
11336
11493
  convertTo3DMapPosition: any;
11337
11494
  loader?: GLTFLoader;
11338
11495
  constructor(state: RendererState, convertTo3DMapPosition: any);
11339
- getGLTFLoader(): Promise<void>;
11496
+ getGLTFLoader(): Promise<GLTFLoader>;
11340
11497
  createEntityFromFeature(id: string | number, feature: Feature<Polygon | LineString | MultiPolygon, MeshComponentProperties>, style?: LineStyle | PaintStyle): Geometry3D<MeshComponent, StyleComponent, import("../../components/interaction").InteractionComponent, "geometry">;
11341
- createModelFromFeature(id: string | number, feature: Feature<Point, ModelProperties>, style?: ModelStyle): ModelGeometry3D;
11498
+ createModelFromFeature(id: string | number, feature: Feature<Point, ModelProperties>, style?: Partial<ModelStyle>): ModelGeometry3D;
11342
11499
  populateEntityMesh(entity: Geometry3D, geometry: BufferGeometry): void;
11343
- populateModelGroup(entities: Set<string | number>, url: string, tree: any): Promise<Geometry3DObject3D>;
11500
+ populateModelGroup(entities: Set<string | number>, url: string, tree: GeometryGroupObject3D): Promise<Geometry3DObject3D>;
11344
11501
  populateEntityGroup(entities: Set<string | number>): Set<string | number>;
11345
11502
  optimize(tree: any): void;
11346
- update(): void;
11503
+ update(): Promise<void[]> | undefined;
11347
11504
  }
11348
11505
  }
11349
11506
 
@@ -11471,7 +11628,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/render/system' {
11471
11628
  constructor(renderer: Renderer, state: RendererState, mode: RendererCore['mode'], scene: Scene, cameraObject: PerspectiveCamera, viewCamera: Camera, systems: Systems);
11472
11629
  twoDdirty: boolean;
11473
11630
  threeDdirty: boolean;
11474
- update: (sync?: boolean) => Promise<any>;
11631
+ update: (sync?: boolean) => Promise<any> | undefined;
11475
11632
  destroy(): void;
11476
11633
  }
11477
11634
  }
@@ -11869,6 +12026,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/styles/style' {
11869
12026
  export class StyleComponent implements Style {
11870
12027
  initialColor: string;
11871
12028
  color: string;
12029
+ initialTopColor?: string;
11872
12030
  topColor?: string;
11873
12031
  topTexture?: string;
11874
12032
  texture?: string;
@@ -12175,6 +12333,59 @@ declare module '@mappedin/mappedin-js/geojson/src/components/styles/text-style'
12175
12333
  };
12176
12334
  }
12177
12335
 
12336
+ declare module '@mappedin/mappedin-js/geojson/src/components/styles/model-style' {
12337
+ type MaterialStyle = {
12338
+ color: string;
12339
+ };
12340
+ export type ModelStyle = {
12341
+ /**
12342
+ * Model's URL. Can be based64 inlined url.
12343
+ */
12344
+ url: string;
12345
+ /**
12346
+ * Visiiblity of the model group
12347
+ */
12348
+ visible: boolean;
12349
+ /**
12350
+ * Opacity of the model group.
12351
+ */
12352
+ opacity: number;
12353
+ /**
12354
+ * Change material state by name
12355
+ * @example
12356
+ * ```ts
12357
+ * mapView.Models.add(
12358
+ * { target: new Coordinate(45, -75) },
12359
+ * {
12360
+ * url: 'bed.glb',
12361
+ * materials: {
12362
+ * Default: {
12363
+ * color: MAPPEDIN_COLOR.orange,
12364
+ * },
12365
+ * },
12366
+ * },
12367
+ * );
12368
+ * ```
12369
+ */
12370
+ material: {
12371
+ [name: string]: MaterialStyle;
12372
+ };
12373
+ /**
12374
+ * vertical offset of the model in meters off the floor
12375
+ */
12376
+ verticalOffset: number;
12377
+ };
12378
+ export class ModelStyleComponnet implements Partial<ModelStyle> {
12379
+ dirty: boolean;
12380
+ visible: boolean;
12381
+ opacity: number;
12382
+ verticalOffset: number;
12383
+ material?: ModelStyle['material'];
12384
+ constructor(init?: Partial<ModelStyle>);
12385
+ }
12386
+ export {};
12387
+ }
12388
+
12178
12389
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object' {
12179
12390
  import type { Polygon, MultiPolygon, FloorProperties as MVFFloor, ParsedMVF, Feature } from '@mappedin/mvf';
12180
12391
  import type { RendererCore } from '@mappedin/core-sdk';
@@ -12461,6 +12672,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/interactions/system' {
12461
12672
  getCursor(): CursorTypes;
12462
12673
  resize: () => void;
12463
12674
  }
12675
+ export function findModelParent(object: Object3D): Object3D<import("three").Object3DEventMap> | undefined;
12464
12676
  export {};
12465
12677
  }
12466
12678
 
@@ -12902,6 +13114,12 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/system' {
12902
13114
  convertZoomLevelToAltitude: (zoomLevel: number) => number;
12903
13115
  static CAMERA_FRAME_PADDING_SIDES: readonly ["top", "bottom", "left", "right"];
12904
13116
  debugContainer: Object3D<import("three").Object3DEventMap>;
13117
+ getCameraFrameForCoordinates(pointCloud: Vector3[], options: CameraFocusOnOptions & {
13118
+ padding: InsetPadding;
13119
+ }): {
13120
+ center: Vector3;
13121
+ zoomLevel: number;
13122
+ };
12905
13123
  focusOn(pointCloud: Vector3[], options: CameraFocusOnOptions & {
12906
13124
  padding: InsetPadding;
12907
13125
  }): void;