@mappedin/mappedin-js 5.44.0 → 5.45.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,8 @@
10
10
 
11
11
  declare module '@mappedin/mappedin-js' {
12
12
  import { MapView } from '@mappedin/mappedin-js/renderer/public/MapView';
13
- import { getVenue, getVenueMVF, getVenueBundle, getVenueMaker, Mappedin, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, MappedinDestinationSet, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions, hydrateVenue, GET_VENUE_EVENT } from '@mappedin/mappedin-js/get-venue';
13
+ import type { Mappedin, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions } from '@mappedin/mappedin-js/get-venue';
14
+ import { getVenue, getVenueMVF, getVenueBundle, getVenueMaker, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, MappedinDestinationSet, hydrateVenue, GET_VENUE_EVENT } from '@mappedin/mappedin-js/get-venue';
14
15
  import { PositionUpdater } from '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
15
16
  import type { TMapViewOptions } from '@mappedin/mappedin-js/renderer/MapView.types';
16
17
  export { E_SDK_LOG_LEVEL, setLoggerLevel } from '@mappedin/mappedin-js/common/Mappedin.Logger';
@@ -33,6 +34,7 @@ declare module '@mappedin/mappedin-js' {
33
34
  export type { DynamicFocus } from '@mappedin/mappedin-js/renderer/public/api/DynamicFocus';
34
35
  export type { Layers } from '@mappedin/mappedin-js/renderer/public/api/Layers';
35
36
  export type { TOOLTIP_ANCHOR } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartTooltip';
37
+ export { setStackedMapsOverviewTiltInDegrees } from '@mappedin/mappedin-js/renderer/internal';
36
38
  export type TMappedinInitializeOutput = {
37
39
  mapView: MapView;
38
40
  venue: Mappedin;
@@ -59,8 +61,8 @@ declare module '@mappedin/mappedin-js' {
59
61
  export { COLLISION_RANKING_TIERS, STATE, E_SDK_EVENT, E_BLUEDOT_STATE_REASON, E_BLUEDOT_MARKER_STATE, E_BLUEDOT_EVENT, E_BLUEDOT_STATE, E_CAMERA_EVENT, E_CAMERA_DIRECTION, SAFE_AREA_INSET_TYPE, ANIMATION_TWEENS, CAMERA_EASING_MODE, STACKED_MAPS_STATE, MARKER_ANCHOR, GEOLOCATION_STATUS, E_MAP_CHANGED_REASON, } from '@mappedin/mappedin-js/renderer/MapView.enums';
60
62
  export { getVenue, getVenueMVF, getVenueBundle, getVenueMaker, showVenue, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, hydrateVenue, PositionUpdater, MappedinDestinationSet, GET_VENUE_EVENT, };
61
63
  import DefaultAssetManager from '@mappedin/mappedin-js/renderer/internal/Mappedin.AssetManager';
62
- import { TTileManagerOptions } from '@mappedin/mappedin-js/renderer/internal/outdoor-context/Mappedin.TileManager';
63
- import { TShowWatermarkOptions } from '@mappedin/mappedin-js/renderer/private/controllers/WatermarkController';
64
+ import type { TTileManagerOptions } from '@mappedin/mappedin-js/renderer/internal/outdoor-context/Mappedin.TileManager';
65
+ import type { TShowWatermarkOptions } from '@mappedin/mappedin-js/renderer/private/controllers/WatermarkController';
64
66
  export { setAssetManager } from '@mappedin/mappedin-js/renderer/internal';
65
67
  export { DefaultAssetManager as AssetManager };
66
68
  export type { TMappedinDirective, IAction, IActionArrival, IActionDeparture, IActionExitVortex, IActionTakeVortex, IActionTurn, } from '@mappedin/mappedin-js/get-venue/MappedinDirections';
@@ -106,6 +108,7 @@ declare module '@mappedin/mappedin-js' {
106
108
  export { TILE_RENDER_MODES } from '@mappedin/mappedin-js/renderer/internal/outdoor-context/Mappedin.TileManager';
107
109
  export { AzureOutdoorContextProvider, OpenStreetMapOutdoorContext, } from '@mappedin/mappedin-js/renderer/internal/outdoor-context/Outdoor-Context.provider';
108
110
  export type { IOutdoorContextProvider } from '@mappedin/mappedin-js/renderer/internal/outdoor-context/Outdoor-Context.provider';
111
+ export { setMaplibreWorkerURL } from '@mappedin/mappedin-js/renderer/internal';
109
112
  }
110
113
 
111
114
  declare module '@mappedin/mappedin-js/renderer/public/MapView' {
@@ -3893,6 +3896,198 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartTooltip' {
3893
3896
  export default SmartTooltip;
3894
3897
  }
3895
3898
 
3899
+ declare module '@mappedin/mappedin-js/renderer/internal' {
3900
+ import { Texture } from 'three';
3901
+ import { STACKED_MAPS_STATE, STATE } from '@mappedin/mappedin-js/renderer/MapView.enums';
3902
+ import { TMapClickEvent } from '@mappedin/mappedin-js/renderer/MapView.types';
3903
+ import { MappedinMap } from '@mappedin/mappedin-js/get-venue';
3904
+ import { Vector3 } from '@mappedin/mvf';
3905
+ export { MappedinMap, Mappedin, MappedinCoordinate, MappedinPolygon, MappedinNode, MappedinLocation, MappedinVenue, } from '@mappedin/mappedin-js/get-venue';
3906
+ export type { TEnableBlueDotOptions, TFloatingLabelAppearance, TGeolocationObject, TPathOptions, TConnectionProps, TConnectionTemplateFn, TMarkerTemplateProps, TMarkerTemplateFn, TJourneyOptions, TPadding, TCreateMarkerOptions, TAnimationOptions, TCreateTooltipInternalOptions, TCreateTooltipCommonOptions, TCreateTooltipOptions, TCreateTextTooltipOptions, TCreateCustomInnerHTMLTooltipOptions, TCreateCustomTooltipOptions, TCreateThreeDMarkerOptions, TGetPolygonsAtCoordinateOptions, TMapViewOptions, TMapViewOptionsLegacy, TFlatLabelOptions, TFlatLabelAppearance, TFloatingLabelPolygonOptions, TAddFlatLabelOptions, TAddFloatingLabelOptions, TLabelAllLocationCommonOptions, TLabelAllLocationFloatingLabelOptions, TLabelAllLocationFlatLabelOptions, TFloatingLabelAllLocationsOptions, TFlatLabelAllLocationsOptions, changeListenerFn, TMapClickEvent, E_SDK_EVENT_PAYLOAD, E_BLUEDOT_EVENT_PAYLOAD, CAMERA_EVENT_PAYLOAD, } from '@mappedin/mappedin-js/renderer/MapView.types';
3907
+ export { labelThemes } from '@mappedin/mappedin-js/renderer/MapView.types';
3908
+ export { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, E_BLUEDOT_STATE_REASON, E_BLUEDOT_STATE, E_BLUEDOT_MARKER_STATE, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT, E_CAMERA_DIRECTION, SAFE_AREA_INSET_TYPE, CAMERA_EASING_MODE, ANIMATION_TWEENS, STACKED_MAPS_STATE, } from '@mappedin/mappedin-js/renderer/MapView.enums';
3909
+ export { MAP_RENDER_MODE } from '@mappedin/mappedin-js/get-venue';
3910
+ export { default as JSONSceneLoader } from '@mappedin/mappedin-js/renderer/internal/json-scene-loader';
3911
+ export { default as RENDER } from '@mappedin/mappedin-js/renderer/internal/Mappedin.RenderTasks';
3912
+ export { FrameUpdate, FrameTask, TaskScheduler } from '@mappedin/mappedin-js/get-venue/Mappedin.TaskScheduler';
3913
+ export { default as SceneManager } from '@mappedin/mappedin-js/renderer/private/scene-manager/MapView.SceneManager';
3914
+ export { default as DynamicFocusSceneManager } from '@mappedin/mappedin-js/renderer/private/scene-manager/MapView.DynamicFocusSceneManager';
3915
+ export { PubSub } from '@mappedin/mappedin-js/get-venue/pub-sub.typed';
3916
+ export { default as MapObject } from '@mappedin/mappedin-js/renderer/internal/Mappedin.MapObject';
3917
+ export { default as CAMERA_LAYER } from '@mappedin/mappedin-js/renderer/internal/Mappedin.CameraLayers';
3918
+ export { default as AssetManager } from '@mappedin/mappedin-js/renderer/internal/Mappedin.AssetManager';
3919
+ export { BundleAssetManager } from '@mappedin/mappedin-js/renderer/bundle-asset-manager';
3920
+ /**
3921
+ * Internal Events and Payloads
3922
+ */
3923
+ export enum INTERNAL_EVENT {
3924
+ ON_FIRST_MAP_LOADED = 0,
3925
+ TEXTURE_LOADED = 1,
3926
+ RENDER = 2,
3927
+ RENDER_NOW = 3,
3928
+ UPDATE_FLIPPABLES = 4,
3929
+ SET_SCENE_MAP = 5,
3930
+ SET_SCENE_START = 6,
3931
+ SET_SCENE = 7,
3932
+ SCENE_VISIBLITY_CHANGED = 8,
3933
+ CAMERA_MOVING = 9,
3934
+ SET_BLUE_DOT_SIZE_FROM_ZOOM = 10,
3935
+ PUBLISH_BLUE_DOT = 11,
3936
+ SET_STATE_SILENT = 12,
3937
+ BLUE_DOT_UPDATE_POSITION = 13,
3938
+ BLUE_DOT_SET_FOLLOWING = 14,
3939
+ CLEAR_MOUSE = 15,
3940
+ MAP_CLICK = 16,
3941
+ USER_ZOOM = 17,
3942
+ USER_ZOOM_BEGIN = 18,
3943
+ USER_ROTATE = 19,
3944
+ USER_ROTATE_BEGIN = 20,
3945
+ USER_PAN = 21,
3946
+ USER_PAN_BEGIN = 22,
3947
+ USER_TILT = 23,
3948
+ USER_MULTI_BEGIN = 24,
3949
+ USER_MULTI_END = 25,
3950
+ FOCUSON_BEGIN = 26,
3951
+ USER_HANDS_ON = 27,
3952
+ USER_HANDS_OFF = 28,
3953
+ JOURNEY_CREATED = 29,
3954
+ JOURNEY_DESTROYED = 30,
3955
+ OUTDOOR_VIEW_LOADED = 31,
3956
+ LAYER_VISIBILITY_CHANGED = 32,
3957
+ USER_INTERACTION_START = 33,
3958
+ USER_INTERACTION_END = 34,
3959
+ STACKED_MAPS_STATE_CHANGE = 35
3960
+ }
3961
+ export type INTERNAL_EVENT_PAYLOAD = {
3962
+ [INTERNAL_EVENT.SET_SCENE_START]: undefined;
3963
+ [INTERNAL_EVENT.SET_SCENE_MAP]: undefined;
3964
+ [INTERNAL_EVENT.ON_FIRST_MAP_LOADED]: undefined;
3965
+ [INTERNAL_EVENT.TEXTURE_LOADED]: Texture;
3966
+ [INTERNAL_EVENT.OUTDOOR_VIEW_LOADED]: undefined;
3967
+ [INTERNAL_EVENT.RENDER]: undefined;
3968
+ [INTERNAL_EVENT.RENDER_NOW]: undefined;
3969
+ [INTERNAL_EVENT.UPDATE_FLIPPABLES]: undefined | boolean;
3970
+ [INTERNAL_EVENT.SET_SCENE]: {
3971
+ context?: string;
3972
+ };
3973
+ [INTERNAL_EVENT.CAMERA_MOVING]: {
3974
+ position: Vector3;
3975
+ tilt: number;
3976
+ rotation: number;
3977
+ zoom: number;
3978
+ };
3979
+ [INTERNAL_EVENT.SET_BLUE_DOT_SIZE_FROM_ZOOM]: number;
3980
+ [INTERNAL_EVENT.PUBLISH_BLUE_DOT]: undefined;
3981
+ [INTERNAL_EVENT.CLEAR_MOUSE]: undefined;
3982
+ [INTERNAL_EVENT.SET_STATE_SILENT]: {
3983
+ state: STATE;
3984
+ };
3985
+ [INTERNAL_EVENT.BLUE_DOT_UPDATE_POSITION]: {
3986
+ x: number;
3987
+ y: number;
3988
+ };
3989
+ [INTERNAL_EVENT.BLUE_DOT_SET_FOLLOWING]: boolean;
3990
+ [INTERNAL_EVENT.MAP_CLICK]: TMapClickEvent;
3991
+ [INTERNAL_EVENT.USER_ZOOM]: undefined;
3992
+ [INTERNAL_EVENT.USER_ZOOM_BEGIN]: undefined;
3993
+ [INTERNAL_EVENT.USER_ROTATE_BEGIN]: undefined;
3994
+ [INTERNAL_EVENT.USER_MULTI_BEGIN]: undefined;
3995
+ [INTERNAL_EVENT.USER_PAN_BEGIN]: undefined;
3996
+ [INTERNAL_EVENT.USER_ROTATE]: undefined;
3997
+ [INTERNAL_EVENT.USER_MULTI_END]: undefined;
3998
+ [INTERNAL_EVENT.FOCUSON_BEGIN]: undefined;
3999
+ [INTERNAL_EVENT.USER_HANDS_ON]: undefined;
4000
+ [INTERNAL_EVENT.USER_HANDS_OFF]: undefined;
4001
+ [INTERNAL_EVENT.USER_INTERACTION_START]: undefined;
4002
+ [INTERNAL_EVENT.USER_INTERACTION_END]: undefined;
4003
+ [INTERNAL_EVENT.USER_PAN]: undefined;
4004
+ [INTERNAL_EVENT.USER_TILT]: undefined;
4005
+ [INTERNAL_EVENT.LAYER_VISIBILITY_CHANGED]: MappedinMap;
4006
+ [INTERNAL_EVENT.JOURNEY_CREATED]: undefined;
4007
+ [INTERNAL_EVENT.JOURNEY_DESTROYED]: undefined;
4008
+ [INTERNAL_EVENT.SCENE_VISIBLITY_CHANGED]: undefined;
4009
+ [INTERNAL_EVENT.USER_INTERACTION_START]: undefined;
4010
+ [INTERNAL_EVENT.USER_INTERACTION_END]: undefined;
4011
+ [INTERNAL_EVENT.STACKED_MAPS_STATE_CHANGE]: STACKED_MAPS_STATE;
4012
+ };
4013
+ /**
4014
+ * Factories
4015
+ */
4016
+ export { Atlas, FlatLabel } from '@mappedin/mappedin-js/renderer/internal/Mappedin.LabelAtlas.js';
4017
+ export { default as HoverLabel } from '@mappedin/mappedin-js/renderer/internal/Mappedin.HoverLabel';
4018
+ export { default as BaseCollider } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider';
4019
+ export { default as InternalFloatingLabel } from '@mappedin/mappedin-js/renderer/internal/Mappedin.FloatingLabel';
4020
+ export { default as HTMLCollider } from '@mappedin/mappedin-js/renderer/internal/Mappedin.HTMLCollider';
4021
+ export { Marker } from '@mappedin/mappedin-js/renderer/private/controllers/MarkersController';
4022
+ export { default as SmartTooltip } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartTooltip';
4023
+ export { default as InternalMarker } from '@mappedin/mappedin-js/renderer/internal/Mappedin.Marker';
4024
+ export { ThreeJSMarkerHandle } from '@mappedin/mappedin-js/renderer/internal/Mappedin.MapObject';
4025
+ export { default as MapViewScene } from '@mappedin/mappedin-js/renderer/private/scene-manager/MapView.Scene';
4026
+ export { default as MapViewStackScene } from '@mappedin/mappedin-js/renderer/private/scene-manager/MapView.StackScene';
4027
+ export { default as Element } from '@mappedin/mappedin-js/renderer/internal/Mappedin.Element';
4028
+ export { default as FlippableImage } from '@mappedin/mappedin-js/renderer/internal/Mappedin.FlippableImage';
4029
+ export { default as Building } from '@mappedin/mappedin-js/renderer/private/scene-manager/dynamic-focus-scene-manager/building';
4030
+ export { default as DynamicFocusScene } from '@mappedin/mappedin-js/renderer/private/scene-manager/dynamic-focus-scene-manager/dynamic-focus-scene';
4031
+ /**
4032
+ * Controllers/Managers
4033
+ */
4034
+ export { default as PathsController, Path } from '@mappedin/mappedin-js/renderer/private/controllers/PathsController';
4035
+ export { default as FloatingLabelsController } from '@mappedin/mappedin-js/renderer/private/controllers/FloatingLabelsController';
4036
+ export { default as FlatLabelsController } from '@mappedin/mappedin-js/renderer/private/controllers/FlatLabelsController';
4037
+ export { default as PolygonColorsController } from '@mappedin/mappedin-js/renderer/private/controllers/PolygonColorsController';
4038
+ export { default as PolygonHoverColorsController } from '@mappedin/mappedin-js/renderer/private/controllers/PolygonHoverColorsController';
4039
+ export { default as MarkersController } from '@mappedin/mappedin-js/renderer/private/controllers/MarkersController';
4040
+ export { default as PolygonInteractionController } from '@mappedin/mappedin-js/renderer/private/controllers/PolygonInteractionController';
4041
+ export { default as TooltipsController } from '@mappedin/mappedin-js/renderer/private/controllers/TooltipsController';
4042
+ export { default as PolygonStatesController } from '@mappedin/mappedin-js/renderer/private/controllers/PolygonStatesController';
4043
+ export { default as PolygonImagesController } from '@mappedin/mappedin-js/renderer/private/controllers/PolygonImagesController';
4044
+ export { default as ThreeDMarkersController } from '@mappedin/mappedin-js/renderer/private/controllers/ThreeDMarkersController';
4045
+ export { default as BlueDotController } from '@mappedin/mappedin-js/renderer/private/controllers/BlueDotController';
4046
+ export { default as BlueDotManager } from '@mappedin/mappedin-js/renderer/internal/blue-dot-manager';
4047
+ export { default as CameraController } from '@mappedin/mappedin-js/renderer/private/controllers/CameraController';
4048
+ export { default as EventSystem } from '@mappedin/mappedin-js/renderer/private/controllers/EventSystem';
4049
+ export { default as ClosedPolygonManager } from '@mappedin/mappedin-js/renderer/internal/Mappedin.ClosedPolygonManager';
4050
+ export { default as BinaryAssetManager } from '@mappedin/mappedin-js/renderer/internal/Mappedin.BinaryAssetManager';
4051
+ export { default as SmartCollisionEngine } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollisionEngine';
4052
+ export { default as BillboardManager } from '@mappedin/mappedin-js/renderer/private/controllers/BillboardManager';
4053
+ export { default as StackedMapsController, setStackedMapsOverviewTiltInDegrees, } from '@mappedin/mappedin-js/renderer/private/controllers/StackedMapsController';
4054
+ export { MultiBufferRenderer } from '@mappedin/mappedin-js/renderer/internal/Mappedin.Renderer';
4055
+ export { JourneyController } from '@mappedin/mappedin-js/renderer/private/controllers/JourneyController';
4056
+ export { default as OutdoorViewController } from '@mappedin/mappedin-js/renderer/private/controllers/OutdoorViewController';
4057
+ export { default as ExportController } from '@mappedin/mappedin-js/renderer/private/controllers/ExportController';
4058
+ export { default as WatermarkController } from '@mappedin/mappedin-js/renderer/private/controllers/WatermarkController';
4059
+ export { default as LayerController } from '@mappedin/mappedin-js/renderer/private/controllers/LayerController';
4060
+ /**
4061
+ * Types
4062
+ */
4063
+ export type { TSceneTransitionOptions } from '@mappedin/mappedin-js/renderer/private/scene-manager/MapView.SceneManager';
4064
+ export type { IPositionUpdater, IBlueDotCore } from '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
4065
+ export type { TSafeAreaInsets, TCameraTargets, TFocusOnCameraOptions, TCameraTransform, TCameraAnimationOptions, } from '@mappedin/mappedin-js/renderer/private/controllers/CameraController';
4066
+ export type { TColliderPosition } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider';
4067
+ export type { ICollider, TColliderStrategy } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider';
4068
+ export { EColliderAction } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider';
4069
+ export type { IHTMLCollider } from '@mappedin/mappedin-js/renderer/internal/Mappedin.HTMLCollider';
4070
+ export { COLLIDER_STRATEGY_LOW_PRIORITY } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollisionEngine';
4071
+ export { default as BlueDotCore } from '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
4072
+ export { default as BlueDotUI } from '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.ui';
4073
+ export { default as CameraControls } from '@mappedin/mappedin-js/renderer/internal/Mappedin.CameraControls.js';
4074
+ export { default as Renderer } from '@mappedin/mappedin-js/renderer/internal/Mappedin.Renderer.js';
4075
+ export { determineStartingMap, getObject, getObjectId } from '@mappedin/mappedin-js/renderer/internal/utils';
4076
+ export { default as MapManager } from '@mappedin/mappedin-js/renderer/internal/Mappedin.MapManager';
4077
+ export { default as DebugUI } from '@mappedin/mappedin-js/renderer/internal/Mappedin.DebugUI';
4078
+ export { DebugUIScalarSlider, DebugUIColorPicker } from '@mappedin/mappedin-js/renderer/internal/Mappedin.DebugUIControl';
4079
+ export type { Collider, ColliderQuadTree } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollisionEngine';
4080
+ export { MapView } from '@mappedin/mappedin-js/renderer/public/MapView';
4081
+ export { default as Logger } from '@mappedin/mappedin-js/common/Mappedin.Logger';
4082
+ export { TileManager, TILE_COLOR } from '@mappedin/mappedin-js/renderer/internal/outdoor-context/Mappedin.TileManager';
4083
+ export type { ICore } from '@mappedin/mappedin-js/renderer/private/Core.interface';
4084
+ export * from '@mappedin/mappedin-js/renderer/private/Core';
4085
+ const setAssetManager: <T extends import("./internal/Mappedin.AssetManager").default>(am: T) => void;
4086
+ export { setAssetManager };
4087
+ export let MAPLIBRE_WORKER_URL: string;
4088
+ export function setMaplibreWorkerURL(url: string): void;
4089
+ }
4090
+
3896
4091
  declare module '@mappedin/mappedin-js/renderer/MapView.enums' {
3897
4092
  export enum GEOLOCATION_STATUS {
3898
4093
  SUCCESS = 0
@@ -4296,236 +4491,46 @@ declare module '@mappedin/mappedin-js/renderer/private/controllers/WatermarkCont
4296
4491
  export default WatermarkController;
4297
4492
  }
4298
4493
 
4299
- declare module '@mappedin/mappedin-js/renderer/internal' {
4300
- import { Texture } from 'three';
4301
- import { STACKED_MAPS_STATE, STATE } from '@mappedin/mappedin-js/renderer/MapView.enums';
4302
- import { TMapClickEvent } from '@mappedin/mappedin-js/renderer/MapView.types';
4303
- import { MappedinMap } from '@mappedin/mappedin-js/get-venue';
4304
- import { Vector3 } from '@mappedin/mvf';
4305
- export { MappedinMap, Mappedin, MappedinCoordinate, MappedinPolygon, MappedinNode, MappedinLocation, MappedinVenue, } from '@mappedin/mappedin-js/get-venue';
4306
- export type { TEnableBlueDotOptions, TFloatingLabelAppearance, TGeolocationObject, TPathOptions, TConnectionProps, TConnectionTemplateFn, TMarkerTemplateProps, TMarkerTemplateFn, TJourneyOptions, TPadding, TCreateMarkerOptions, TAnimationOptions, TCreateTooltipInternalOptions, TCreateTooltipCommonOptions, TCreateTooltipOptions, TCreateTextTooltipOptions, TCreateCustomInnerHTMLTooltipOptions, TCreateCustomTooltipOptions, TCreateThreeDMarkerOptions, TGetPolygonsAtCoordinateOptions, TMapViewOptions, TMapViewOptionsLegacy, TFlatLabelOptions, TFlatLabelAppearance, TFloatingLabelPolygonOptions, TAddFlatLabelOptions, TAddFloatingLabelOptions, TLabelAllLocationCommonOptions, TLabelAllLocationFloatingLabelOptions, TLabelAllLocationFlatLabelOptions, TFloatingLabelAllLocationsOptions, TFlatLabelAllLocationsOptions, changeListenerFn, TMapClickEvent, E_SDK_EVENT_PAYLOAD, E_BLUEDOT_EVENT_PAYLOAD, CAMERA_EVENT_PAYLOAD, } from '@mappedin/mappedin-js/renderer/MapView.types';
4307
- export { labelThemes } from '@mappedin/mappedin-js/renderer/MapView.types';
4308
- export { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, E_BLUEDOT_STATE_REASON, E_BLUEDOT_STATE, E_BLUEDOT_MARKER_STATE, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT, E_CAMERA_DIRECTION, SAFE_AREA_INSET_TYPE, CAMERA_EASING_MODE, ANIMATION_TWEENS, STACKED_MAPS_STATE, } from '@mappedin/mappedin-js/renderer/MapView.enums';
4309
- export { MAP_RENDER_MODE } from '@mappedin/mappedin-js/get-venue';
4310
- export { default as JSONSceneLoader } from '@mappedin/mappedin-js/renderer/internal/json-scene-loader';
4311
- export { default as RENDER } from '@mappedin/mappedin-js/renderer/internal/Mappedin.RenderTasks';
4312
- export { FrameUpdate, FrameTask, TaskScheduler } from '@mappedin/mappedin-js/get-venue/Mappedin.TaskScheduler';
4313
- export { default as SceneManager } from '@mappedin/mappedin-js/renderer/private/scene-manager/MapView.SceneManager';
4314
- export { default as DynamicFocusSceneManager } from '@mappedin/mappedin-js/renderer/private/scene-manager/MapView.DynamicFocusSceneManager';
4315
- export { PubSub } from '@mappedin/mappedin-js/get-venue/pub-sub.typed';
4316
- export { default as MapObject } from '@mappedin/mappedin-js/renderer/internal/Mappedin.MapObject';
4317
- export { default as CAMERA_LAYER } from '@mappedin/mappedin-js/renderer/internal/Mappedin.CameraLayers';
4318
- export { default as AssetManager } from '@mappedin/mappedin-js/renderer/internal/Mappedin.AssetManager';
4319
- export { BundleAssetManager } from '@mappedin/mappedin-js/renderer/bundle-asset-manager';
4494
+ declare module '@mappedin/mappedin-js/get-venue/MappedinDirections' {
4495
+ import { IDirectionsResult } from '@mappedin/mappedin-js/navigator';
4496
+ import { ACTION_TYPE, BEARING_TYPE } from '@mappedin/mappedin-js/navigator/Directive';
4497
+ import type { MappedinNode, MappedinVortex, MappedinMap, Mappedin } from '@mappedin/mappedin-js/get-venue/internal';
4498
+ export interface IActionDeparture {
4499
+ type: ACTION_TYPE.DEPARTURE;
4500
+ }
4501
+ export interface IActionArrival {
4502
+ type: ACTION_TYPE.ARRIVAL;
4503
+ }
4504
+ export interface IActionTakeVortex {
4505
+ type: ACTION_TYPE.TAKEVORTEX;
4506
+ toMap: MappedinMap;
4507
+ fromMap: MappedinMap;
4508
+ }
4509
+ export interface IActionExitVortex {
4510
+ type: ACTION_TYPE.EXITVORTEX;
4511
+ toMap: MappedinMap;
4512
+ fromMap: MappedinMap;
4513
+ }
4514
+ export interface IActionTurn {
4515
+ type: ACTION_TYPE.TURN;
4516
+ bearing: BEARING_TYPE;
4517
+ referencePosition?: string;
4518
+ }
4519
+ export type IAction = IActionArrival | IActionDeparture | IActionTurn | IActionTakeVortex | IActionExitVortex;
4520
+ /** this is the "overloaded" version of the directive, with get-venue classes instead of stubs */
4521
+ export type TMappedinDirective = {
4522
+ node: MappedinNode;
4523
+ /**
4524
+ * Distance from the last instruction to the current. Useful for turn by turn navigation
4525
+ */
4526
+ distance: number;
4527
+ instruction: string;
4528
+ action?: IAction;
4529
+ atLocation?: MappedinVortex;
4530
+ type?: BEARING_TYPE;
4531
+ };
4320
4532
  /**
4321
- * Internal Events and Payloads
4322
- */
4323
- export enum INTERNAL_EVENT {
4324
- ON_FIRST_MAP_LOADED = 0,
4325
- TEXTURE_LOADED = 1,
4326
- RENDER = 2,
4327
- RENDER_NOW = 3,
4328
- UPDATE_FLIPPABLES = 4,
4329
- SET_SCENE_MAP = 5,
4330
- SET_SCENE_START = 6,
4331
- SET_SCENE = 7,
4332
- SCENE_VISIBLITY_CHANGED = 8,
4333
- CAMERA_MOVING = 9,
4334
- SET_BLUE_DOT_SIZE_FROM_ZOOM = 10,
4335
- PUBLISH_BLUE_DOT = 11,
4336
- SET_STATE_SILENT = 12,
4337
- BLUE_DOT_UPDATE_POSITION = 13,
4338
- BLUE_DOT_SET_FOLLOWING = 14,
4339
- CLEAR_MOUSE = 15,
4340
- MAP_CLICK = 16,
4341
- USER_ZOOM = 17,
4342
- USER_ZOOM_BEGIN = 18,
4343
- USER_ROTATE = 19,
4344
- USER_ROTATE_BEGIN = 20,
4345
- USER_PAN = 21,
4346
- USER_PAN_BEGIN = 22,
4347
- USER_TILT = 23,
4348
- USER_MULTI_BEGIN = 24,
4349
- USER_MULTI_END = 25,
4350
- FOCUSON_BEGIN = 26,
4351
- USER_HANDS_ON = 27,
4352
- USER_HANDS_OFF = 28,
4353
- JOURNEY_CREATED = 29,
4354
- JOURNEY_DESTROYED = 30,
4355
- OUTDOOR_VIEW_LOADED = 31,
4356
- LAYER_VISIBILITY_CHANGED = 32,
4357
- USER_INTERACTION_START = 33,
4358
- USER_INTERACTION_END = 34,
4359
- STACKED_MAPS_STATE_CHANGE = 35
4360
- }
4361
- export type INTERNAL_EVENT_PAYLOAD = {
4362
- [INTERNAL_EVENT.SET_SCENE_START]: undefined;
4363
- [INTERNAL_EVENT.SET_SCENE_MAP]: undefined;
4364
- [INTERNAL_EVENT.ON_FIRST_MAP_LOADED]: undefined;
4365
- [INTERNAL_EVENT.TEXTURE_LOADED]: Texture;
4366
- [INTERNAL_EVENT.OUTDOOR_VIEW_LOADED]: undefined;
4367
- [INTERNAL_EVENT.RENDER]: undefined;
4368
- [INTERNAL_EVENT.RENDER_NOW]: undefined;
4369
- [INTERNAL_EVENT.UPDATE_FLIPPABLES]: undefined | boolean;
4370
- [INTERNAL_EVENT.SET_SCENE]: {
4371
- context?: string;
4372
- };
4373
- [INTERNAL_EVENT.CAMERA_MOVING]: {
4374
- position: Vector3;
4375
- tilt: number;
4376
- rotation: number;
4377
- zoom: number;
4378
- };
4379
- [INTERNAL_EVENT.SET_BLUE_DOT_SIZE_FROM_ZOOM]: number;
4380
- [INTERNAL_EVENT.PUBLISH_BLUE_DOT]: undefined;
4381
- [INTERNAL_EVENT.CLEAR_MOUSE]: undefined;
4382
- [INTERNAL_EVENT.SET_STATE_SILENT]: {
4383
- state: STATE;
4384
- };
4385
- [INTERNAL_EVENT.BLUE_DOT_UPDATE_POSITION]: {
4386
- x: number;
4387
- y: number;
4388
- };
4389
- [INTERNAL_EVENT.BLUE_DOT_SET_FOLLOWING]: boolean;
4390
- [INTERNAL_EVENT.MAP_CLICK]: TMapClickEvent;
4391
- [INTERNAL_EVENT.USER_ZOOM]: undefined;
4392
- [INTERNAL_EVENT.USER_ZOOM_BEGIN]: undefined;
4393
- [INTERNAL_EVENT.USER_ROTATE_BEGIN]: undefined;
4394
- [INTERNAL_EVENT.USER_MULTI_BEGIN]: undefined;
4395
- [INTERNAL_EVENT.USER_PAN_BEGIN]: undefined;
4396
- [INTERNAL_EVENT.USER_ROTATE]: undefined;
4397
- [INTERNAL_EVENT.USER_MULTI_END]: undefined;
4398
- [INTERNAL_EVENT.FOCUSON_BEGIN]: undefined;
4399
- [INTERNAL_EVENT.USER_HANDS_ON]: undefined;
4400
- [INTERNAL_EVENT.USER_HANDS_OFF]: undefined;
4401
- [INTERNAL_EVENT.USER_INTERACTION_START]: undefined;
4402
- [INTERNAL_EVENT.USER_INTERACTION_END]: undefined;
4403
- [INTERNAL_EVENT.USER_PAN]: undefined;
4404
- [INTERNAL_EVENT.USER_TILT]: undefined;
4405
- [INTERNAL_EVENT.LAYER_VISIBILITY_CHANGED]: MappedinMap;
4406
- [INTERNAL_EVENT.JOURNEY_CREATED]: undefined;
4407
- [INTERNAL_EVENT.JOURNEY_DESTROYED]: undefined;
4408
- [INTERNAL_EVENT.SCENE_VISIBLITY_CHANGED]: undefined;
4409
- [INTERNAL_EVENT.USER_INTERACTION_START]: undefined;
4410
- [INTERNAL_EVENT.USER_INTERACTION_END]: undefined;
4411
- [INTERNAL_EVENT.STACKED_MAPS_STATE_CHANGE]: STACKED_MAPS_STATE;
4412
- };
4413
- /**
4414
- * Factories
4415
- */
4416
- export { Atlas, FlatLabel } from '@mappedin/mappedin-js/renderer/internal/Mappedin.LabelAtlas.js';
4417
- export { default as HoverLabel } from '@mappedin/mappedin-js/renderer/internal/Mappedin.HoverLabel';
4418
- export { default as BaseCollider } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider';
4419
- export { default as InternalFloatingLabel } from '@mappedin/mappedin-js/renderer/internal/Mappedin.FloatingLabel';
4420
- export { default as HTMLCollider } from '@mappedin/mappedin-js/renderer/internal/Mappedin.HTMLCollider';
4421
- export { Marker } from '@mappedin/mappedin-js/renderer/private/controllers/MarkersController';
4422
- export { default as SmartTooltip } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartTooltip';
4423
- export { default as InternalMarker } from '@mappedin/mappedin-js/renderer/internal/Mappedin.Marker';
4424
- export { ThreeJSMarkerHandle } from '@mappedin/mappedin-js/renderer/internal/Mappedin.MapObject';
4425
- export { default as MapViewScene } from '@mappedin/mappedin-js/renderer/private/scene-manager/MapView.Scene';
4426
- export { default as MapViewStackScene } from '@mappedin/mappedin-js/renderer/private/scene-manager/MapView.StackScene';
4427
- export { default as Element } from '@mappedin/mappedin-js/renderer/internal/Mappedin.Element';
4428
- export { default as FlippableImage } from '@mappedin/mappedin-js/renderer/internal/Mappedin.FlippableImage';
4429
- export { default as Building } from '@mappedin/mappedin-js/renderer/private/scene-manager/dynamic-focus-scene-manager/building';
4430
- export { default as DynamicFocusScene } from '@mappedin/mappedin-js/renderer/private/scene-manager/dynamic-focus-scene-manager/dynamic-focus-scene';
4431
- /**
4432
- * Controllers/Managers
4433
- */
4434
- export { default as PathsController, Path } from '@mappedin/mappedin-js/renderer/private/controllers/PathsController';
4435
- export { default as FloatingLabelsController } from '@mappedin/mappedin-js/renderer/private/controllers/FloatingLabelsController';
4436
- export { default as FlatLabelsController } from '@mappedin/mappedin-js/renderer/private/controllers/FlatLabelsController';
4437
- export { default as PolygonColorsController } from '@mappedin/mappedin-js/renderer/private/controllers/PolygonColorsController';
4438
- export { default as PolygonHoverColorsController } from '@mappedin/mappedin-js/renderer/private/controllers/PolygonHoverColorsController';
4439
- export { default as MarkersController } from '@mappedin/mappedin-js/renderer/private/controllers/MarkersController';
4440
- export { default as PolygonInteractionController } from '@mappedin/mappedin-js/renderer/private/controllers/PolygonInteractionController';
4441
- export { default as TooltipsController } from '@mappedin/mappedin-js/renderer/private/controllers/TooltipsController';
4442
- export { default as PolygonStatesController } from '@mappedin/mappedin-js/renderer/private/controllers/PolygonStatesController';
4443
- export { default as PolygonImagesController } from '@mappedin/mappedin-js/renderer/private/controllers/PolygonImagesController';
4444
- export { default as ThreeDMarkersController } from '@mappedin/mappedin-js/renderer/private/controllers/ThreeDMarkersController';
4445
- export { default as BlueDotController } from '@mappedin/mappedin-js/renderer/private/controllers/BlueDotController';
4446
- export { default as BlueDotManager } from '@mappedin/mappedin-js/renderer/internal/blue-dot-manager';
4447
- export { default as CameraController } from '@mappedin/mappedin-js/renderer/private/controllers/CameraController';
4448
- export { default as EventSystem } from '@mappedin/mappedin-js/renderer/private/controllers/EventSystem';
4449
- export { default as ClosedPolygonManager } from '@mappedin/mappedin-js/renderer/internal/Mappedin.ClosedPolygonManager';
4450
- export { default as BinaryAssetManager } from '@mappedin/mappedin-js/renderer/internal/Mappedin.BinaryAssetManager';
4451
- export { default as SmartCollisionEngine } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollisionEngine';
4452
- export { default as BillboardManager } from '@mappedin/mappedin-js/renderer/private/controllers/BillboardManager';
4453
- export { default as StackedMapsController } from '@mappedin/mappedin-js/renderer/private/controllers/StackedMapsController';
4454
- export { MultiBufferRenderer } from '@mappedin/mappedin-js/renderer/internal/Mappedin.Renderer';
4455
- export { JourneyController } from '@mappedin/mappedin-js/renderer/private/controllers/JourneyController';
4456
- export { default as OutdoorViewController } from '@mappedin/mappedin-js/renderer/private/controllers/OutdoorViewController';
4457
- export { default as ExportController } from '@mappedin/mappedin-js/renderer/private/controllers/ExportController';
4458
- export { default as WatermarkController } from '@mappedin/mappedin-js/renderer/private/controllers/WatermarkController';
4459
- export { default as LayerController } from '@mappedin/mappedin-js/renderer/private/controllers/LayerController';
4460
- /**
4461
- * Types
4462
- */
4463
- export type { TSceneTransitionOptions } from '@mappedin/mappedin-js/renderer/private/scene-manager/MapView.SceneManager';
4464
- export type { IPositionUpdater, IBlueDotCore } from '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
4465
- export type { TSafeAreaInsets, TCameraTargets, TFocusOnCameraOptions, TCameraTransform, TCameraAnimationOptions, } from '@mappedin/mappedin-js/renderer/private/controllers/CameraController';
4466
- export type { TColliderPosition } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider';
4467
- export type { ICollider, TColliderStrategy } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider';
4468
- export { EColliderAction } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider';
4469
- export type { IHTMLCollider } from '@mappedin/mappedin-js/renderer/internal/Mappedin.HTMLCollider';
4470
- export { COLLIDER_STRATEGY_LOW_PRIORITY } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollisionEngine';
4471
- export { default as BlueDotCore } from '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
4472
- export { default as BlueDotUI } from '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.ui';
4473
- export { default as CameraControls } from '@mappedin/mappedin-js/renderer/internal/Mappedin.CameraControls.js';
4474
- export { default as Renderer } from '@mappedin/mappedin-js/renderer/internal/Mappedin.Renderer.js';
4475
- export { determineStartingMap, getObject, getObjectId } from '@mappedin/mappedin-js/renderer/internal/utils';
4476
- export { default as MapManager } from '@mappedin/mappedin-js/renderer/internal/Mappedin.MapManager';
4477
- export { default as DebugUI } from '@mappedin/mappedin-js/renderer/internal/Mappedin.DebugUI';
4478
- export { DebugUIScalarSlider, DebugUIColorPicker } from '@mappedin/mappedin-js/renderer/internal/Mappedin.DebugUIControl';
4479
- export type { Collider, ColliderQuadTree } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollisionEngine';
4480
- export { MapView } from '@mappedin/mappedin-js/renderer/public/MapView';
4481
- export { default as Logger } from '@mappedin/mappedin-js/common/Mappedin.Logger';
4482
- export { TileManager, TILE_COLOR } from '@mappedin/mappedin-js/renderer/internal/outdoor-context/Mappedin.TileManager';
4483
- export type { ICore } from '@mappedin/mappedin-js/renderer/private/Core.interface';
4484
- export * from '@mappedin/mappedin-js/renderer/private/Core';
4485
- const setAssetManager: <T extends import("./internal/Mappedin.AssetManager").default>(am: T) => void;
4486
- export { setAssetManager };
4487
- }
4488
-
4489
- declare module '@mappedin/mappedin-js/get-venue/MappedinDirections' {
4490
- import { IDirectionsResult } from '@mappedin/mappedin-js/navigator';
4491
- import { ACTION_TYPE, BEARING_TYPE } from '@mappedin/mappedin-js/navigator/Directive';
4492
- import type { MappedinNode, MappedinVortex, MappedinMap, Mappedin } from '@mappedin/mappedin-js/get-venue/internal';
4493
- export interface IActionDeparture {
4494
- type: ACTION_TYPE.DEPARTURE;
4495
- }
4496
- export interface IActionArrival {
4497
- type: ACTION_TYPE.ARRIVAL;
4498
- }
4499
- export interface IActionTakeVortex {
4500
- type: ACTION_TYPE.TAKEVORTEX;
4501
- toMap: MappedinMap;
4502
- fromMap: MappedinMap;
4503
- }
4504
- export interface IActionExitVortex {
4505
- type: ACTION_TYPE.EXITVORTEX;
4506
- toMap: MappedinMap;
4507
- fromMap: MappedinMap;
4508
- }
4509
- export interface IActionTurn {
4510
- type: ACTION_TYPE.TURN;
4511
- bearing: BEARING_TYPE;
4512
- referencePosition?: string;
4513
- }
4514
- export type IAction = IActionArrival | IActionDeparture | IActionTurn | IActionTakeVortex | IActionExitVortex;
4515
- /** this is the "overloaded" version of the directive, with get-venue classes instead of stubs */
4516
- export type TMappedinDirective = {
4517
- node: MappedinNode;
4518
- /**
4519
- * Distance from the last instruction to the current. Useful for turn by turn navigation
4520
- */
4521
- distance: number;
4522
- instruction: string;
4523
- action?: IAction;
4524
- atLocation?: MappedinVortex;
4525
- type?: BEARING_TYPE;
4526
- };
4527
- /**
4528
- * Directions Object
4533
+ * Directions Object
4529
4534
  */
4530
4535
  export class MappedinDirections {
4531
4536
  #private;
@@ -5447,6 +5452,12 @@ declare module '@mappedin/mappedin-js/get-venue/Mappedin.CustomerAnalytics' {
5447
5452
  * @internal
5448
5453
  */
5449
5454
  static setSessionID(sessionID: string): void;
5455
+ /**
5456
+ * Sets the current global device ID and overrides the local device ID.
5457
+ * @param deviceId {String} The device ID to be set.
5458
+ * @internal
5459
+ */
5460
+ static setDeviceID(deviceId: string): void;
5450
5461
  /**
5451
5462
  * Clears the current global mi-session ID and reverts to the local session ID.
5452
5463
  * @internal
@@ -6883,7 +6894,7 @@ declare module '@mappedin/mappedin-js/renderer/index.rn' {
6883
6894
  export type { ThingsOption } from '@mappedin/mappedin-js/renderer/MapView.types';
6884
6895
  export type { IFlatLabels } from '@mappedin/mappedin-js/renderer/public/api/FlatLabels';
6885
6896
  export type { IFloatingLabels } from '@mappedin/mappedin-js/renderer/public/api/FloatingLabels';
6886
- export type { TBlueDotPositionUpdate, TBlueDotStateChange, TJourneyOptions, TMapViewOptions, TCreateMarkerOptions, TGeolocationObject, TPathOptions, TFlatLabelOptions, TAddFloatingLabelOptions, TAddFlatLabelOptions, TLabelAllLocationCommonOptions, TFloatingLabelAllLocationsOptions, TFlatLabelAllLocationsOptions, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TEnableBlueDotOptions, TFloatingLabelAppearance, TFlatLabelAppearance, CAMERA_EVENT_PAYLOAD, TMapClickEvent, TGetPolygonsAtCoordinateOptions, TShowVenueOptions, TAnimationOptions, } from '@mappedin/mappedin-js/renderer/MapView.types';
6897
+ export type { TBlueDotPositionUpdate, TBlueDotStateChange, TJourneyOptions, TMapViewOptions, TCreateMarkerOptions, TGeolocationObject, TPathOptions, TFlatLabelOptions, TAddFloatingLabelOptions, TAddFlatLabelOptions, TLabelAllLocationCommonOptions, TFloatingLabelAllLocationsOptions, TFlatLabelAllLocationsOptions, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TEnableBlueDotOptions, TFloatingLabelAppearance, TFlatLabelAppearance, CAMERA_EVENT_PAYLOAD, TMapClickEvent, TGetPolygonsAtCoordinateOptions, TShowVenueOptions, TAnimationOptions, TCreateTooltipOptions, } from '@mappedin/mappedin-js/renderer/MapView.types';
6887
6898
  export { BEARING_TYPE, ACTION_TYPE } from '@mappedin/mappedin-js/navigator';
6888
6899
  export type { IDirectionsResult, E_MESSAGES as E_GET_DIRECTIONS_MESSAGES } from '@mappedin/mappedin-js/navigator';
6889
6900
  export type { TGetVenueBundleOptions, TGetVenueOptions, TGetVenueMakerOptions, TMappedinDirective, TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineSearchAllOptions, TMappedinOfflineAllSearchMatch, TDirectionToOptions, } from '@mappedin/mappedin-js/get-venue';
@@ -6892,994 +6903,678 @@ declare module '@mappedin/mappedin-js/renderer/index.rn' {
6892
6903
  export { MAP_RENDER_MODE } from '@mappedin/mappedin-js/get-venue/Mappedin.enums';
6893
6904
  }
6894
6905
 
6895
- declare module '@mappedin/mappedin-js/renderer/internal/outdoor-context/Mappedin.Tile' {
6896
- import { Texture, Mesh, MeshBasicMaterial } from 'three';
6897
- import type { ICore } from '@mappedin/mappedin-js/renderer/internal';
6898
- import { MappedinCoordinate, MappedinMap } from '@mappedin/mappedin-js/get-venue';
6899
- import { TileManager } from '@mappedin/mappedin-js/renderer/internal/outdoor-context/Mappedin.TileManager';
6900
- export class Tile {
6901
- #private;
6902
- center: MappedinCoordinate;
6903
- zoomLevel: number;
6904
- mesh: Mesh;
6905
- material?: MeshBasicMaterial;
6906
- texture?: Texture;
6907
- cache: {
6908
- tileXY?: {
6909
- tileX: number;
6910
- tileY: number;
6906
+ declare module '@mappedin/mappedin-js/renderer/internal/json-scene-loader' {
6907
+ import { Group } from 'three';
6908
+ import { Element } from '@mappedin/mappedin-js/renderer/internal';
6909
+ import DefaultAssetManager from '@mappedin/mappedin-js/renderer/internal/Mappedin.AssetManager';
6910
+ import { MappedinMap, MappedinPolygon } from '@mappedin/mappedin-js/renderer/internal';
6911
+ import { type MAP_RENDER_MODE } from '@mappedin/mappedin-js/get-venue';
6912
+ class JSONSceneLoader {
6913
+ defaultExtrudeSettings: {
6914
+ amount: number;
6915
+ bevelEnabled: boolean;
6911
6916
  };
6912
- tileBoundingBoxInLatLon?: number[];
6913
- };
6914
- get tileXY(): {
6915
- tileX: number;
6916
- tileY: number;
6917
- };
6918
- get tileBoundingBoxInLatLon(): number[];
6919
- constructor(center: MappedinCoordinate, zoomLevel: number, tileManager: TileManager, core: ICore, currentAbortController: AbortController);
6920
- rendered: boolean;
6921
- discardTexture(): void;
6922
- applyTexture(): void;
6923
- render(metersPerTile: number, referenceMap: MappedinMap): Mesh<import("three").BufferGeometry<import("three").NormalBufferAttributes>, import("three").Material | import("three").Material[], import("three").Object3DEventMap>;
6924
- }
6925
- }
6926
-
6927
- declare module '@mappedin/mappedin-js/renderer/private/Core.interface' {
6928
- import { Color, Vector2, Vector3, Mesh } from 'three';
6929
- import type { TPadding, TGetPolygonsAtCoordinateOptions, TMapViewOptions, TileManager, BillboardManager, StackedMapsController, SmartCollisionEngine, OutdoorViewController, LayerController } from '@mappedin/mappedin-js/renderer/internal';
6930
- import { BlueDotController, CameraController, STATE, MappedinMap, Mappedin, MappedinCoordinate, MappedinPolygon, MappedinNode, changeListenerFn, RENDER, INTERNAL_EVENT_PAYLOAD, INTERNAL_EVENT, TaskScheduler, SceneManager, PubSub, FlatLabel, MapObject, PathsController, FloatingLabelsController, FlatLabelsController, PolygonColorsController, MarkersController, PolygonInteractionController, TooltipsController, PolygonStatesController, PolygonImagesController, ThreeDMarkersController, ExportController, EventSystem } from '@mappedin/mappedin-js/renderer/internal';
6931
- import Tween, { Easing } from '@tweenjs/tween.js';
6932
- import WatermarkController from '@mappedin/mappedin-js/renderer/private/controllers/WatermarkController';
6933
- import PolygonHoverColorsController from '@mappedin/mappedin-js/renderer/private/controllers/PolygonHoverColorsController';
6934
- import { E_MAP_CHANGED_REASON } from '@mappedin/mappedin-js/renderer/MapView.enums';
6935
- export type TFocusOptionsLegacy = {
6936
- /**
6937
- * An array of Nodes to focus in on
6938
- */
6939
- nodes?: (MappedinNode | MappedinNode['id'])[];
6917
+ materials: {};
6918
+ scale: number;
6919
+ assetManager: DefaultAssetManager;
6920
+ setAssetManager<T extends DefaultAssetManager>(am: T): void;
6921
+ overlayHeight: number;
6940
6922
  /**
6941
- * An array of Polygons to focus on. It's the center of the bounds of all Polygons, designed to fit everything into view.
6923
+ Takes in either an object containing polygons and generates a 3D scene based
6924
+ on it, or a string URL to fetch those polygons from.
6925
+ **/
6926
+ load(polygons: string | MappedinPolygon[], mapClass: MappedinMap, mapLoadingStrategy?: MAP_RENDER_MODE, allLayersVisible?: boolean): Promise<{
6927
+ container: Group<import("three").Object3DEventMap>;
6928
+ elements: (Element | null)[];
6929
+ visibleLayers: Set<unknown>;
6930
+ }>;
6931
+ _build(polygons: MappedinPolygon[], mapClass: MappedinMap, mapLoadingStrategy?: MAP_RENDER_MODE,
6932
+ /**
6933
+ * If true, sets all layers to be visible. If false, uses the layer visibility from the mapClass.
6942
6934
  */
6943
- polygons?: (MappedinPolygon | MappedinPolygon['id'])[];
6935
+ allLayersVisible?: boolean): Promise<{
6936
+ container: Group<import("three").Object3DEventMap>;
6937
+ elements: (Element | null)[];
6938
+ visibleLayers: Set<unknown>;
6939
+ }>;
6940
+ }
6941
+ const _default: JSONSceneLoader;
6942
+ export default _default;
6943
+ }
6944
+
6945
+ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.RenderTasks' {
6946
+ /**
6947
+ * Tasks that can be submitted to the renderer. The `STATIC_AND_ANIMATED` task
6948
+ * is equivalent to a full re-render.
6949
+ */
6950
+ enum RENDER {
6951
+ ANIMATED = "animated",
6952
+ ALWAYS_ON_TOP = "always_on_top",
6953
+ ALL = "all",
6954
+ TWEEN = "tween",
6955
+ COMPOSITE = "composite"
6956
+ }
6957
+ export default RENDER;
6958
+ }
6959
+
6960
+ declare module '@mappedin/mappedin-js/get-venue/Mappedin.TaskScheduler' {
6961
+ /**
6962
+ * A function that can be submitted to the Task Scheduler to run each frame for
6963
+ * some provided number of frames. A single update can be repeatedly submitted;
6964
+ * if the number of frames left on the update is less than `frameCount`, it will
6965
+ * be reset to `frameCount`.
6966
+ *
6967
+ * @class FrameUpdate
6968
+ * @private
6969
+ */
6970
+ export class FrameUpdate {
6944
6971
  /**
6945
- * The duration (in ms) the focus animation should last for.
6946
- * @defaultValue `100`
6972
+ * Create a new frame update that can be submitted to a scheduler.
6973
+ * @constructor
6974
+ * @param [options] {Object} Options for the update
6975
+ * @param [options.callback] {function}
6976
+ * The actual function to run every time this update is scheduled for
6977
+ * a frame.
6978
+ * @param [options.frameCount=1] {number}
6979
+ * How many frames this update should run for when it's submitted to
6980
+ * a scheduler
6981
+ * @param [options.ordering=0] {number}
6982
+ * An ordering value that's used to determine the order in which
6983
+ * frame updates will be run within a frame; larger numbers will
6984
+ * be run first
6985
+ * @param [options.supersededBy=[]] {[FrameUpdate]}
6986
+ * If this update is scheduled to run in a frame, but another update in
6987
+ * the provided list is also scheduled to run on that frame, then
6988
+ * this update will not be run.
6989
+ * @param [options.name=undefined] {string}
6990
+ * If provided, an arbitrary name for logging purposes.
6991
+ * @param [options.userdata] {Any}
6992
+ * Arbitrary data that you can store along with this update.
6947
6993
  */
6948
- duration?: number;
6994
+ constructor(options: {
6995
+ callback: (...args: any[]) => any;
6996
+ frameCount?: number;
6997
+ ordering?: number;
6998
+ supersededBy?: Set<any>;
6999
+ name: string;
7000
+ userdata?: Record<string, any>;
7001
+ });
7002
+ _callback: (...args: any[]) => any;
7003
+ _frameCount: number;
7004
+ _ordering: number;
7005
+ _supersededBy: Set<any>;
7006
+ name: string;
7007
+ _remainingFrameCount: number;
7008
+ _lastFrameTime: number;
7009
+ userdata?: Record<string, any>;
6949
7010
  /**
6950
- * Whether to zoom the camera in or out, or just pan it.
6951
- * @defaultValue `true`
7011
+ * Return the amount of time that this frame update took to execute during
7012
+ * its most recent execution, in milliseconds. If called during this frame
7013
+ * update, the value returned will be for the previous invocation. If called
7014
+ * before this frame update has been executed at least once, the returned
7015
+ * value is unspecified.
7016
+ *
7017
+ * @method lastFrameTime
7018
+ * @return {number} the previous frame time, in milliseconds
6952
7019
  */
6953
- changeZoom?: boolean;
7020
+ getLastFrameTime(): number;
7021
+ }
7022
+ /**
7023
+ * A task that can be submitted to the Task Scheduler to be run every time
7024
+ * there is a frame update with spare time in the frame.
7025
+ *
7026
+ * @class FrameTask
7027
+ * @private
7028
+ */
7029
+ export class FrameTask {
6954
7030
  /**
6955
- * The animation curve to use for zooming in. Uses the animateCamera one by default.
7031
+ * Create a new frame task that can be submitted to a scheduler.
7032
+ * @constructor
7033
+ * @param [options] {Object} Options for the task
7034
+ * @param [options.callback] {function}
7035
+ * The actual function to run when this task is scheduled.
7036
+ * @param [options.group=null] {FrameTaskGroup}
7037
+ * If provided, a group to which this task will be added when scheduled
7038
+ * @param [options.priority=0] {number}
7039
+ * Tasks with higher priority will be taken from the queue before tasks
7040
+ * with a lower priority.
7041
+ * @param [options.postponeOnAdd=false] {number}
7042
+ * If true, this task will not be run until `resumeTask` is called on the
7043
+ * scheduler.
7044
+ * @param [options.name=undefined] {string}
7045
+ * If provided, an arbitrary name for logging purposes.
7046
+ * @param [options.userdata] {Any}
7047
+ * Arbitrary data that you can store along with this task.
6956
7048
  */
6957
- curve?: typeof Easing;
7049
+ constructor(options: {
7050
+ userdata?: Record<string, any>;
7051
+ priority?: number;
7052
+ group?: FrameTaskGroup;
7053
+ postponeOnAdd?: number | boolean;
7054
+ name: string;
7055
+ lastFrameTime?: number;
7056
+ callback: (...args: any[]) => any;
7057
+ });
7058
+ _postponed: number | boolean;
7059
+ userdata: Record<string, any>;
7060
+ _priority: number;
7061
+ _group: FrameTaskGroup | null;
7062
+ name: string;
7063
+ _lastFrameTime: number;
7064
+ _callback: (...args: any[]) => any;
7065
+ _complete: boolean;
7066
+ _scheduled: boolean;
7067
+ _cancelled: boolean;
6958
7068
  /**
6959
- * Camera tilt between 0 (top-down) to 1 (from the side)
7069
+ * Return true if this task has been run at least once.
7070
+ *
7071
+ * @method isComplete
7072
+ * @return {boolean}
6960
7073
  */
6961
- tilt?: number;
7074
+ isComplete(): boolean;
6962
7075
  /**
6963
- * Rotation in degrees
7076
+ * Return the amount of time that this frame task took to execute,
7077
+ * in milliseconds. If this task has not yet completed, the returned value
7078
+ * is unspecified.
7079
+ *
7080
+ * @method lastFrameTime
7081
+ * @return {number} the frame time, in milliseconds
6964
7082
  */
6965
- rotation?: number;
7083
+ getLastFrameTime(): number;
7084
+ }
7085
+ /**
7086
+ * A group of tasks that must all be completed before the group is considered
7087
+ * complete. The tasks will be automatically garbage collected so that references
7088
+ * to the task don't linger.
7089
+ *
7090
+ * @class FrameTaskGroup
7091
+ * @private
7092
+ */
7093
+ export class FrameTaskGroup {
6966
7094
  /**
6967
- * You can overide the {{#crossLink "MapView/focusZoomFactor:property"}}{{/crossLink}} for a specific {{#crossLink "MapView/focusOn:method"}}{{/crossLink}} call, rather than globally, if you like.
7095
+ * Create a new frame task group.
7096
+ *
7097
+ * @constructor
7098
+ * @param [options] {Object} Options for the task group
7099
+ * @param [options.onComplete] {function}
7100
+ * A callback that will be triggered once every task in this group
7101
+ * has been completed. This callback may schedule a task, and the
7102
+ * scheduler will run that task in the same frame, if there is still
7103
+ * frame time for it.
7104
+ * @param [options.priority=0] {number}
7105
+ * The priority of all the tasks in this group.
7106
+ * @param [options.postponeOnAdd=false] {number}
7107
+ * If true, tasks from this task group will not be run until `resumeTask`
7108
+ * is called on the scheduler with this group.
7109
+ * @param [options.name=undefined] {string}
7110
+ * If provided, an arbitrary name for logging purposes.
7111
+ * @param [options.userdata] {Any}
7112
+ * Arbitrary data that you can store along with this task group.
6968
7113
  */
6969
- focusZoomFactor?: number;
7114
+ constructor(options: {
7115
+ onComplete?: (...args: any[]) => any;
7116
+ priority?: number;
7117
+ userdata: Record<string, any>;
7118
+ postponeOnAdd: number | boolean;
7119
+ name: string;
7120
+ });
7121
+ _postponed: number | boolean;
7122
+ _onComplete: (...args: any[]) => any;
7123
+ _priority: number;
7124
+ userdata: Record<string, any>;
7125
+ name: string;
7126
+ _tasks: Set<any>;
7127
+ _scheduledTasks: Set<any>;
7128
+ _scheduled: boolean;
7129
+ _cancelled: boolean;
6970
7130
  /**
6971
- * Sets a floor for how close you can zoom in on the scene. If it's lower than mapView.controls.minZoom, it's ignored.
6972
- * @defaultValue: 0
7131
+ * Return true if every task in this group has been run at least once.
7132
+ * @method isComplete
7133
+ * @return {boolean}
6973
7134
  */
6974
- minZoom?: number;
6975
- maxZoom?: number;
7135
+ isComplete(): boolean;
6976
7136
  /**
6977
- * Whether {@link Camera.minZoom} and {@link Camera.maxZoom} should be recalculated during the focusing animation.
7137
+ * Return a list of tasks in this group. This will be a copy of the
7138
+ * underlying task group, so it's safe to mutate the group while
7139
+ * iterating over this array.
7140
+ *
7141
+ * @method tasks
7142
+ * @return {[FrameTask]} list of tasks in this group
6978
7143
  */
6979
- updateZoomLimits?: boolean;
6980
- padding?: TPadding;
6981
- points?: any[];
6982
- boundingBox?: any;
6983
- callback: () => void;
6984
- cancelledCallback?: () => void;
6985
- };
6986
- /**
6987
- * Ben Liu, 2023/03/29
6988
- *
6989
- * This causes the generation of the index.d.ts file to break entirely for some reason.
6990
- *
6991
- * TODO: Figure out why
6992
- */
6993
- export interface ICore extends PubSub<INTERNAL_EVENT_PAYLOAD, INTERNAL_EVENT> {
7144
+ getTasks(): any[];
6994
7145
  /**
6995
- * Controllers
7146
+ * Empty this task group. This will trivially satisfy `isComplete`.
7147
+ *
7148
+ * @method clear
6996
7149
  */
6997
- eventSystem: EventSystem;
6998
- floatingLabels: FloatingLabelsController;
6999
- flatLabels: FlatLabelsController;
7000
- paths: PathsController;
7001
- polygonColors: PolygonColorsController;
7002
- polygonHoverColors: PolygonHoverColorsController;
7003
- polygonInteraction: PolygonInteractionController;
7004
- polygonStates: PolygonStatesController;
7005
- polygonImages: PolygonImagesController;
7006
- markers: MarkersController;
7007
- tooltips: TooltipsController;
7008
- threeDMarkers: ThreeDMarkersController;
7009
- blueDot: BlueDotController;
7010
- camera: CameraController;
7011
- tileManager: TileManager;
7012
- billboardManager: BillboardManager;
7013
- stackedMaps: StackedMapsController;
7014
- outdoorViewController?: OutdoorViewController;
7015
- exportController: ExportController;
7016
- watermark: WatermarkController;
7017
- layerController: LayerController;
7018
- state: STATE;
7019
- options: TMapViewOptions & {
7020
- onDataLoaded?: (data: Mappedin) => void;
7021
- onFirstMapLoaded?: (data: Mappedin) => void;
7022
- };
7023
- currentPath?: MappedinNode[];
7024
- referenceMap: MappedinMap;
7025
- taskScheduler: TaskScheduler;
7026
- sceneManager: SceneManager | undefined;
7027
- loadOptions?: TMapViewOptions['loadOptions'];
7028
- imageFlippingEnabled: boolean;
7029
- imageFlippingCache: Record<any, any>;
7030
- cachedPadding: TPadding;
7031
- getCameraFrameForPoints: any;
7032
- polygonMeshesById: Record<string, Mesh>;
7033
- textLabelsByPolygonId: Record<string, FlatLabel>;
7034
- renderer: any;
7035
- scene: any;
7036
- cameraParameters: Vector2;
7037
- cameraParametersZoomVector: Vector2;
7038
- resolution: Vector2;
7039
- determineNewLabelSize: any;
7040
- visibleMapsInCurrentScene: MappedinMap[];
7041
- visibleLayersInCurrentScene: {
7042
- [mapId: string]: MappedinPolygon['layer'][];
7043
- };
7044
- visibleMapObjectsInCurrentScene: MapObject[];
7045
- mapSetInProgress: Promise<undefined>;
7046
- mapSetResolved: (...args: any[]) => any;
7047
- on<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, fn: (payload: INTERNAL_EVENT_PAYLOAD[EVENT_NAME] extends {
7048
- data: null;
7049
- } ? INTERNAL_EVENT_PAYLOAD[EVENT_NAME]['data'] : INTERNAL_EVENT_PAYLOAD[EVENT_NAME]) => void): void;
7050
- off<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, fn: changeListenerFn<INTERNAL_EVENT_PAYLOAD[EVENT_NAME]>): void;
7051
- publish<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, payload?: INTERNAL_EVENT_PAYLOAD[EVENT_NAME]): void;
7150
+ clear(): void;
7052
7151
  /**
7053
- * Manual camera controls for MapView. Generally you should be using the functions on MapView like {{#crossLink "MapView/focusOn:method"}}{{/crossLink}},
7054
- * but if you have some cool animations in mind, you can do it with the {{#crossLink "CameraControls"}}{{/crossLink}}.
7055
- * Some of the functions don't do anything in 2D.
7152
+ * Return one arbitrary incomplete task from this group, or undefined if
7153
+ * there are none.
7056
7154
  *
7155
+ * @method _popTask
7156
+ * @return {FrameTask} arbitrary scheduled task
7157
+ * @private
7057
7158
  */
7058
- controls: any;
7159
+ _popTask(): any;
7160
+ }
7161
+ /**
7162
+ * A timer for the task scheduler that uses real wall-time to determine if there's
7163
+ * enough remaining time in a frame to execute another task.
7164
+ *
7165
+ * @class RealTimeTimer
7166
+ * @private
7167
+ */
7168
+ export class RealTimeTimer {
7169
+ _maxMillisecondsPerFrame: number;
7170
+ _time: number;
7059
7171
  /**
7060
- * The Venue data this MapView is using.
7061
- *
7062
- * @property venue {MappedinVenue}
7063
- * @final
7172
+ * @constructor
7173
+ * @param [options] {Object} Options for the timer
7174
+ * @param [options.maxMillisecondsPerFrame]
7175
+ * If the time since the beginning of the frame has been less than
7176
+ * or equal to this value, then another task may be executed
7064
7177
  */
7065
- readonly venue: Mappedin;
7178
+ constructor(options?: {
7179
+ maxMillisecondsPerFrame?: number;
7180
+ });
7066
7181
  /**
7067
- * The div MapView is using.
7182
+ * Begin timing a frame.
7068
7183
  *
7069
- * @property container {Div}
7070
- * @final
7184
+ * @method beginFrame
7071
7185
  */
7072
- readonly container: HTMLElement;
7186
+ beginFrame(): void;
7073
7187
  /**
7074
- * The ID of the Map currently being displayed.
7188
+ * If true, there is enough time remaining to execute another task.
7075
7189
  *
7190
+ * @method hasTimeRemaining
7191
+ * @return {boolean}
7076
7192
  */
7077
- readonly currentMap: string | null;
7193
+ hasTimeRemaining(): boolean;
7194
+ }
7195
+ /**
7196
+ * A timer that ticks every time `hasTimeRemaining` is called.
7197
+ *
7198
+ * @class FixedTimer
7199
+ * @private
7200
+ */
7201
+ export class FixedTimer {
7202
+ _ticks: number;
7203
+ maxTasksPerFrame: number;
7078
7204
  /**
7079
- * Change this factor to influence how much the camera zooms in on a {@link IMapView3D.focusOn} call.
7080
- *
7081
- * @property focusZoomFactor {Integer}
7082
- * @default 3
7205
+ * @constructor
7206
+ * @param [options] {Object} Options for the timer
7207
+ * @param [options.maxTasksPerFrame=5]
7208
+ * The number of tasks that will be exceuted in a single update call.
7209
+ * Can be modified as the `maxTasksPerFrame` property on this boject.
7083
7210
  */
7084
- focusZoomFactor: number;
7211
+ constructor(options?: {
7212
+ maxTasksPerFrame?: number;
7213
+ });
7085
7214
  /**
7086
- * Returns the value you should call {@link CameraControls.setZoom} on to fit the Polygon exactly.
7215
+ * Begin timing a frame.
7087
7216
  *
7088
- * @return The zoom level that will fit the Polygon
7217
+ * @method beginFrame
7089
7218
  */
7090
- getZoomLevelForPolygon(props: {
7091
- /**
7092
- * The Polygon or Polygon ID to get the zoom level for
7093
- */
7094
- polygonOrPolygonId: MappedinPolygon | string;
7095
- }): number;
7219
+ beginFrame(): void;
7096
7220
  /**
7097
- * Returns the value you should call {@link CameraControls.setZoom} on to fit the {@link IMapView3D.currentMap} exactly.
7221
+ * If true, there is enough time remaining to execute another task.
7098
7222
  *
7099
- * @return The zoom level that will fit the {@link IMapView3D.currentMap}.
7223
+ * @method hasTimeRemaining
7224
+ * @return {boolean}
7100
7225
  */
7101
- getZoomLevelForCurrentMap(): number;
7226
+ hasTimeRemaining(): boolean;
7227
+ }
7228
+ export type TaskSchedulerOptions = {
7229
+ timer?: RealTimeTimer;
7230
+ performance?: boolean;
7231
+ onUpdateEnd?: () => void;
7232
+ };
7233
+ /**
7234
+ * A class that handles scheduling tasks to be performed within the time
7235
+ * constraints of frame updates, triggered using `requestAnimationFrame`.
7236
+ *
7237
+ * Tasks can either be scheduled once per frame (called "frame updates"), or
7238
+ * to execute as many times per frame as there is room for after processing
7239
+ * all frame updates (called "frame tasks").
7240
+ *
7241
+ * Posted tasks will always run during the same frame, assuming there's time to
7242
+ * process them. However, an update or task that posts an update will not run
7243
+ * that update until the next frame.
7244
+ *
7245
+ * @class TaskScheduler
7246
+ * @private
7247
+ */
7248
+ export class TaskScheduler {
7102
7249
  /**
7103
- * Returns the angle that points to north, in radians, from the default orientation.
7250
+ * Construct a new `TaskScheduler` with no tasks scheduled.
7104
7251
  *
7105
- * @return The angle to north from the default orientation, in radians.
7252
+ * @constructor
7253
+ * @param [options] {Object} Options for the scheduler
7254
+ * @param [options.timer=new RealTimeTimer()]
7255
+ * Timer that determines whether there is sufficient time left in a frame
7256
+ * to continue executing tasks
7257
+ * @param [options.performance=false]
7258
+ * If true, this task scheduler will annotate tasks and frame updates with
7259
+ * performance information.
7106
7260
  */
7107
- getNorth(): number;
7261
+ constructor(options?: TaskSchedulerOptions);
7262
+ _raf?: (callback: FrameRequestCallback) => number;
7263
+ options?: TaskSchedulerOptions;
7264
+ _timer: RealTimeTimer;
7265
+ _performance: boolean;
7266
+ _scheduledUpdatesByOrdering: Multimap;
7267
+ _scheduledTasksByPriority: Multimap;
7268
+ _postponedTasks: Set<any>;
7269
+ _requestAnimationFrameHandle: number | null;
7270
+ _updatesToRunThisFrame: any[];
7271
+ _lastFrameTime: number;
7272
+ _updatesRunLastFrame: Set<any>;
7108
7273
  /**
7109
- * Takes an element on the DOM and rotates it such that the top is pointing north. It will rotate with the camera, staying locked
7110
- * on north. If you would like to align it do a different direction, or a different side of the element, pass in an offset. This
7111
- * is how you would do a compass rose.
7112
- *
7113
- * This will modify your element's transform.
7114
- *
7115
- * @param element The element on the page to rotate.
7116
- * @param offset The amount to offset the rotation by, in radians.
7274
+ * Empty the task scheduler's queue. All tasks in it will be cancelled.
7117
7275
  *
7276
+ * @method clear
7118
7277
  */
7119
- lockNorth(element: HTMLElement, offset?: number): void;
7278
+ clear(): void;
7120
7279
  /**
7121
- * Stops the MapView from trying to rotate your element with the camera. Do this if you remove the element, or want to stop it from rotating.
7122
- * @param element The node to stop rotating. It won't reset the transform, just leave it as is.
7280
+ * Destroy this task scheduler and remove all tasks from it.
7281
+ *
7282
+ * @method destroy
7123
7283
  */
7124
- unlockNorth(element: HTMLElement): void;
7284
+ destroy(): void;
7125
7285
  /**
7126
- * Returns all polygons that contain the specified MappedinCoordinate.
7286
+ * Schedule this task scheduler to execute updates and tasks on the next
7287
+ * available animation frame.
7127
7288
  *
7128
- * @param coordinate The MappedinCoordinate to check
7129
- * @param hoverableMeshChildren
7130
- * @param options {@link TGetPolygonsAtCoordinateOptions}
7289
+ * @method requestAnimationFrame
7131
7290
  */
7132
- getPolygonsAtScreenCoordinate(x: number, y: number, options?: TGetPolygonsAtCoordinateOptions): MappedinPolygon[];
7291
+ requestAnimationFrame(): void;
7133
7292
  /**
7134
- * Returns all polygons at the specified screen coordinate.
7293
+ * Run all scheduled updates, and re-schedule another animation frame if any
7294
+ * scheduled updates still exist. If any scheduled update specifies
7295
+ * `shouldRunTasksAfterCompletion`, this will also run queued tasks until the
7296
+ * frame time runs out.
7135
7297
  *
7136
- * @param coordinate The Vector2 coordinate to check
7137
- * @param hoverableMeshChildren
7138
- * @param options {@link TGetPolygonsAtCoordinateOptions}
7298
+ * @method update
7299
+ * @param timestamp {number} the current animation time, as returned from
7300
+ * `performance.now()`; will be automatically filled in by
7301
+ * `requestAnimationFrame` when it triggers this as a callback
7139
7302
  */
7140
- getPolygonsAtCoordinate(coordinate: MappedinCoordinate, options?: TGetPolygonsAtCoordinateOptions): MappedinPolygon[];
7141
- currentInteractionEvent: INTERNAL_EVENT | undefined;
7142
- interactivePolygons: Record<string, boolean>;
7303
+ update(timestamp: number): void;
7143
7304
  /**
7144
- * An object containing polygon ids and their hover colors.
7305
+ * Execute all tasks that are currently pending, without regard for the
7306
+ * available frame time.
7307
+ *
7308
+ * @method flushTasks
7145
7309
  */
7146
- polygonHoverColorsById: Record<string, Color>;
7310
+ flushTasks(): void;
7147
7311
  /**
7148
- * An Object to keep track of highlighted polygon id and the highlight color as the value initiated by setPolygonColor
7312
+ * Return the amount of time elapsed during the last completed frame update,
7313
+ * in milliseconds. This value is unspecified if the task scheduler's
7314
+ * `update` method has not yet run or if the scheduler has been cleared.
7315
+ * If called during a frame update, this will
7316
+ * return the time elapsed during the previous frame update.
7317
+ *
7318
+ * @method lastFrameTime
7319
+ * @return {number} time elapsed during last frame update, in milliseconds
7149
7320
  */
7150
- highlightedPolygons: Record<string, string>;
7321
+ getLastFrameTime(): number;
7151
7322
  /**
7152
- * An object containing all outlined polygons.
7323
+ * Return a set containing every update that was run during the previous
7324
+ * frame update. This will be empty if the task scheduler's `update` method
7325
+ * has not yet been run or if the scheduler has been cleared.
7153
7326
  */
7154
- outlinedPolygons: Map<string, MappedinPolygon>;
7327
+ getUpdatesRunLastFrame(): Set<any>;
7328
+ _executeOneTask(timestamp: number): void;
7155
7329
  /**
7156
- * A plane that is parallel to the ground and is used for raycasting.
7157
- */
7158
- worldPlane: Mesh;
7159
- getPositionLatLon(lat: number, lon: number, map?: MappedinMap | string | null): Vector3;
7160
- currentScale: number;
7161
- getPositionPolygon(polygon: MappedinPolygon | string): Vector3;
7162
- /**
7163
- * Takes an x/y pair in Mappedin coordinate space and gives you a Vector3 in scene space
7164
- * @param nodeOrCoordinate a node or coordinate
7330
+ * Schedule an update to be run for the next `update.frameCount` frames. If
7331
+ * the update already exists in the scheduler, the update's frame count will
7332
+ * be refreshed to `update.frameCount`. This will also schedule an animation
7333
+ * frame to begin processing the update.
7334
+ *
7335
+ * @method scheduleUpdate
7336
+ * @param task {FrameUpdate} the update to schedule
7165
7337
  */
7166
- convertTo3DMapPosition(nodeOrCoordinate: MappedinCoordinate | MappedinNode): Vector3;
7338
+ scheduleUpdate(update: FrameUpdate): void;
7167
7339
  /**
7168
- * Converts a Vector-like object into a MappedinCoordinate for a map.
7169
- * @param position an object with x and y, like a Vector3
7170
- * @param mapClass An optional map; otherwise, the current map will be used.
7340
+ * Schedule a task to be run during a frame update. This will also schedule
7341
+ * an animation frame to begin processing the task queue.
7342
+ *
7343
+ * @method scheduleTask
7344
+ * @param task {FrameTask} the task to schedule
7171
7345
  */
7172
- convert3DMapPositionToCoordinate(position: {
7173
- x: number;
7174
- y: number;
7175
- }, mapClass?: MappedinMap): MappedinCoordinate;
7346
+ scheduleTask(task: FrameTask): void;
7176
7347
  /**
7177
- * Converts a 2D x,y screen position into a 3D MappedinCoordinate using projection
7348
+ * If the given update is in the queue, remove it.
7349
+ *
7350
+ * @method cancelUpdate
7351
+ * @param task {FrameUpdate} the update to cancel
7178
7352
  */
7179
- convertScreenCoordinateToMapCoordinate(x: number, y: number, map: MappedinMap): MappedinCoordinate;
7180
- setPadding(padding: {
7181
- top: number;
7182
- left: number;
7183
- bottom: number;
7184
- right: number;
7185
- }): void;
7186
- smartCollisionEngine: SmartCollisionEngine;
7187
- mapObjects: Map<MappedinMap['id'], MapObject>;
7353
+ cancelUpdate(update: FrameUpdate): void;
7188
7354
  /**
7189
- * The scene only renders when something has changed. This should be something a 3rd party developer doesn't need to worry about,
7190
- * but if you are doing something weird, or have your own special tween for something, you will want to call this function.
7191
- * You can call it as often as you want, it just sets a flag that we need to render again, and renders a few frames if we weren't already doing that.
7192
- * Ignored in 2D.
7355
+ * If the given task or group is in the queue, remove it. Cancelling a
7356
+ * completed task is a no-op.
7357
+ *
7358
+ * Canceling an individual task will also remove it from its task group, if
7359
+ * it isn't already complete.
7360
+ *
7361
+ * @method cancelTask
7362
+ * @param task {FrameTask or FrameTaskGroup} the task to cancel
7193
7363
  */
7194
- tryRendering(renderMode?: RENDER): void;
7195
- setMapReason?: E_MAP_CHANGED_REASON;
7196
- setMap(mapOrMapId: MappedinMap | string): Promise<null>;
7197
- setMapWithReason(mapOrMapId: MappedinMap | string, context: E_MAP_CHANGED_REASON): Promise<null>;
7198
- getPositionNode(node: MappedinNode): Vector3;
7199
- cameraObject: any;
7200
- setBackgroundColor(color: string, alpha?: number): void;
7201
- mapManager: any;
7202
- focusOn(focusOptions: TFocusOptionsLegacy): Tween;
7203
- canvasWidth: number;
7204
- canvasHeight: number;
7205
- setState(state: STATE): Promise<void>;
7206
- getNearestNodeByScreenCoordinate(x: number, y: number, mapOrMapId?: MappedinMap | MappedinMap['id']): MappedinNode;
7207
- destroy(): void;
7208
- }
7209
- }
7210
-
7211
- declare module '@mappedin/mappedin-js/renderer/internal/json-scene-loader' {
7212
- import { Group } from 'three';
7213
- import { Element } from '@mappedin/mappedin-js/renderer/internal';
7214
- import DefaultAssetManager from '@mappedin/mappedin-js/renderer/internal/Mappedin.AssetManager';
7215
- import { MappedinMap, MappedinPolygon } from '@mappedin/mappedin-js/renderer/internal';
7216
- import { type MAP_RENDER_MODE } from '@mappedin/mappedin-js/get-venue';
7217
- class JSONSceneLoader {
7218
- defaultExtrudeSettings: {
7219
- amount: number;
7220
- bevelEnabled: boolean;
7221
- };
7222
- materials: {};
7223
- scale: number;
7224
- assetManager: DefaultAssetManager;
7225
- setAssetManager<T extends DefaultAssetManager>(am: T): void;
7226
- overlayHeight: number;
7227
- /**
7228
- Takes in either an object containing polygons and generates a 3D scene based
7229
- on it, or a string URL to fetch those polygons from.
7230
- **/
7231
- load(polygons: string | MappedinPolygon[], mapClass: MappedinMap, mapLoadingStrategy?: MAP_RENDER_MODE, allLayersVisible?: boolean): Promise<{
7232
- container: Group<import("three").Object3DEventMap>;
7233
- elements: (Element | null)[];
7234
- visibleLayers: Set<unknown>;
7235
- }>;
7236
- _build(polygons: MappedinPolygon[], mapClass: MappedinMap, mapLoadingStrategy?: MAP_RENDER_MODE,
7364
+ cancelTask(task: FrameTask | FrameTaskGroup): void;
7237
7365
  /**
7238
- * If true, sets all layers to be visible. If false, uses the layer visibility from the mapClass.
7366
+ * Set the provided task or group not to run, until it's resumed using `resumeTask`.
7367
+ *
7368
+ * Tasks that are in a group can't be postponed individually; instead, call
7369
+ * `postponeTask` with the entire group.
7370
+ *
7371
+ * @method postponeTask
7372
+ * @param task {FrameTask or FrameTaskGroup} the task to postpone
7239
7373
  */
7240
- allLayersVisible?: boolean): Promise<{
7241
- container: Group<import("three").Object3DEventMap>;
7242
- elements: (Element | null)[];
7243
- visibleLayers: Set<unknown>;
7244
- }>;
7245
- }
7246
- const _default: JSONSceneLoader;
7247
- export default _default;
7248
- }
7249
-
7250
- declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.RenderTasks' {
7251
- /**
7252
- * Tasks that can be submitted to the renderer. The `STATIC_AND_ANIMATED` task
7253
- * is equivalent to a full re-render.
7254
- */
7255
- enum RENDER {
7256
- ANIMATED = "animated",
7257
- ALWAYS_ON_TOP = "always_on_top",
7258
- ALL = "all",
7259
- TWEEN = "tween",
7260
- COMPOSITE = "composite"
7261
- }
7262
- export default RENDER;
7263
- }
7264
-
7265
- declare module '@mappedin/mappedin-js/get-venue/Mappedin.TaskScheduler' {
7266
- /**
7267
- * A function that can be submitted to the Task Scheduler to run each frame for
7268
- * some provided number of frames. A single update can be repeatedly submitted;
7269
- * if the number of frames left on the update is less than `frameCount`, it will
7270
- * be reset to `frameCount`.
7271
- *
7272
- * @class FrameUpdate
7273
- * @private
7274
- */
7275
- export class FrameUpdate {
7374
+ postponeTask(task: FrameTask | FrameTaskGroup): void;
7276
7375
  /**
7277
- * Create a new frame update that can be submitted to a scheduler.
7278
- * @constructor
7279
- * @param [options] {Object} Options for the update
7280
- * @param [options.callback] {function}
7281
- * The actual function to run every time this update is scheduled for
7282
- * a frame.
7283
- * @param [options.frameCount=1] {number}
7284
- * How many frames this update should run for when it's submitted to
7285
- * a scheduler
7286
- * @param [options.ordering=0] {number}
7287
- * An ordering value that's used to determine the order in which
7288
- * frame updates will be run within a frame; larger numbers will
7289
- * be run first
7290
- * @param [options.supersededBy=[]] {[FrameUpdate]}
7291
- * If this update is scheduled to run in a frame, but another update in
7292
- * the provided list is also scheduled to run on that frame, then
7293
- * this update will not be run.
7294
- * @param [options.name=undefined] {string}
7295
- * If provided, an arbitrary name for logging purposes.
7296
- * @param [options.userdata] {Any}
7297
- * Arbitrary data that you can store along with this update.
7376
+ * Allow a postponed task or task group to resume processing. This will also
7377
+ * request an animation frame to allow the resumed task to be processed.
7378
+ *
7379
+ * Tasks that are in a group can't be resumed individually; instead, call
7380
+ * `resumeTask` with the entire group.
7381
+ *
7382
+ * @method resumeTask
7383
+ * @param task {FrameTask or FrameTaskGroup} the task to resume
7298
7384
  */
7299
- constructor(options: {
7300
- callback: (...args: any[]) => any;
7301
- frameCount?: number;
7302
- ordering?: number;
7303
- supersededBy?: Set<any>;
7304
- name: string;
7305
- userdata?: Record<string, any>;
7306
- });
7307
- _callback: (...args: any[]) => any;
7308
- _frameCount: number;
7309
- _ordering: number;
7310
- _supersededBy: Set<any>;
7311
- name: string;
7312
- _remainingFrameCount: number;
7313
- _lastFrameTime: number;
7314
- userdata?: Record<string, any>;
7385
+ resumeTask(task: FrameTask | FrameTaskGroup): void;
7315
7386
  /**
7316
- * Return the amount of time that this frame update took to execute during
7317
- * its most recent execution, in milliseconds. If called during this frame
7318
- * update, the value returned will be for the previous invocation. If called
7319
- * before this frame update has been executed at least once, the returned
7320
- * value is unspecified.
7387
+ * Change the priority of the given scheduled task or task group.
7321
7388
  *
7322
- * @method lastFrameTime
7323
- * @return {number} the previous frame time, in milliseconds
7389
+ * @method setTaskPriority
7390
+ * @param task {FrameTask or FrameTaskGroup} the task whose priority will be changed
7391
+ * @param priority {number} the priority to assign the task
7324
7392
  */
7325
- getLastFrameTime(): number;
7393
+ setTaskPriority(task: FrameTask | FrameTaskGroup, priority: number): void;
7326
7394
  }
7327
7395
  /**
7328
- * A task that can be submitted to the Task Scheduler to be run every time
7329
- * there is a frame update with spare time in the frame.
7396
+ * A map that maps a numeric key to a set of values.
7330
7397
  *
7331
- * @class FrameTask
7398
+ * For use in the scheduler, we also maintain a sorted list of keys.
7399
+ *
7400
+ * @class Multimap
7332
7401
  * @private
7333
7402
  */
7334
- export class FrameTask {
7403
+ class Multimap {
7335
7404
  /**
7336
- * Create a new frame task that can be submitted to a scheduler.
7337
- * @constructor
7338
- * @param [options] {Object} Options for the task
7339
- * @param [options.callback] {function}
7340
- * The actual function to run when this task is scheduled.
7341
- * @param [options.group=null] {FrameTaskGroup}
7342
- * If provided, a group to which this task will be added when scheduled
7343
- * @param [options.priority=0] {number}
7344
- * Tasks with higher priority will be taken from the queue before tasks
7345
- * with a lower priority.
7346
- * @param [options.postponeOnAdd=false] {number}
7347
- * If true, this task will not be run until `resumeTask` is called on the
7348
- * scheduler.
7349
- * @param [options.name=undefined] {string}
7350
- * If provided, an arbitrary name for logging purposes.
7351
- * @param [options.userdata] {Any}
7352
- * Arbitrary data that you can store along with this task.
7405
+ * @method constructor
7353
7406
  */
7354
- constructor(options: {
7355
- userdata?: Record<string, any>;
7356
- priority?: number;
7357
- group?: FrameTaskGroup;
7358
- postponeOnAdd?: number | boolean;
7359
- name: string;
7360
- lastFrameTime?: number;
7361
- callback: (...args: any[]) => any;
7362
- });
7363
- _postponed: number | boolean;
7364
- userdata: Record<string, any>;
7365
- _priority: number;
7366
- _group: FrameTaskGroup | null;
7367
- name: string;
7368
- _lastFrameTime: number;
7369
- _callback: (...args: any[]) => any;
7370
- _complete: boolean;
7371
- _scheduled: boolean;
7372
- _cancelled: boolean;
7407
+ constructor();
7408
+ _map: Map<any, any>;
7409
+ _size: number;
7410
+ _sortedKeys: any[];
7373
7411
  /**
7374
- * Return true if this task has been run at least once.
7412
+ * Return true if the set for the given key contains the provided value.
7375
7413
  *
7376
- * @method isComplete
7377
- * @return {boolean}
7414
+ * @method has
7415
+ * @param key {number} the key whose set to check
7416
+ * @param value {Any} the value to check
7378
7417
  */
7379
- isComplete(): boolean;
7418
+ has(key: number, value: any): any;
7380
7419
  /**
7381
- * Return the amount of time that this frame task took to execute,
7382
- * in milliseconds. If this task has not yet completed, the returned value
7383
- * is unspecified.
7420
+ * Return the list of elements at the given key. Make sure not to modify
7421
+ * it, as it will mess up the total element count.
7384
7422
  *
7385
- * @method lastFrameTime
7386
- * @return {number} the frame time, in milliseconds
7423
+ * @method get
7424
+ * @param key {number}
7425
+ * @param value {Set(Any)}
7387
7426
  */
7388
- getLastFrameTime(): number;
7389
- }
7390
- /**
7391
- * A group of tasks that must all be completed before the group is considered
7392
- * complete. The tasks will be automatically garbage collected so that references
7393
- * to the task don't linger.
7394
- *
7395
- * @class FrameTaskGroup
7396
- * @private
7397
- */
7398
- export class FrameTaskGroup {
7427
+ get(key: number): any;
7399
7428
  /**
7400
- * Create a new frame task group.
7429
+ * @method insert
7430
+ * @param key {number} the key to which another value will be added
7431
+ * @param value {Any} the value to add to the key's set
7432
+ */
7433
+ insert(key: number, value: any): void;
7434
+ /**
7435
+ * @method delete
7436
+ * @param key {number} the key at which the value is stored
7437
+ * @param value {Any} the value to delete
7438
+ */
7439
+ delete(key: number, value: any): void;
7440
+ /**
7441
+ * Remove and return an arbitrary value from the set at the given key.
7401
7442
  *
7402
- * @constructor
7403
- * @param [options] {Object} Options for the task group
7404
- * @param [options.onComplete] {function}
7405
- * A callback that will be triggered once every task in this group
7406
- * has been completed. This callback may schedule a task, and the
7407
- * scheduler will run that task in the same frame, if there is still
7408
- * frame time for it.
7409
- * @param [options.priority=0] {number}
7410
- * The priority of all the tasks in this group.
7411
- * @param [options.postponeOnAdd=false] {number}
7412
- * If true, tasks from this task group will not be run until `resumeTask`
7413
- * is called on the scheduler with this group.
7414
- * @param [options.name=undefined] {string}
7415
- * If provided, an arbitrary name for logging purposes.
7416
- * @param [options.userdata] {Any}
7417
- * Arbitrary data that you can store along with this task group.
7443
+ * @method pop
7444
+ * @param key {number} the key from which to remove a value
7445
+ * @return {Any} arbitrary value from the given key's set, or undefined if
7446
+ * the set at the given key is empty.
7418
7447
  */
7419
- constructor(options: {
7420
- onComplete?: (...args: any[]) => any;
7421
- priority?: number;
7422
- userdata: Record<string, any>;
7423
- postponeOnAdd: number | boolean;
7424
- name: string;
7425
- });
7426
- _postponed: number | boolean;
7427
- _onComplete: (...args: any[]) => any;
7428
- _priority: number;
7429
- userdata: Record<string, any>;
7430
- name: string;
7431
- _tasks: Set<any>;
7432
- _scheduledTasks: Set<any>;
7433
- _scheduled: boolean;
7434
- _cancelled: boolean;
7448
+ pop(key: number): any;
7435
7449
  /**
7436
- * Return true if every task in this group has been run at least once.
7437
- * @method isComplete
7438
- * @return {boolean}
7450
+ * Remove and return an arbitrary value from the set corresponding to
7451
+ * the key with the highest numeric value, using the javascript `<`
7452
+ * operator.
7453
+ *
7454
+ * @method popFromMaxKey
7455
+ * @return {Any} arbitrary value from the highest key's set, or undefined
7456
+ * if the map is empty
7439
7457
  */
7440
- isComplete(): boolean;
7458
+ popFromMaxKey(): any;
7441
7459
  /**
7442
- * Return a list of tasks in this group. This will be a copy of the
7443
- * underlying task group, so it's safe to mutate the group while
7444
- * iterating over this array.
7460
+ * Return an iterator over every value in this multimap, at every key.
7461
+ * Mutating the multimap during iteration will result in undefined
7462
+ * behaviour.
7445
7463
  *
7446
- * @method tasks
7447
- * @return {[FrameTask]} list of tasks in this group
7464
+ * @method values
7465
+ * @return {Iterator} iterator over the values in the map
7448
7466
  */
7449
- getTasks(): any[];
7467
+ values(): {
7468
+ [Symbol.iterator]: () => any;
7469
+ next: () => any;
7470
+ };
7450
7471
  /**
7451
- * Empty this task group. This will trivially satisfy `isComplete`.
7472
+ * A list of keys in this set, sorted by numeric value. Not cloned,
7473
+ * for efficiency's sake, so please don't mutate it.
7452
7474
  *
7453
- * @method clear
7475
+ * @method keys
7476
+ * @return {[number]} sorted list of numeric keys in the map
7454
7477
  */
7455
- clear(): void;
7478
+ keys(): any[];
7456
7479
  /**
7457
- * Return one arbitrary incomplete task from this group, or undefined if
7458
- * there are none.
7480
+ * The number of elements in this multimap, equal to the sum of the sizes
7481
+ * of each key's set of values.
7459
7482
  *
7460
- * @method _popTask
7461
- * @return {FrameTask} arbitrary scheduled task
7462
- * @private
7483
+ * @property size {number} number of elements in this multimap
7463
7484
  */
7464
- _popTask(): any;
7485
+ get size(): number;
7465
7486
  }
7466
- /**
7467
- * A timer for the task scheduler that uses real wall-time to determine if there's
7468
- * enough remaining time in a frame to execute another task.
7469
- *
7470
- * @class RealTimeTimer
7471
- * @private
7472
- */
7473
- export class RealTimeTimer {
7474
- _maxMillisecondsPerFrame: number;
7475
- _time: number;
7487
+ export {};
7488
+ }
7489
+
7490
+ declare module '@mappedin/mappedin-js/renderer/private/scene-manager/MapView.SceneManager' {
7491
+ import { MappedinMap } from '@mappedin/mappedin-js/get-venue';
7492
+ import type { ICore, TCameraAnimationOptions, TFocusOnCameraOptions, TCameraTargets, MapViewStackScene } from '@mappedin/mappedin-js/renderer/internal';
7493
+ import { MapObject, MapViewScene } from '@mappedin/mappedin-js/renderer/internal';
7494
+ export type TSceneTransitionOptions = {
7476
7495
  /**
7477
- * @constructor
7478
- * @param [options] {Object} Options for the timer
7479
- * @param [options.maxMillisecondsPerFrame]
7480
- * If the time since the beginning of the frame has been less than
7481
- * or equal to this value, then another task may be executed
7496
+ * Map to set as active during the transition. This will decide where the camera will be positioned, as well as which
7497
+ * colliders are enabled.
7482
7498
  */
7483
- constructor(options?: {
7484
- maxMillisecondsPerFrame?: number;
7485
- });
7499
+ activeMap?: MappedinMap;
7500
+ verticalDistanceBetweenMaps?: number;
7486
7501
  /**
7487
- * Begin timing a frame.
7488
- *
7489
- * @method beginFrame
7502
+ * Whether to auto focus on the active map or leave the camera where it is.
7503
+ * For single building venues, this should look the same way it did with MapManager
7504
+ * For multi-building venues, this means the camera will not pan over to where the active map
7505
+ * is relative to the world, which may look like broken behavior.
7506
+ * @default true
7490
7507
  */
7491
- beginFrame(): void;
7508
+ autoFocusOnActiveMap?: boolean;
7492
7509
  /**
7493
- * If true, there is enough time remaining to execute another task.
7494
- *
7495
- * @method hasTimeRemaining
7496
- * @return {boolean}
7510
+ * Where to focus the camera during transition to Scene. Will focus to fit the map if not provided.
7511
+ * Currently, will discard any targets that are not on the active map.
7497
7512
  */
7498
- hasTimeRemaining(): boolean;
7513
+ focusOn?: {
7514
+ targets?: TCameraTargets;
7515
+ options?: TFocusOnCameraOptions & TCameraAnimationOptions;
7516
+ };
7517
+ };
7518
+ class SceneManager {
7519
+ core: ICore;
7520
+ currentScene: MapViewScene | MapViewStackScene;
7521
+ /**
7522
+ * MapObjects that have been loaded and positioned in the scene
7523
+ */
7524
+ processedMapObjects: Set<MapObject>;
7525
+ constructor(core: ICore, startingScene: MapViewScene);
7526
+ get currentMap(): MappedinMap;
7527
+ renderGrid(): void;
7528
+ transitionTo(scene: MapViewScene, transitionOptions?: TSceneTransitionOptions): Promise<void>;
7529
+ }
7530
+ export default SceneManager;
7531
+ }
7532
+
7533
+ declare module '@mappedin/mappedin-js/renderer/private/scene-manager/MapView.DynamicFocusSceneManager' {
7534
+ import { MappedinMap, MappedinMapGroup } from '@mappedin/mappedin-js/get-venue';
7535
+ import type { ICore } from '@mappedin/mappedin-js/renderer/internal';
7536
+ import { MapViewScene, DynamicFocusScene } from '@mappedin/mappedin-js/renderer/internal';
7537
+ class DynamicFocusSceneManager {
7538
+ dynamicFocusScene: DynamicFocusScene;
7539
+ core: ICore;
7540
+ constructor(core: ICore, baseMap: MappedinMap);
7541
+ panBounds: any;
7542
+ mapShouldSetOnUserInteraction: boolean;
7543
+ get currentScene(): {
7544
+ resize: () => void;
7545
+ currentMap: MappedinMap;
7546
+ mapObjects: Map<string, import("../../internal/Mappedin.MapObject").default>;
7547
+ };
7548
+ get currentMap(): MappedinMap;
7549
+ setDefaultMapForMapGroup(mapGroup: MappedinMapGroup, map: MappedinMap): void;
7550
+ resetDefaultMapForMapGroup(mapGroup: MappedinMapGroup): void;
7551
+ determineTargetMap(): void;
7552
+ update(): void;
7553
+ transitionTo(scene?: MapViewScene): Promise<void>;
7499
7554
  }
7555
+ export default DynamicFocusSceneManager;
7556
+ }
7557
+
7558
+ declare module '@mappedin/mappedin-js/get-venue/pub-sub.typed' {
7500
7559
  /**
7501
- * A timer that ticks every time `hasTimeRemaining` is called.
7560
+ * Generic PubSub class implementing the Publish-Subscribe pattern for event handling.
7502
7561
  *
7503
- * @class FixedTimer
7504
- * @private
7562
+ * @template EVENT_PAYLOAD - The type of the event payload.
7563
+ * @template EVENT - The type of the event.
7505
7564
  */
7506
- export class FixedTimer {
7507
- _ticks: number;
7508
- maxTasksPerFrame: number;
7565
+ export class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EVENT_PAYLOAD> {
7509
7566
  /**
7510
- * @constructor
7511
- * @param [options] {Object} Options for the timer
7512
- * @param [options.maxTasksPerFrame=5]
7513
- * The number of tasks that will be exceuted in a single update call.
7514
- * Can be modified as the `maxTasksPerFrame` property on this boject.
7567
+ * @private
7568
+ * @internal
7515
7569
  */
7516
- constructor(options?: {
7517
- maxTasksPerFrame?: number;
7518
- });
7570
+ _subscribers: any;
7519
7571
  /**
7520
- * Begin timing a frame.
7521
- *
7522
- * @method beginFrame
7572
+ * @private
7573
+ * @internal
7523
7574
  */
7524
- beginFrame(): void;
7575
+ publish<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, data?: EVENT_PAYLOAD[EVENT_NAME]): void;
7525
7576
  /**
7526
- * If true, there is enough time remaining to execute another task.
7527
- *
7528
- * @method hasTimeRemaining
7529
- * @return {boolean}
7530
- */
7531
- hasTimeRemaining(): boolean;
7532
- }
7533
- export type TaskSchedulerOptions = {
7534
- timer?: RealTimeTimer;
7535
- performance?: boolean;
7536
- onUpdateEnd?: () => void;
7537
- };
7538
- /**
7539
- * A class that handles scheduling tasks to be performed within the time
7540
- * constraints of frame updates, triggered using `requestAnimationFrame`.
7541
- *
7542
- * Tasks can either be scheduled once per frame (called "frame updates"), or
7543
- * to execute as many times per frame as there is room for after processing
7544
- * all frame updates (called "frame tasks").
7545
- *
7546
- * Posted tasks will always run during the same frame, assuming there's time to
7547
- * process them. However, an update or task that posts an update will not run
7548
- * that update until the next frame.
7549
- *
7550
- * @class TaskScheduler
7551
- * @private
7552
- */
7553
- export class TaskScheduler {
7554
- /**
7555
- * Construct a new `TaskScheduler` with no tasks scheduled.
7556
- *
7557
- * @constructor
7558
- * @param [options] {Object} Options for the scheduler
7559
- * @param [options.timer=new RealTimeTimer()]
7560
- * Timer that determines whether there is sufficient time left in a frame
7561
- * to continue executing tasks
7562
- * @param [options.performance=false]
7563
- * If true, this task scheduler will annotate tasks and frame updates with
7564
- * performance information.
7565
- */
7566
- constructor(options?: TaskSchedulerOptions);
7567
- _raf?: (callback: FrameRequestCallback) => number;
7568
- options?: TaskSchedulerOptions;
7569
- _timer: RealTimeTimer;
7570
- _performance: boolean;
7571
- _scheduledUpdatesByOrdering: Multimap;
7572
- _scheduledTasksByPriority: Multimap;
7573
- _postponedTasks: Set<any>;
7574
- _requestAnimationFrameHandle: number | null;
7575
- _updatesToRunThisFrame: any[];
7576
- _lastFrameTime: number;
7577
- _updatesRunLastFrame: Set<any>;
7578
- /**
7579
- * Empty the task scheduler's queue. All tasks in it will be cancelled.
7580
- *
7581
- * @method clear
7582
- */
7583
- clear(): void;
7584
- /**
7585
- * Destroy this task scheduler and remove all tasks from it.
7586
- *
7587
- * @method destroy
7588
- */
7589
- destroy(): void;
7590
- /**
7591
- * Schedule this task scheduler to execute updates and tasks on the next
7592
- * available animation frame.
7593
- *
7594
- * @method requestAnimationFrame
7595
- */
7596
- requestAnimationFrame(): void;
7597
- /**
7598
- * Run all scheduled updates, and re-schedule another animation frame if any
7599
- * scheduled updates still exist. If any scheduled update specifies
7600
- * `shouldRunTasksAfterCompletion`, this will also run queued tasks until the
7601
- * frame time runs out.
7602
- *
7603
- * @method update
7604
- * @param timestamp {number} the current animation time, as returned from
7605
- * `performance.now()`; will be automatically filled in by
7606
- * `requestAnimationFrame` when it triggers this as a callback
7607
- */
7608
- update(timestamp: number): void;
7609
- /**
7610
- * Execute all tasks that are currently pending, without regard for the
7611
- * available frame time.
7612
- *
7613
- * @method flushTasks
7614
- */
7615
- flushTasks(): void;
7616
- /**
7617
- * Return the amount of time elapsed during the last completed frame update,
7618
- * in milliseconds. This value is unspecified if the task scheduler's
7619
- * `update` method has not yet run or if the scheduler has been cleared.
7620
- * If called during a frame update, this will
7621
- * return the time elapsed during the previous frame update.
7622
- *
7623
- * @method lastFrameTime
7624
- * @return {number} time elapsed during last frame update, in milliseconds
7625
- */
7626
- getLastFrameTime(): number;
7627
- /**
7628
- * Return a set containing every update that was run during the previous
7629
- * frame update. This will be empty if the task scheduler's `update` method
7630
- * has not yet been run or if the scheduler has been cleared.
7631
- */
7632
- getUpdatesRunLastFrame(): Set<any>;
7633
- _executeOneTask(timestamp: number): void;
7634
- /**
7635
- * Schedule an update to be run for the next `update.frameCount` frames. If
7636
- * the update already exists in the scheduler, the update's frame count will
7637
- * be refreshed to `update.frameCount`. This will also schedule an animation
7638
- * frame to begin processing the update.
7639
- *
7640
- * @method scheduleUpdate
7641
- * @param task {FrameUpdate} the update to schedule
7642
- */
7643
- scheduleUpdate(update: FrameUpdate): void;
7644
- /**
7645
- * Schedule a task to be run during a frame update. This will also schedule
7646
- * an animation frame to begin processing the task queue.
7647
- *
7648
- * @method scheduleTask
7649
- * @param task {FrameTask} the task to schedule
7650
- */
7651
- scheduleTask(task: FrameTask): void;
7652
- /**
7653
- * If the given update is in the queue, remove it.
7654
- *
7655
- * @method cancelUpdate
7656
- * @param task {FrameUpdate} the update to cancel
7657
- */
7658
- cancelUpdate(update: FrameUpdate): void;
7659
- /**
7660
- * If the given task or group is in the queue, remove it. Cancelling a
7661
- * completed task is a no-op.
7662
- *
7663
- * Canceling an individual task will also remove it from its task group, if
7664
- * it isn't already complete.
7665
- *
7666
- * @method cancelTask
7667
- * @param task {FrameTask or FrameTaskGroup} the task to cancel
7668
- */
7669
- cancelTask(task: FrameTask | FrameTaskGroup): void;
7670
- /**
7671
- * Set the provided task or group not to run, until it's resumed using `resumeTask`.
7672
- *
7673
- * Tasks that are in a group can't be postponed individually; instead, call
7674
- * `postponeTask` with the entire group.
7675
- *
7676
- * @method postponeTask
7677
- * @param task {FrameTask or FrameTaskGroup} the task to postpone
7678
- */
7679
- postponeTask(task: FrameTask | FrameTaskGroup): void;
7680
- /**
7681
- * Allow a postponed task or task group to resume processing. This will also
7682
- * request an animation frame to allow the resumed task to be processed.
7683
- *
7684
- * Tasks that are in a group can't be resumed individually; instead, call
7685
- * `resumeTask` with the entire group.
7686
- *
7687
- * @method resumeTask
7688
- * @param task {FrameTask or FrameTaskGroup} the task to resume
7689
- */
7690
- resumeTask(task: FrameTask | FrameTaskGroup): void;
7691
- /**
7692
- * Change the priority of the given scheduled task or task group.
7693
- *
7694
- * @method setTaskPriority
7695
- * @param task {FrameTask or FrameTaskGroup} the task whose priority will be changed
7696
- * @param priority {number} the priority to assign the task
7697
- */
7698
- setTaskPriority(task: FrameTask | FrameTaskGroup, priority: number): void;
7699
- }
7700
- /**
7701
- * A map that maps a numeric key to a set of values.
7702
- *
7703
- * For use in the scheduler, we also maintain a sorted list of keys.
7704
- *
7705
- * @class Multimap
7706
- * @private
7707
- */
7708
- class Multimap {
7709
- /**
7710
- * @method constructor
7711
- */
7712
- constructor();
7713
- _map: Map<any, any>;
7714
- _size: number;
7715
- _sortedKeys: any[];
7716
- /**
7717
- * Return true if the set for the given key contains the provided value.
7718
- *
7719
- * @method has
7720
- * @param key {number} the key whose set to check
7721
- * @param value {Any} the value to check
7722
- */
7723
- has(key: number, value: any): any;
7724
- /**
7725
- * Return the list of elements at the given key. Make sure not to modify
7726
- * it, as it will mess up the total element count.
7727
- *
7728
- * @method get
7729
- * @param key {number}
7730
- * @param value {Set(Any)}
7731
- */
7732
- get(key: number): any;
7733
- /**
7734
- * @method insert
7735
- * @param key {number} the key to which another value will be added
7736
- * @param value {Any} the value to add to the key's set
7737
- */
7738
- insert(key: number, value: any): void;
7739
- /**
7740
- * @method delete
7741
- * @param key {number} the key at which the value is stored
7742
- * @param value {Any} the value to delete
7743
- */
7744
- delete(key: number, value: any): void;
7745
- /**
7746
- * Remove and return an arbitrary value from the set at the given key.
7747
- *
7748
- * @method pop
7749
- * @param key {number} the key from which to remove a value
7750
- * @return {Any} arbitrary value from the given key's set, or undefined if
7751
- * the set at the given key is empty.
7752
- */
7753
- pop(key: number): any;
7754
- /**
7755
- * Remove and return an arbitrary value from the set corresponding to
7756
- * the key with the highest numeric value, using the javascript `<`
7757
- * operator.
7758
- *
7759
- * @method popFromMaxKey
7760
- * @return {Any} arbitrary value from the highest key's set, or undefined
7761
- * if the map is empty
7762
- */
7763
- popFromMaxKey(): any;
7764
- /**
7765
- * Return an iterator over every value in this multimap, at every key.
7766
- * Mutating the multimap during iteration will result in undefined
7767
- * behaviour.
7768
- *
7769
- * @method values
7770
- * @return {Iterator} iterator over the values in the map
7771
- */
7772
- values(): {
7773
- [Symbol.iterator]: () => any;
7774
- next: () => any;
7775
- };
7776
- /**
7777
- * A list of keys in this set, sorted by numeric value. Not cloned,
7778
- * for efficiency's sake, so please don't mutate it.
7779
- *
7780
- * @method keys
7781
- * @return {[number]} sorted list of numeric keys in the map
7782
- */
7783
- keys(): any[];
7784
- /**
7785
- * The number of elements in this multimap, equal to the sum of the sizes
7786
- * of each key's set of values.
7787
- *
7788
- * @property size {number} number of elements in this multimap
7789
- */
7790
- get size(): number;
7791
- }
7792
- export {};
7793
- }
7794
-
7795
- declare module '@mappedin/mappedin-js/renderer/private/scene-manager/MapView.SceneManager' {
7796
- import { MappedinMap } from '@mappedin/mappedin-js/get-venue';
7797
- import type { ICore, TCameraAnimationOptions, TFocusOnCameraOptions, TCameraTargets, MapViewStackScene } from '@mappedin/mappedin-js/renderer/internal';
7798
- import { MapObject, MapViewScene } from '@mappedin/mappedin-js/renderer/internal';
7799
- export type TSceneTransitionOptions = {
7800
- /**
7801
- * Map to set as active during the transition. This will decide where the camera will be positioned, as well as which
7802
- * colliders are enabled.
7803
- */
7804
- activeMap?: MappedinMap;
7805
- verticalDistanceBetweenMaps?: number;
7806
- /**
7807
- * Whether to auto focus on the active map or leave the camera where it is.
7808
- * For single building venues, this should look the same way it did with MapManager
7809
- * For multi-building venues, this means the camera will not pan over to where the active map
7810
- * is relative to the world, which may look like broken behavior.
7811
- * @default true
7812
- */
7813
- autoFocusOnActiveMap?: boolean;
7814
- /**
7815
- * Where to focus the camera during transition to Scene. Will focus to fit the map if not provided.
7816
- * Currently, will discard any targets that are not on the active map.
7817
- */
7818
- focusOn?: {
7819
- targets?: TCameraTargets;
7820
- options?: TFocusOnCameraOptions & TCameraAnimationOptions;
7821
- };
7822
- };
7823
- class SceneManager {
7824
- core: ICore;
7825
- currentScene: MapViewScene | MapViewStackScene;
7826
- /**
7827
- * MapObjects that have been loaded and positioned in the scene
7828
- */
7829
- processedMapObjects: Set<MapObject>;
7830
- constructor(core: ICore, startingScene: MapViewScene);
7831
- get currentMap(): MappedinMap;
7832
- renderGrid(): void;
7833
- transitionTo(scene: MapViewScene, transitionOptions?: TSceneTransitionOptions): Promise<void>;
7834
- }
7835
- export default SceneManager;
7836
- }
7837
-
7838
- declare module '@mappedin/mappedin-js/renderer/private/scene-manager/MapView.DynamicFocusSceneManager' {
7839
- import { MappedinMap, MappedinMapGroup } from '@mappedin/mappedin-js/get-venue';
7840
- import type { ICore } from '@mappedin/mappedin-js/renderer/internal';
7841
- import { MapViewScene, DynamicFocusScene } from '@mappedin/mappedin-js/renderer/internal';
7842
- class DynamicFocusSceneManager {
7843
- dynamicFocusScene: DynamicFocusScene;
7844
- core: ICore;
7845
- constructor(core: ICore, baseMap: MappedinMap);
7846
- panBounds: any;
7847
- mapShouldSetOnUserInteraction: boolean;
7848
- get currentScene(): {
7849
- resize: () => void;
7850
- currentMap: MappedinMap;
7851
- mapObjects: Map<string, import("../../internal/Mappedin.MapObject").default>;
7852
- };
7853
- get currentMap(): MappedinMap;
7854
- setDefaultMapForMapGroup(mapGroup: MappedinMapGroup, map: MappedinMap): void;
7855
- resetDefaultMapForMapGroup(mapGroup: MappedinMapGroup): void;
7856
- determineTargetMap(): void;
7857
- update(): void;
7858
- transitionTo(scene?: MapViewScene): Promise<void>;
7859
- }
7860
- export default DynamicFocusSceneManager;
7861
- }
7862
-
7863
- declare module '@mappedin/mappedin-js/get-venue/pub-sub.typed' {
7864
- /**
7865
- * Generic PubSub class implementing the Publish-Subscribe pattern for event handling.
7866
- *
7867
- * @template EVENT_PAYLOAD - The type of the event payload.
7868
- * @template EVENT - The type of the event.
7869
- */
7870
- export class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EVENT_PAYLOAD> {
7871
- /**
7872
- * @private
7873
- * @internal
7874
- */
7875
- _subscribers: any;
7876
- /**
7877
- * @private
7878
- * @internal
7879
- */
7880
- publish<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, data?: EVENT_PAYLOAD[EVENT_NAME]): void;
7881
- /**
7882
- * Subscribe a function to an event.
7577
+ * Subscribe a function to an event.
7883
7578
  *
7884
7579
  * @param eventName An event name which, when fired, will call the provided
7885
7580
  * function.
@@ -9243,6 +8938,10 @@ declare module '@mappedin/mappedin-js/renderer/private/controllers/StackedMapsCo
9243
8938
  zoomInToMap: (map: MappedinMap, cameraOptions?: TCameraTransform & TCameraAnimationOptions) => Promise<void>;
9244
8939
  get currentMap(): MappedinMap;
9245
8940
  }
8941
+ /**
8942
+ * @internal
8943
+ */
8944
+ export function setStackedMapsOverviewTiltInDegrees(v: number): void;
9246
8945
  export default StackedMapsController;
9247
8946
  }
9248
8947
 
@@ -9290,857 +8989,1141 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.Renderer' {
9290
8989
  shouldConsiderAlpha: any;
9291
8990
  antialias: any;
9292
8991
  /**
9293
- * Dispose of any resources and connections allocated by the renderer.
9294
- *
9295
- * @method destroy
8992
+ * Dispose of any resources and connections allocated by the renderer.
8993
+ *
8994
+ * @method destroy
8995
+ */
8996
+ destroy(): void;
8997
+ /**
8998
+ * Render the scene to the provided framebuffer. A null framebuffer will
8999
+ * render to the default canvas.
9000
+ *
9001
+ * @method render
9002
+ * @param renderTask {RENDER}
9003
+ * @param renderTarget {null or WebGLRenderTarget}
9004
+ * @param scene {Scene}
9005
+ * @param sceneCamera {Camera}
9006
+ */
9007
+ render(renderTask: RENDER, renderTarget: null, scene: Scene, sceneCamera: Camera): void;
9008
+ /**
9009
+ * Return the maximum supported anisotropy of this renderer.
9010
+ *
9011
+ * @method getMaxAnisotropy
9012
+ * @return {number}
9013
+ */
9014
+ getMaxAnisotropy(): number;
9015
+ /**
9016
+ * Return the size of the renderer's target.
9017
+ *
9018
+ * @method getBufferSize
9019
+ * @return {Vector2}
9020
+ */
9021
+ getBufferSize(): Vector2;
9022
+ /**
9023
+ * Return the WebGL context associated with this renderer, to ensure
9024
+ * other objects that use WebGL will put their textures in the same
9025
+ * context.
9026
+ *
9027
+ * @method context
9028
+ * @return {WebGLRenderingContext} context used by this renderer
9029
+ */
9030
+ getContext(): WebGLRenderingContext;
9031
+ /**
9032
+ * Preload a texture, I think. Not actually sure what this does. TODO.
9033
+ *
9034
+ * @method preloadTexture
9035
+ * @param texture {Texture}
9036
+ */
9037
+ preloadTexture(texture: Texture): void;
9038
+ /**
9039
+ * Set the renderer and all its internal buffers to the provided width and
9040
+ * height in pixels.
9041
+ *
9042
+ * @method setBufferSize
9043
+ * @param width {number}
9044
+ * @param height {number}
9045
+ */
9046
+ setBufferSize(width: number, height: number): void;
9047
+ get backgroundColor(): Color | undefined;
9048
+ get backgroundAlpha(): number | undefined;
9049
+ /**
9050
+ * Set the color and opacity that will be drawn behind the scene.
9051
+ *
9052
+ * @method setBackgroundColor
9053
+ * @param color {Color}
9054
+ * @param alpha {number}
9055
+ */
9056
+ setBackgroundColor(color: Color, alpha?: number): void;
9057
+ /**
9058
+ * Assign an outdoor context to this renderer, which will be included as
9059
+ * part of the `STATIC` rendering pass.
9060
+ *
9061
+ * @method setMapboxOutdoorContext
9062
+ * @param {MapboxOutdoorContext} mapboxOutdoorContext context to draw
9063
+ */
9064
+ setMapboxOutdoorContext(mapboxOutdoorContext: MapboxOutdoorContext): void;
9065
+ domElement(): HTMLCanvasElement;
9066
+ isAvailable(): boolean;
9067
+ disposeOfRenderLists(): void;
9068
+ reportWebGlContextCreationError(e: any): void;
9069
+ reportWebGlContextLost(e: any): void;
9070
+ reportWebGLContextRestored(): void;
9071
+ /**
9072
+ * Sometimes we have to use WebGL 1 because of a regression in Chrome
9073
+ * due to some unknown performance bug in Apple's OpenGL Angle backend on MacBook+Radeon GPU.
9074
+ * The official recommendation is to turn on Metal backed ANGLE in your Chrome's about:flags.
9075
+ * We can't force our users to do it, so we have to support both WebGL 1 & WebGL 2
9076
+ * See: https://bugs.chromium.org/p/chromium/issues/detail?id=1245448
9077
+ * The Method returns target WebGL version based on the hardware configuration.
9078
+ *
9079
+ * @param context WebGL context
9080
+ * @returns {1|2} WebGL version
9081
+ */
9082
+ getTargetWebGLVersion(context: any): 1 | 2;
9083
+ /**
9084
+ *
9085
+ * @param options
9086
+ * @returns {SingleBufferRenderer|MultiBufferRenderer}
9087
+ */
9088
+ getRenderer(options: any): SingleBufferRenderer | MultiBufferRenderer;
9089
+ }
9090
+ /**
9091
+ * A legacy renderer that renders all the elements in the scene to a single
9092
+ * buffer. Does not support things like transparent paths behind polygons
9093
+ * natively, but can potentially fake it.
9094
+ *
9095
+ * 2019/07/10 Terence Dickson
9096
+ * Generally has worse performance under average loads compared to the
9097
+ * multi-buffer renderer, as the multi-buffer renderer can avoid re-rendering
9098
+ * the entire map if only animated elements on the map have changed.
9099
+ *
9100
+ * @class SingleBufferRenderer
9101
+ * @private
9102
+ */
9103
+ class SingleBufferRenderer {
9104
+ constructor(renderOptions: any, targetWebGLVersion?: number);
9105
+ options: any;
9106
+ core: any;
9107
+ renderer: WebGLRenderer | undefined;
9108
+ effectComposer: EffectComposer | undefined;
9109
+ backgroundColor: Color;
9110
+ backgroundAlpha: number;
9111
+ mapboxOutdoorContext: any;
9112
+ /**
9113
+ * Dispose of the renderer.
9114
+ */
9115
+ destroy(): void;
9116
+ /**
9117
+ * Re-render the scene. This ignores the `renderTask` argument, as all
9118
+ * re-renders in the single-buffer renderer are full re-renders.
9119
+ *
9120
+ * @method render
9121
+ * @param renderTask {RENDER}
9122
+ * @param renderTarget {null or WebGLRenderTarget}
9123
+ * @param scene {Scene}
9124
+ * @param sceneCamera {Camera}
9125
+ */
9126
+ render(renderTask: RENDER, renderTarget: null, scene: Scene, sceneCamera: Camera): void;
9127
+ /**
9128
+ * Set the size of the renderer.
9129
+ *
9130
+ * @method setBufferSize
9131
+ * @param width {number}
9132
+ * @param height {number}
9133
+ */
9134
+ setBufferSize(width: number, height: number): void;
9135
+ width: number | undefined;
9136
+ height: number | undefined;
9137
+ /**
9138
+ * Set the color and opacity that will be drawn behind the scene.
9139
+ *
9140
+ * @method setBackgroundColor
9141
+ * @param color {Color}
9142
+ * @param alpha {number}
9143
+ */
9144
+ setBackgroundColor(color: Color, alpha: number): void;
9145
+ /**
9146
+ * Assign an outdoor context to this renderer.
9147
+ *
9148
+ * @method setMapboxOutdoorContext
9149
+ * @param {MapboxOutdoorContext} mapboxOutdoorContext context to draw
9150
+ */
9151
+ setMapboxOutdoorContext(mapboxOutdoorContext: MapboxOutdoorContext): void;
9152
+ }
9153
+ /**
9154
+ * Our new renderer that renders static elements to one buffer and animated
9155
+ * elements to another buffer, allowing only the latter buffer to be
9156
+ * re-rendered if the camera isn't moving. There is also a third buffer that
9157
+ * can be used to render elements that must appear always on top.
9158
+ *
9159
+ * Does not yet support antialiasing.
9160
+ *
9161
+ * 2019/07/10 Terence Dickson
9162
+ * Generally has better performance under average loads compared to the
9163
+ * single-buffer renderer, but does not work on IE 11.
9164
+ *
9165
+ * @class MultiBufferRenderer
9166
+ * @private
9167
+ */
9168
+ export class MultiBufferRenderer {
9169
+ constructor(renderOptions: any, targetWebGLVersion?: number);
9170
+ effectComposer: null;
9171
+ outdoorsVisible: boolean;
9172
+ options: any;
9173
+ renderer: WebGLRenderer | undefined;
9174
+ core: any;
9175
+ journeyOpacity: number | undefined;
9176
+ backgroundColor: Color | undefined;
9177
+ backgroundAlpha: number | undefined;
9178
+ mapboxOutdoorContext: any;
9179
+ staticSceneRenderTarget: WebGLRenderTarget<Texture> | undefined;
9180
+ animatedSceneRenderTarget: WebGLRenderTarget<Texture> | undefined;
9181
+ animatedSceneBackgroundRenderTarget: WebGLRenderTarget<Texture> | undefined;
9182
+ alwaysOnTopSceneRenderTarget: WebGLRenderTarget<Texture> | undefined;
9183
+ outdoorViewRenderTarget: WebGLRenderTarget<Texture> | undefined;
9184
+ populateRenderTarget(renderTarget: any): void;
9185
+ createOutdoorViewTexture(): void;
9186
+ outdoorViewTexture: Texture | undefined;
9187
+ outdoorViewTextureProps: any;
9188
+ setupEffectComposer(): void;
9189
+ setOutdoorViewTexture(texture: any): void;
9190
+ /**
9191
+ * Dispose of the renderer and its buffers.
9296
9192
  */
9297
9193
  destroy(): void;
9194
+ renderToAnimatedBackgroundBuffer(scene: any, sceneCamera: any): void;
9298
9195
  /**
9299
- * Render the scene to the provided framebuffer. A null framebuffer will
9300
- * render to the default canvas.
9196
+ * Render the provided scene using the given camera, re-rendering only
9197
+ * the animated parts.
9301
9198
  *
9302
- * @method render
9303
- * @param renderTask {RENDER}
9199
+ * @method renderAnimated
9304
9200
  * @param renderTarget {null or WebGLRenderTarget}
9305
9201
  * @param scene {Scene}
9306
9202
  * @param sceneCamera {Camera}
9307
9203
  */
9308
- render(renderTask: RENDER, renderTarget: null, scene: Scene, sceneCamera: Camera): void;
9309
- /**
9310
- * Return the maximum supported anisotropy of this renderer.
9311
- *
9312
- * @method getMaxAnisotropy
9313
- * @return {number}
9314
- */
9315
- getMaxAnisotropy(): number;
9204
+ renderAnimated(renderTarget: null, scene: Scene, sceneCamera: Camera): void;
9316
9205
  /**
9317
- * Return the size of the renderer's target.
9206
+ * Render the provided scene using the given camera, re-rendering only
9207
+ * the parts that should appear on top of all other elements.
9318
9208
  *
9319
- * @method getBufferSize
9320
- * @return {Vector2}
9209
+ * @method renderAlwaysOnTop
9210
+ * @param renderTarget {null or WebGLRenderTarget}
9211
+ * @param scene {Scene}
9212
+ * @param sceneCamera {Camera}
9321
9213
  */
9322
- getBufferSize(): Vector2;
9214
+ renderAlwaysOnTop(renderTarget: null, scene: Scene, sceneCamera: Camera): void;
9323
9215
  /**
9324
- * Return the WebGL context associated with this renderer, to ensure
9325
- * other objects that use WebGL will put their textures in the same
9326
- * context.
9216
+ * Render all of the scene layers, then combine them.
9327
9217
  *
9328
- * @method context
9329
- * @return {WebGLRenderingContext} context used by this renderer
9218
+ * @method renderAll
9219
+ * @param renderTarget {null or WebGLRenderTarget}
9220
+ * @param scene {Scene}
9221
+ * @param sceneCamera {Camera}
9330
9222
  */
9331
- getContext(): WebGLRenderingContext;
9223
+ renderAll(renderTarget: null, scene: Scene, sceneCamera: Camera): void;
9332
9224
  /**
9333
- * Preload a texture, I think. Not actually sure what this does. TODO.
9225
+ * Re-render the scene, depending on which parts of the scene have been
9226
+ * invalidated.
9334
9227
  *
9335
- * @method preloadTexture
9336
- * @param texture {Texture}
9228
+ * @method render
9229
+ * @param renderTarget {null or WebGLRenderTarget}
9230
+ * @param scene {Scene}
9231
+ * @param sceneCamera {Camera}
9337
9232
  */
9338
- preloadTexture(texture: Texture): void;
9233
+ render(renderTask: any, renderTarget: null, scene: Scene, sceneCamera: Camera): void;
9339
9234
  /**
9340
- * Set the renderer and all its internal buffers to the provided width and
9341
- * height in pixels.
9235
+ * Set the size of the renderer, composer, and all its internal buffers.
9342
9236
  *
9343
9237
  * @method setBufferSize
9344
9238
  * @param width {number}
9345
9239
  * @param height {number}
9346
9240
  */
9347
9241
  setBufferSize(width: number, height: number): void;
9348
- get backgroundColor(): Color | undefined;
9349
- get backgroundAlpha(): number | undefined;
9242
+ width: number | undefined;
9243
+ height: number | undefined;
9244
+ /**
9245
+ * Set the color and opacity that will be drawn behind the scene.
9246
+ *
9247
+ * @method setBackgroundColor
9248
+ * @param color {Color}
9249
+ * @param alpha {number}
9250
+ */
9251
+ setBackgroundColor(color: Color, alpha: number): void;
9252
+ /**
9253
+ * Assign an outdoor context to this renderer.
9254
+ *
9255
+ * @method setMapboxOutdoorContext
9256
+ * @param {MapboxOutdoorContext} mapboxOutdoorContext context to draw
9257
+ */
9258
+ setMapboxOutdoorContext(mapboxOutdoorContext: MapboxOutdoorContext): void;
9259
+ setOutdoorViewController(outdoorViewController: any): void;
9260
+ outdoorViewController: any;
9261
+ toggleOutdoorViewVisiblity(visible: any): void;
9262
+ }
9263
+ import { RENDER } from '@mappedin/mappedin-js/renderer/internal';
9264
+ import { Scene } from 'three';
9265
+ import { Camera } from 'three';
9266
+ import { Vector2 } from 'three';
9267
+ import { Texture } from 'three';
9268
+ import { Color } from 'three';
9269
+ import { WebGLRenderer } from 'three';
9270
+ import { EffectComposer } from '@mappedin/mappedin-js/renderer/internal/Mappedin.EffectComposer';
9271
+ import { WebGLRenderTarget } from 'three';
9272
+ export {};
9273
+ }
9274
+
9275
+ declare module '@mappedin/mappedin-js/renderer/private/controllers/JourneyController' {
9276
+ import type Directive from '@mappedin/mappedin-js/navigator/Directive';
9277
+ import type INode from '@mappedin/mappedin-js/navigator/interfaces/INode';
9278
+ import { Path } from '@mappedin/mappedin-js/renderer/internal';
9279
+ import type { TJourneyOptions } from '@mappedin/mappedin-js/renderer/internal';
9280
+ import { MappedinDirections } from '@mappedin/mappedin-js/get-venue';
9281
+ import Core from '@mappedin/mappedin-js/renderer/private/Core';
9282
+ export type TMappedinDirections = {
9283
+ distance: number;
9284
+ path: INode[];
9285
+ instructions: Directive[];
9286
+ };
9287
+ /**
9288
+ *
9289
+ * The Journey class represents a journey from point A to point B. This includes any intermediate connections, such as stairs or elevators.
9290
+ * The idea is to provide a higher level API with enough hooks to customize the experience. Also, to ensure only 1 journey is allowed at once.
9291
+ * This version does not support "stacked view" - but that can be added in the future
9292
+ *
9293
+ * @internal
9294
+ */
9295
+ export class JourneyController {
9296
+ #private;
9297
+ distance: number;
9298
+ accessible: boolean;
9299
+ activeDirections: MappedinDirections;
9300
+ get isMultiFloor(): boolean;
9301
+ get mapsInJourney(): (import("../../internal").MappedinMap | undefined)[];
9302
+ get mapsIdsInJourney(): (string | undefined)[];
9303
+ get buildingsInJourney(): {};
9304
+ get mapIdsInvolvedInJourney(): string[];
9305
+ constructor(directions: MappedinDirections | MappedinDirections[], options: TJourneyOptions | undefined, core: Core);
9306
+ setStep: (step: any) => void;
9307
+ setStepByPath: (path: Path) => void;
9308
+ overviewPathMode: 'never' | 'always' | 'current-elevation-and-mapgroup';
9309
+ setOverviewPathMode(mode: 'never' | 'always' | 'current-elevation-and-mapgroup'): void;
9310
+ static instance: JourneyController | null;
9311
+ static create(directions: MappedinDirections | MappedinDirections[], options: any, core: Core): JourneyController;
9312
+ destroy(): void;
9313
+ }
9314
+ }
9315
+
9316
+ declare module '@mappedin/mappedin-js/renderer/private/controllers/ExportController' {
9317
+ import type { ICore } from '@mappedin/mappedin-js/renderer/internal';
9318
+ /**
9319
+ * @hidden
9320
+ */
9321
+ export type TGLTFExportOptions = {
9322
+ onlyVisible?: boolean;
9323
+ binary?: boolean;
9324
+ scale?: number;
9325
+ };
9326
+ /**
9327
+ * API for exporting the scene.
9328
+ *
9329
+ * @hidden
9330
+ */
9331
+ export default class ExportController {
9332
+ #private;
9333
+ core: ICore;
9334
+ glTFExporter?: any;
9335
+ constructor(core: ICore);
9336
+ /**
9337
+ * Exports the current scene as a GLTF file.
9338
+ */
9339
+ getCurrentSceneGLTF: (userOptions: TGLTFExportOptions) => Promise<Blob>;
9340
+ }
9341
+ }
9342
+
9343
+ declare module '@mappedin/mappedin-js/renderer/private/controllers/LayerController' {
9344
+ import type { ICore } from '@mappedin/mappedin-js/renderer/private/Core.interface';
9345
+ import { MappedinMap } from '@mappedin/mappedin-js/get-venue';
9346
+ import { Feature, FeatureCollection, GeoJsonProperties, Polygon } from 'geojson';
9347
+ class LayerController {
9348
+ #private;
9349
+ constructor(core: ICore);
9350
+ /**
9351
+ * Show a set of layers on the current map, and hide all other layers. This also hides any colliders associated with the hidden layers.
9352
+ */
9353
+ showLayers(layers: string[]): void;
9354
+ getAllLayersForMap(map: MappedinMap): Promise<{
9355
+ [layerName: string]: boolean;
9356
+ }>;
9357
+ /**
9358
+ * Return a list of all visible layers for a map, this will NOT trigger a map load, and is mainly used internally
9359
+ * which is why its synchronous
9360
+ */
9361
+ getVisibleLayersForLoadedMap(map: MappedinMap): string[] | undefined;
9362
+ addGeoJSONLayer(layerName: string, featureOrFeatureCollection: Feature<Polygon, GeoJsonProperties | null> | FeatureCollection<Polygon, GeoJsonProperties | null>): Promise<void>;
9363
+ removeGeoJSONLayer(layerName: string): Promise<void>;
9364
+ }
9365
+ export default LayerController;
9366
+ }
9367
+
9368
+ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.ui' {
9369
+ import { IBlueDotCore, BlueDotManager } from '@mappedin/mappedin-js/renderer/internal';
9370
+ import { IPubSub } from '@mappedin/mappedin-js/renderer/internal/pub-sub';
9371
+ import type { ICore } from '@mappedin/mappedin-js/renderer/internal';
9372
+ enum ZOOM_CONDITION {
9373
+ EXPIRED = 0,
9374
+ IN_PROGRESS = 1,
9375
+ COMPLETED = 2
9376
+ }
9377
+ export interface IBlueDotUI extends IPubSub {
9378
+ blueDotTooltips: any[];
9379
+ setBlueDotPosition: () => void;
9380
+ showBlueDotBearing: () => void;
9381
+ addGhostMarkers: () => void;
9382
+ addLocationUncertainMarkersAndTooltips: () => void;
9383
+ addBlueDotMarker: () => void;
9384
+ removeTooltips: () => void;
9385
+ removeBlueDot: () => void;
9386
+ centerBlueDot: () => void;
9387
+ endFollowing: () => void;
9388
+ zoomCondition: ZOOM_CONDITION;
9389
+ isFollowing: boolean;
9390
+ useRotationMode: boolean;
9391
+ }
9392
+ type TBlueDotUIProps = {
9393
+ core: ICore;
9394
+ blueDotManager: BlueDotManager;
9395
+ controller: IBlueDotCore;
9396
+ data: any;
9397
+ };
9398
+ const BlueDotUI: ({ core, blueDotManager, controller }: TBlueDotUIProps) => IBlueDotUI;
9399
+ export default BlueDotUI;
9400
+ }
9401
+
9402
+ declare module '@mappedin/mappedin-js/renderer/internal/utils' {
9403
+ export * from '@mappedin/mappedin-js/renderer/internal/utils/utils';
9404
+ export { shouldDisableOffscreenCanvas } from '@mappedin/mappedin-js/renderer/internal/utils/browser';
9405
+ export { throttle, debounce } from '@mappedin/mappedin-js/renderer/internal/utils/async';
9406
+ }
9407
+
9408
+ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.MapManager' {
9409
+ export default MapManager;
9410
+ class MapManager extends PubSub {
9411
+ constructor(polygonMeshesById: any, renderer: any, core: any, taskScheduler: any, loadOptions?: {});
9412
+ mapObjects: Map<any, any>;
9413
+ currentMap: undefined;
9414
+ object: Object3D<import("three").Object3DEventMap>;
9415
+ _showCount: number;
9416
+ _mapObjectsSortedByElevationDirty: boolean;
9417
+ expanded: boolean;
9418
+ polygonMeshesById: any;
9419
+ core: any;
9420
+ renderer: any;
9421
+ loadOptions: {};
9422
+ addMap(mapClass: any, callback?: () => void): Promise<void>;
9423
+ setMap(mapClassOrId: any, callback: any): Promise<any>;
9424
+ removeMap(mapClassOrId: any): void;
9425
+ removeAllMaps(): void;
9426
+ loadMaps(maps: any, startingMap: any, onFirstMapLoaded?: () => void, onDataLoaded?: () => void, onError?: () => void): void;
9427
+ /**
9428
+ * Expand maps to display within view, typically used for multi-floor navigation. When passed a connection, maps included will not be displayed, instead, their 2d projection
9429
+ will be available in the resulting promise, which can be used to display a 2D component in the client-side app.
9430
+ *
9431
+ * @method expandMaps
9432
+ * @param mapIds {Array} Array of mapIds or mapObjects to display while expanded. For connections, pass &#123; connection: true, maps: [], connectionNodes: [], &#125;
9433
+ * @param options {Object} Options object @optional
9434
+ @param [options.focus=false] {Boolean} Focus the camera onto expanded maps
9435
+ @param [options.debug=false] {Boolean} Display cubes around focus bounding box for debug info
9436
+ @param [options.rotation=0] {Number} Rotation of scene relative to zero (degrees)
9437
+ @param [options.duration=300] {Number} Duration of focus animation in ms
9438
+ @returns {Promise} Promise that resolves to 2d screen projections of each layer/map (see example)
9439
+ @example
9440
+ // expand maps with 3 connection maps in between
9441
+ expandMaps(
9442
+ '55e89771d982bc06ca000000',
9443
+ {
9444
+ connection: true,
9445
+ // connection nodes are an exit node from the '55e89771' man and entry node for the '55e9c73f' map
9446
+ connectionNodes: [{
9447
+ map: "55e89771",
9448
+ x: 6232,
9449
+ y: 4575
9450
+ }, {
9451
+ map: "55e9c73",
9452
+ x: 5945.000000000001,
9453
+ y: 4059.000000000001
9454
+ }],
9455
+ maps: [
9456
+ '55e9acbf',
9457
+ '55e8a9ed',
9458
+ '55e85e23'
9459
+ ]
9460
+ },
9461
+ '55e9c73f'
9462
+ );
9463
+
9464
+ // resulting promise (sorted by elevation (top to bottom))
9465
+
9466
+ [
9467
+ {
9468
+ min: { x: -100, y: -50 },
9469
+ max: { x: -100, y: -50 }
9470
+ },
9471
+ {
9472
+ min: { x: -100, y: -50 },
9473
+ max: { x: -100, y: -50 }
9474
+ },
9475
+ {
9476
+ min: { x: -100, y: -50 },
9477
+ max: { x: -100, y: -50 }
9478
+ }
9479
+ ]
9480
+ */
9481
+ expandMaps(mapsToExpand: any, options: any): Promise<any>;
9350
9482
  /**
9351
- * Set the color and opacity that will be drawn behind the scene.
9352
- *
9353
- * @method setBackgroundColor
9354
- * @param color {Color}
9355
- * @param alpha {number}
9356
- */
9357
- setBackgroundColor(color: Color, alpha?: number): void;
9483
+ * Contract maps and display the current map
9484
+ *
9485
+ * @method contractMaps
9486
+ * @param options {Object} Options object @optional
9487
+ @param [options.focus] {Boolean} Focus the camera onto current map
9488
+ @param [options.debug] {Boolean} Display cubes around focus bounding box for debug info
9489
+ @param [options.duration=300] {Number} Duration of focus animation in ms
9490
+ */
9491
+ contractMaps(options?: any): Promise<any>;
9492
+ expandPanBounds(bounds: any): void;
9358
9493
  /**
9359
- * Assign an outdoor context to this renderer, which will be included as
9360
- * part of the `STATIC` rendering pass.
9361
- *
9362
- * @method setMapboxOutdoorContext
9363
- * @param {MapboxOutdoorContext} mapboxOutdoorContext context to draw
9494
+ * This can be used to invoke a callback function for _every_ set map invocation.
9495
+ * @param {Function} cb callback function
9364
9496
  */
9365
- setMapboxOutdoorContext(mapboxOutdoorContext: MapboxOutdoorContext): void;
9366
- domElement(): HTMLCanvasElement;
9367
- isAvailable(): boolean;
9368
- disposeOfRenderLists(): void;
9369
- reportWebGlContextCreationError(e: any): void;
9370
- reportWebGlContextLost(e: any): void;
9371
- reportWebGLContextRestored(): void;
9497
+ addPersistentSetMapCallback(cb: Function): void;
9498
+ persistentSetMapCallbacks: any;
9499
+ setMapCallbacks: any[] | undefined;
9500
+ get mapObjectsSortedByElevation(): any[];
9501
+ _mapObjectsSortedByElevation: any[] | undefined;
9502
+ get visibleMaps(): any[];
9503
+ getCompoundBoundingBoxPoints(objects: any): Vector3[];
9504
+ multiFloorView: MultiFloorView | undefined;
9505
+ renderedMaps: any[] | undefined;
9506
+ projections: any[] | undefined;
9507
+ mapsFullyLoaded(callback?: () => void): Promise<void>;
9372
9508
  /**
9373
- * Sometimes we have to use WebGL 1 because of a regression in Chrome
9374
- * due to some unknown performance bug in Apple's OpenGL Angle backend on MacBook+Radeon GPU.
9375
- * The official recommendation is to turn on Metal backed ANGLE in your Chrome's about:flags.
9376
- * We can't force our users to do it, so we have to support both WebGL 1 & WebGL 2
9377
- * See: https://bugs.chromium.org/p/chromium/issues/detail?id=1245448
9378
- * The Method returns target WebGL version based on the hardware configuration.
9379
- *
9380
- * @param context WebGL context
9381
- * @returns {1|2} WebGL version
9509
+ * Scroll maps up
9510
+ * This will shift maps down to show next one (above)
9382
9511
  */
9383
- getTargetWebGLVersion(context: any): 1 | 2;
9512
+ scrollMapsUp(): Promise<any>;
9384
9513
  /**
9385
- *
9386
- * @param options
9387
- * @returns {SingleBufferRenderer|MultiBufferRenderer}
9514
+ * Scroll maps down
9515
+ * This will shift maps up to show next one (below)
9388
9516
  */
9389
- getRenderer(options: any): SingleBufferRenderer | MultiBufferRenderer;
9517
+ scrollMapsDown(): Promise<any>;
9518
+ tiltMaps(tilt: any): void;
9519
+ resize(): void;
9390
9520
  }
9521
+ import { PubSub } from '@mappedin/mappedin-js/renderer/internal/pub-sub';
9522
+ import { Object3D } from 'three';
9523
+ import { Vector3 } from 'three';
9524
+ import MultiFloorView from '@mappedin/mappedin-js/renderer/internal/Mappedin.MultiFloorView';
9525
+ }
9526
+
9527
+ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.DebugUI' {
9391
9528
  /**
9392
- * A legacy renderer that renders all the elements in the scene to a single
9393
- * buffer. Does not support things like transparent paths behind polygons
9394
- * natively, but can potentially fake it.
9395
- *
9396
- * 2019/07/10 Terence Dickson
9397
- * Generally has worse performance under average loads compared to the
9398
- * multi-buffer renderer, as the multi-buffer renderer can avoid re-rendering
9399
- * the entire map if only animated elements on the map have changed.
9529
+ * A DOM element that can be populated with performance information.
9400
9530
  *
9401
- * @class SingleBufferRenderer
9531
+ * @class DebugUI
9402
9532
  * @private
9403
9533
  */
9404
- class SingleBufferRenderer {
9405
- constructor(renderOptions: any, targetWebGLVersion?: number);
9406
- options: any;
9407
- core: any;
9408
- renderer: WebGLRenderer | undefined;
9409
- effectComposer: EffectComposer | undefined;
9410
- backgroundColor: Color;
9411
- backgroundAlpha: number;
9412
- mapboxOutdoorContext: any;
9534
+ export default class DebugUI {
9535
+ _element: HTMLDivElement;
9536
+ _titleElement: HTMLSelectElement;
9537
+ _minimizeElement: HTMLButtonElement;
9538
+ _performancePanelElement: HTMLDivElement;
9539
+ _performanceEntries: Map<any, any>;
9540
+ _sortedPerformanceEntryNames: any[];
9541
+ _overviewGraph: LineGraph;
9542
+ _controlPanels: Map<any, any>;
9543
+ _sortedControlPanelNames: any[];
9544
+ _minimized: boolean;
9545
+ destroy(): void;
9413
9546
  /**
9414
- * Dispose of the renderer.
9547
+ * Return the DOM element used by this `DebugUI`, which may be
9548
+ * added as a child of any other DOM element to display it.
9549
+ *
9550
+ * @method element
9551
+ * @return {Element} the ui's root element
9415
9552
  */
9416
- destroy(): void;
9553
+ get element(): Element;
9417
9554
  /**
9418
- * Re-render the scene. This ignores the `renderTask` argument, as all
9419
- * re-renders in the single-buffer renderer are full re-renders.
9555
+ * Log the given entries to this performance logger, and update the display
9556
+ * accordingly. If a given key isn't already being logged, an entry will be
9557
+ * added for it. If a key is being logged but isn't reported, it will be
9558
+ * treated as if it had a value of `0` reported.
9420
9559
  *
9421
- * @method render
9422
- * @param renderTask {RENDER}
9423
- * @param renderTarget {null or WebGLRenderTarget}
9424
- * @param scene {Scene}
9425
- * @param sceneCamera {Camera}
9560
+ * @method reportFramePerformance
9561
+ * @param {string -> number} entries the most recent recorded values for each
9562
+ * named frame update
9426
9563
  */
9427
- render(renderTask: RENDER, renderTarget: null, scene: Scene, sceneCamera: Camera): void;
9564
+ reportFramePerformance(entries: any): void;
9428
9565
  /**
9429
- * Set the size of the renderer.
9566
+ * Add the given controls to the given panels. More efficient than adding
9567
+ * controls one-by-one since it only recomputes positions after all controls
9568
+ * are added.
9430
9569
  *
9431
- * @method setBufferSize
9432
- * @param width {number}
9433
- * @param height {number}
9570
+ * @method addDebugControls
9571
+ * @param {category: string: [{name: string, description: string, control: DebugUIControl}]} categories
9572
+ * a mapping from category to a list of control names and controls
9434
9573
  */
9435
- setBufferSize(width: number, height: number): void;
9436
- width: number | undefined;
9437
- height: number | undefined;
9574
+ addDebugControls(categories: any): void;
9438
9575
  /**
9439
- * Set the color and opacity that will be drawn behind the scene.
9576
+ * Add the given control to a panel.
9440
9577
  *
9441
- * @method setBackgroundColor
9442
- * @param color {Color}
9443
- * @param alpha {number}
9578
+ * @method addDebugControl
9579
+ * @param {string} category the name of the panel the control will be put under
9580
+ * @param {string} name the name of the control
9581
+ * @param {string} description a description for the control (tooltip)
9582
+ * @param {DebugUIControl} control the control to add to the panel
9444
9583
  */
9445
- setBackgroundColor(color: Color, alpha: number): void;
9584
+ addDebugControl(category: string, name: string, description: string, control: DebugUIControl): void;
9446
9585
  /**
9447
- * Assign an outdoor context to this renderer.
9586
+ * Remove the given controls from the UI.
9448
9587
  *
9449
- * @method setMapboxOutdoorContext
9450
- * @param {MapboxOutdoorContext} mapboxOutdoorContext context to draw
9588
+ * @method removeDebugControls
9589
+ * @param {category: string: [name: string]} categories
9590
+ * a mapping from category to a list of control names to remove
9451
9591
  */
9452
- setMapboxOutdoorContext(mapboxOutdoorContext: MapboxOutdoorContext): void;
9592
+ removeDebugControls(categories: any): void;
9593
+ /**
9594
+ * Remove the given control from a panel.
9595
+ *
9596
+ * @method removeDebugControl
9597
+ * @param {string} category the name of the panel the control will be put under
9598
+ * @param {string} name the name of the control
9599
+ */
9600
+ removeDebugControl(category: string, name: string): void;
9601
+ _addDebugControl(category: any, name: any, description: any, control: any): void;
9602
+ _removeDebugControl(category: any, name: any): void;
9603
+ _onMinimizeClicked(): void;
9604
+ _onCategoryChanged(): void;
9453
9605
  }
9454
9606
  /**
9455
- * Our new renderer that renders static elements to one buffer and animated
9456
- * elements to another buffer, allowing only the latter buffer to be
9457
- * re-rendered if the camera isn't moving. There is also a third buffer that
9458
- * can be used to render elements that must appear always on top.
9459
- *
9460
- * Does not yet support antialiasing.
9461
- *
9462
- * 2019/07/10 Terence Dickson
9463
- * Generally has better performance under average loads compared to the
9464
- * single-buffer renderer, but does not work on IE 11.
9607
+ * A graph on a HTML canvas element that will display the values in the given
9608
+ * time series.
9465
9609
  *
9466
- * @class MultiBufferRenderer
9610
+ * @class LineGraph
9467
9611
  * @private
9468
- */
9469
- export class MultiBufferRenderer {
9470
- constructor(renderOptions: any, targetWebGLVersion?: number);
9471
- effectComposer: null;
9472
- outdoorsVisible: boolean;
9473
- options: any;
9474
- renderer: WebGLRenderer | undefined;
9475
- core: any;
9476
- journeyOpacity: number | undefined;
9477
- backgroundColor: Color | undefined;
9478
- backgroundAlpha: number | undefined;
9479
- mapboxOutdoorContext: any;
9480
- staticSceneRenderTarget: WebGLRenderTarget<Texture> | undefined;
9481
- animatedSceneRenderTarget: WebGLRenderTarget<Texture> | undefined;
9482
- animatedSceneBackgroundRenderTarget: WebGLRenderTarget<Texture> | undefined;
9483
- alwaysOnTopSceneRenderTarget: WebGLRenderTarget<Texture> | undefined;
9484
- outdoorViewRenderTarget: WebGLRenderTarget<Texture> | undefined;
9485
- populateRenderTarget(renderTarget: any): void;
9486
- createOutdoorViewTexture(): void;
9487
- outdoorViewTexture: Texture | undefined;
9488
- outdoorViewTextureProps: any;
9489
- setupEffectComposer(): void;
9490
- setOutdoorViewTexture(texture: any): void;
9612
+ */
9613
+ class LineGraph {
9491
9614
  /**
9492
- * Dispose of the renderer and its buffers.
9615
+ * Return a new `LineGraph` displaying information from the given list of
9616
+ * time series.
9617
+ *
9618
+ * @constructor
9619
+ * @param {[TimeSeries]} seriesList the list of time series that will be
9620
+ * displayed on this graph.
9621
+ * @param {number} width the width of this canvas element, in pixels
9622
+ * @param {number} height the width of this canvas element, in pixels
9493
9623
  */
9624
+ constructor({ seriesList, width, height }: [TimeSeries]);
9625
+ _gradients: Map<any, any>;
9626
+ _canvas: HTMLCanvasElement;
9627
+ _context: CanvasRenderingContext2D | null;
9494
9628
  destroy(): void;
9495
- renderToAnimatedBackgroundBuffer(scene: any, sceneCamera: any): void;
9496
9629
  /**
9497
- * Render the provided scene using the given camera, re-rendering only
9498
- * the animated parts.
9499
- *
9500
- * @method renderAnimated
9501
- * @param renderTarget {null or WebGLRenderTarget}
9502
- * @param scene {Scene}
9503
- * @param sceneCamera {Camera}
9630
+ * @method element
9631
+ * @return {Element} DOM element that can be added to display this graph
9504
9632
  */
9505
- renderAnimated(renderTarget: null, scene: Scene, sceneCamera: Camera): void;
9633
+ get element(): Element;
9506
9634
  /**
9507
- * Render the provided scene using the given camera, re-rendering only
9508
- * the parts that should appear on top of all other elements.
9635
+ * Clear this canvas and re-draw the time series lines.
9509
9636
  *
9510
- * @method renderAlwaysOnTop
9511
- * @param renderTarget {null or WebGLRenderTarget}
9512
- * @param scene {Scene}
9513
- * @param sceneCamera {Camera}
9637
+ * @method redraw
9514
9638
  */
9515
- renderAlwaysOnTop(renderTarget: null, scene: Scene, sceneCamera: Camera): void;
9639
+ redraw(): void;
9516
9640
  /**
9517
- * Render all of the scene layers, then combine them.
9641
+ * Set the list of time series that this graph displays.
9518
9642
  *
9519
- * @method renderAll
9520
- * @param renderTarget {null or WebGLRenderTarget}
9521
- * @param scene {Scene}
9522
- * @param sceneCamera {Camera}
9643
+ * @method setSeriesList
9644
+ * @param {[TimeSeries]} series series to display
9523
9645
  */
9524
- renderAll(renderTarget: null, scene: Scene, sceneCamera: Camera): void;
9646
+ setSeriesList(series: [TimeSeries]): void;
9647
+ _seriesList: [TimeSeries] | undefined;
9648
+ }
9649
+ /**
9650
+ * A time series that averages values that are reported to it and inserts them
9651
+ * into a ring buffer.
9652
+ *
9653
+ * @class TimeSeries
9654
+ * @private
9655
+ */
9656
+ class TimeSeries {
9657
+ constructor({ windowSize, totalAccumulationCount, hue, }: {
9658
+ windowSize?: number | undefined;
9659
+ totalAccumulationCount?: number | undefined;
9660
+ hue?: number | undefined;
9661
+ });
9662
+ windowSize: number;
9663
+ hue: number;
9664
+ _totalAccumulationCount: number;
9665
+ _ringBuffer: any[];
9666
+ _ringBufferLength: number;
9667
+ _ringBufferPointer: number;
9668
+ _accumulatorValue: number;
9669
+ _accumulatorCount: number;
9670
+ _changed: boolean;
9671
+ destroy(): void;
9525
9672
  /**
9526
- * Re-render the scene, depending on which parts of the scene have been
9527
- * invalidated.
9673
+ * Incorporate the given value into the time series. This will accumulate up
9674
+ * to `LINE_GRAPH_ACCUMULATION_COUNT` values, at which point they will be
9675
+ * averaged and inserted into the time series. If the number of averaged entries
9676
+ * exceeds `LINE_GRAPH_WINDOW_SIZE`, the ring buffer will drop the oldest
9677
+ * entry.
9528
9678
  *
9529
- * @method render
9530
- * @param renderTarget {null or WebGLRenderTarget}
9531
- * @param scene {Scene}
9532
- * @param sceneCamera {Camera}
9679
+ * This will set the `changed()` flag if an accumulated value has been added
9680
+ * to the ring buffer.
9681
+ *
9682
+ * @method report
9683
+ * @param {number} value the value to add to the time series
9533
9684
  */
9534
- render(renderTask: any, renderTarget: null, scene: Scene, sceneCamera: Camera): void;
9685
+ report(value: number): void;
9535
9686
  /**
9536
- * Set the size of the renderer, composer, and all its internal buffers.
9687
+ * Return the entry at the given index in the ring buffer. The value
9688
+ * at `length - 1` is the most recently accumulated value.
9537
9689
  *
9538
- * @method setBufferSize
9539
- * @param width {number}
9540
- * @param height {number}
9690
+ * @method at
9691
+ * @param {number} i the index to retrieve
9692
+ * @return {number} the accumulated value at the given index
9541
9693
  */
9542
- setBufferSize(width: number, height: number): void;
9543
- width: number | undefined;
9544
- height: number | undefined;
9694
+ at(i: number): number;
9545
9695
  /**
9546
- * Set the color and opacity that will be drawn behind the scene.
9696
+ * @method maximumValue
9697
+ * @return {number} the maximum value in this time series
9698
+ */
9699
+ maximumValue(): number;
9700
+ /**
9701
+ * Return true if this time series has changed since the previous `report()`
9702
+ * invocation.
9547
9703
  *
9548
- * @method setBackgroundColor
9549
- * @param color {Color}
9550
- * @param alpha {number}
9704
+ * @method changed
9705
+ * @return {boolean}
9551
9706
  */
9552
- setBackgroundColor(color: Color, alpha: number): void;
9707
+ changed(): boolean;
9553
9708
  /**
9554
- * Assign an outdoor context to this renderer.
9709
+ * Return the number of accumulated values in this time series. Will never
9710
+ * exceed `LINE_GRAPH_WINDOW_SIZE`.
9555
9711
  *
9556
- * @method setMapboxOutdoorContext
9557
- * @param {MapboxOutdoorContext} mapboxOutdoorContext context to draw
9712
+ * @return {number} number of accumulated entries
9558
9713
  */
9559
- setMapboxOutdoorContext(mapboxOutdoorContext: MapboxOutdoorContext): void;
9560
- setOutdoorViewController(outdoorViewController: any): void;
9561
- outdoorViewController: any;
9562
- toggleOutdoorViewVisiblity(visible: any): void;
9714
+ get length(): number;
9563
9715
  }
9564
- import { RENDER } from '@mappedin/mappedin-js/renderer/internal';
9565
- import { Scene } from 'three';
9566
- import { Camera } from 'three';
9567
- import { Vector2 } from 'three';
9568
- import { Texture } from 'three';
9569
- import { Color } from 'three';
9570
- import { WebGLRenderer } from 'three';
9571
- import { EffectComposer } from '@mappedin/mappedin-js/renderer/internal/Mappedin.EffectComposer';
9572
- import { WebGLRenderTarget } from 'three';
9573
9716
  export {};
9574
9717
  }
9575
9718
 
9576
- declare module '@mappedin/mappedin-js/renderer/private/controllers/JourneyController' {
9577
- import type Directive from '@mappedin/mappedin-js/navigator/Directive';
9578
- import type INode from '@mappedin/mappedin-js/navigator/interfaces/INode';
9579
- import { Path } from '@mappedin/mappedin-js/renderer/internal';
9580
- import type { TJourneyOptions } from '@mappedin/mappedin-js/renderer/internal';
9581
- import { MappedinDirections } from '@mappedin/mappedin-js/get-venue';
9582
- import Core from '@mappedin/mappedin-js/renderer/private/Core';
9583
- export type TMappedinDirections = {
9584
- distance: number;
9585
- path: INode[];
9586
- instructions: Directive[];
9587
- };
9588
- /**
9589
- *
9590
- * The Journey class represents a journey from point A to point B. This includes any intermediate connections, such as stairs or elevators.
9591
- * The idea is to provide a higher level API with enough hooks to customize the experience. Also, to ensure only 1 journey is allowed at once.
9592
- * This version does not support "stacked view" - but that can be added in the future
9593
- *
9594
- * @internal
9595
- */
9596
- export class JourneyController {
9597
- #private;
9598
- distance: number;
9599
- accessible: boolean;
9600
- activeDirections: MappedinDirections;
9601
- get isMultiFloor(): boolean;
9602
- get mapsInJourney(): (import("../../internal").MappedinMap | undefined)[];
9603
- get mapsIdsInJourney(): (string | undefined)[];
9604
- get buildingsInJourney(): {};
9605
- get mapIdsInvolvedInJourney(): string[];
9606
- constructor(directions: MappedinDirections | MappedinDirections[], options: TJourneyOptions | undefined, core: Core);
9607
- setStep: (step: any) => void;
9608
- setStepByPath: (path: Path) => void;
9609
- overviewPathMode: 'never' | 'always' | 'current-elevation-and-mapgroup';
9610
- setOverviewPathMode(mode: 'never' | 'always' | 'current-elevation-and-mapgroup'): void;
9611
- static instance: JourneyController | null;
9612
- static create(directions: MappedinDirections | MappedinDirections[], options: any, core: Core): JourneyController;
9719
+ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.DebugUIControl' {
9720
+ export class DebugUIScalarSlider {
9721
+ constructor({ minimum, maximum, step, current, onValueChanged }: {
9722
+ minimum: any;
9723
+ maximum: any;
9724
+ step: any;
9725
+ current: any;
9726
+ onValueChanged: any;
9727
+ });
9728
+ _minimum: any;
9729
+ _maximum: any;
9730
+ _step: any;
9731
+ _onValueChanged: any;
9732
+ _element: HTMLInputElement;
9733
+ destroy(): void;
9734
+ addValueChangedListener(listener: any): void;
9735
+ setValue(value: any): void;
9736
+ get element(): HTMLInputElement;
9737
+ get value(): string;
9738
+ get displayedValue(): string;
9739
+ get height(): number;
9740
+ }
9741
+ export class DebugUICheckbox {
9742
+ constructor({ current, onValueChanged }: {
9743
+ current: any;
9744
+ onValueChanged: any;
9745
+ });
9746
+ _onValueChanged: any;
9747
+ _element: HTMLDivElement;
9748
+ _titleElement: HTMLInputElement;
9749
+ destroy(): void;
9750
+ addValueChangedListener(listener: any): void;
9751
+ get element(): HTMLDivElement;
9752
+ get titleElement(): HTMLInputElement;
9753
+ get value(): boolean;
9754
+ get displayedValue(): "true" | "false";
9755
+ get height(): number;
9756
+ get titleElementWidth(): number;
9757
+ }
9758
+ export class DebugUIDropdown {
9759
+ constructor({ values, current, onValueChanged }: {
9760
+ values: any;
9761
+ current: any;
9762
+ onValueChanged: any;
9763
+ });
9764
+ _values: any;
9765
+ _onValueChanged: any;
9766
+ _element: HTMLSelectElement;
9767
+ destroy(): void;
9768
+ addValueChangedListener(listener: any): void;
9769
+ get element(): HTMLSelectElement;
9770
+ get value(): string;
9771
+ get displayedValue(): string;
9772
+ get height(): number;
9773
+ }
9774
+ export class DebugUIButton {
9775
+ constructor({ label, onClick }: {
9776
+ label: any;
9777
+ onClick: any;
9778
+ });
9779
+ _onClick: any;
9780
+ _element: HTMLButtonElement;
9781
+ destroy(): void;
9782
+ addValueChangedListener(): void;
9783
+ addClickListener(listener: any): void;
9784
+ get element(): HTMLButtonElement;
9785
+ get value(): string;
9786
+ get displayedValue(): string;
9787
+ get height(): number;
9788
+ }
9789
+ export class DebugUIColorPicker {
9790
+ constructor({ current, onValueChanged }: {
9791
+ current: any;
9792
+ onValueChanged: any;
9793
+ });
9794
+ _onValueChanged: any;
9795
+ _element: HTMLDivElement;
9796
+ _titleElement: HTMLDivElement;
9797
+ _color: any;
9798
+ _listeners: any[];
9799
+ _colorPickerMain: HTMLCanvasElement;
9800
+ _colorPickerBottomSlider: HTMLCanvasElement;
9801
+ _requestAnimationFrameHandle: number | null;
9802
+ _requestAnimationFrameUpdate(): void;
9803
+ _pickingMain: boolean;
9804
+ _pickingX: number;
9805
+ _pickingY: number;
9806
+ _moveListener: (e: any) => void;
9807
+ _upListener: any;
9808
+ _pickingBottomSlider: boolean;
9809
+ _bottomMoveListener: (e: any) => void;
9810
+ _bottomUpListener: any;
9811
+ _mode: string;
9812
+ _modeButtons: {};
9813
+ destroy(): void;
9814
+ _destroyed: boolean | undefined;
9815
+ addValueChangedListener(listener: any): void;
9816
+ setValue(color: any): void;
9817
+ _requestAnimationFrame(): void;
9818
+ _notify(): void;
9819
+ _updateMain(x: any, y: any): void;
9820
+ _updateBottomSlider(x: any): void;
9821
+ redraw(): void;
9822
+ get element(): HTMLDivElement;
9823
+ get titleElement(): HTMLDivElement;
9824
+ get value(): any;
9825
+ get displayedValue(): string;
9826
+ get height(): number;
9827
+ get titleElementWidth(): number;
9828
+ }
9829
+ export class DebugUIPanel {
9830
+ constructor({ name }: {
9831
+ name: any;
9832
+ });
9833
+ _name: any;
9834
+ _element: HTMLDivElement;
9835
+ _entries: any[];
9836
+ _height: number;
9613
9837
  destroy(): void;
9838
+ get element(): HTMLDivElement;
9839
+ get height(): number;
9840
+ addControl(name: any, description: any, control: any): void;
9841
+ removeControl(name: any): void;
9842
+ _updateLayout(): void;
9614
9843
  }
9615
9844
  }
9616
9845
 
9617
- declare module '@mappedin/mappedin-js/renderer/private/controllers/ExportController' {
9618
- import type { ICore } from '@mappedin/mappedin-js/renderer/internal';
9619
- /**
9620
- * @hidden
9621
- */
9622
- export type TGLTFExportOptions = {
9623
- onlyVisible?: boolean;
9624
- binary?: boolean;
9625
- scale?: number;
9626
- };
9627
- /**
9628
- * API for exporting the scene.
9629
- *
9630
- * @hidden
9631
- */
9632
- export default class ExportController {
9633
- #private;
9634
- core: ICore;
9635
- glTFExporter?: any;
9636
- constructor(core: ICore);
9846
+ declare module '@mappedin/mappedin-js/renderer/private/Core.interface' {
9847
+ import { Color, Vector2, Vector3, Mesh } from 'three';
9848
+ import type { TPadding, TGetPolygonsAtCoordinateOptions, TMapViewOptions, TileManager, BillboardManager, StackedMapsController, SmartCollisionEngine, OutdoorViewController, LayerController } from '@mappedin/mappedin-js/renderer/internal';
9849
+ import { BlueDotController, CameraController, STATE, MappedinMap, Mappedin, MappedinCoordinate, MappedinPolygon, MappedinNode, changeListenerFn, RENDER, INTERNAL_EVENT_PAYLOAD, INTERNAL_EVENT, TaskScheduler, SceneManager, PubSub, FlatLabel, MapObject, PathsController, FloatingLabelsController, FlatLabelsController, PolygonColorsController, MarkersController, PolygonInteractionController, TooltipsController, PolygonStatesController, PolygonImagesController, ThreeDMarkersController, ExportController, EventSystem } from '@mappedin/mappedin-js/renderer/internal';
9850
+ import Tween, { Easing } from '@tweenjs/tween.js';
9851
+ import WatermarkController from '@mappedin/mappedin-js/renderer/private/controllers/WatermarkController';
9852
+ import PolygonHoverColorsController from '@mappedin/mappedin-js/renderer/private/controllers/PolygonHoverColorsController';
9853
+ import { E_MAP_CHANGED_REASON } from '@mappedin/mappedin-js/renderer/MapView.enums';
9854
+ export type TFocusOptionsLegacy = {
9637
9855
  /**
9638
- * Exports the current scene as a GLTF file.
9856
+ * An array of Nodes to focus in on
9639
9857
  */
9640
- getCurrentSceneGLTF: (userOptions: TGLTFExportOptions) => Promise<Blob>;
9641
- }
9642
- }
9643
-
9644
- declare module '@mappedin/mappedin-js/renderer/private/controllers/LayerController' {
9645
- import type { ICore } from '@mappedin/mappedin-js/renderer/private/Core.interface';
9646
- import { MappedinMap } from '@mappedin/mappedin-js/get-venue';
9647
- import { Feature, FeatureCollection, GeoJsonProperties, Polygon } from 'geojson';
9648
- class LayerController {
9649
- #private;
9650
- constructor(core: ICore);
9858
+ nodes?: (MappedinNode | MappedinNode['id'])[];
9651
9859
  /**
9652
- * Show a set of layers on the current map, and hide all other layers. This also hides any colliders associated with the hidden layers.
9860
+ * An array of Polygons to focus on. It's the center of the bounds of all Polygons, designed to fit everything into view.
9653
9861
  */
9654
- showLayers(layers: string[]): void;
9655
- getAllLayersForMap(map: MappedinMap): Promise<{
9656
- [layerName: string]: boolean;
9657
- }>;
9862
+ polygons?: (MappedinPolygon | MappedinPolygon['id'])[];
9658
9863
  /**
9659
- * Return a list of all visible layers for a map, this will NOT trigger a map load, and is mainly used internally
9660
- * which is why its synchronous
9864
+ * The duration (in ms) the focus animation should last for.
9865
+ * @defaultValue `100`
9661
9866
  */
9662
- getVisibleLayersForLoadedMap(map: MappedinMap): string[] | undefined;
9663
- addGeoJSONLayer(layerName: string, featureOrFeatureCollection: Feature<Polygon, GeoJsonProperties | null> | FeatureCollection<Polygon, GeoJsonProperties | null>): Promise<void>;
9664
- removeGeoJSONLayer(layerName: string): Promise<void>;
9665
- }
9666
- export default LayerController;
9667
- }
9668
-
9669
- declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.ui' {
9670
- import { IBlueDotCore, BlueDotManager } from '@mappedin/mappedin-js/renderer/internal';
9671
- import { IPubSub } from '@mappedin/mappedin-js/renderer/internal/pub-sub';
9672
- import type { ICore } from '@mappedin/mappedin-js/renderer/internal';
9673
- enum ZOOM_CONDITION {
9674
- EXPIRED = 0,
9675
- IN_PROGRESS = 1,
9676
- COMPLETED = 2
9677
- }
9678
- export interface IBlueDotUI extends IPubSub {
9679
- blueDotTooltips: any[];
9680
- setBlueDotPosition: () => void;
9681
- showBlueDotBearing: () => void;
9682
- addGhostMarkers: () => void;
9683
- addLocationUncertainMarkersAndTooltips: () => void;
9684
- addBlueDotMarker: () => void;
9685
- removeTooltips: () => void;
9686
- removeBlueDot: () => void;
9687
- centerBlueDot: () => void;
9688
- endFollowing: () => void;
9689
- zoomCondition: ZOOM_CONDITION;
9690
- isFollowing: boolean;
9691
- useRotationMode: boolean;
9692
- }
9693
- type TBlueDotUIProps = {
9694
- core: ICore;
9695
- blueDotManager: BlueDotManager;
9696
- controller: IBlueDotCore;
9697
- data: any;
9698
- };
9699
- const BlueDotUI: ({ core, blueDotManager, controller }: TBlueDotUIProps) => IBlueDotUI;
9700
- export default BlueDotUI;
9701
- }
9702
-
9703
- declare module '@mappedin/mappedin-js/renderer/internal/utils' {
9704
- export * from '@mappedin/mappedin-js/renderer/internal/utils/utils';
9705
- export { shouldDisableOffscreenCanvas } from '@mappedin/mappedin-js/renderer/internal/utils/browser';
9706
- export { throttle, debounce } from '@mappedin/mappedin-js/renderer/internal/utils/async';
9707
- }
9708
-
9709
- declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.MapManager' {
9710
- export default MapManager;
9711
- class MapManager extends PubSub {
9712
- constructor(polygonMeshesById: any, renderer: any, core: any, taskScheduler: any, loadOptions?: {});
9713
- mapObjects: Map<any, any>;
9714
- currentMap: undefined;
9715
- object: Object3D<import("three").Object3DEventMap>;
9716
- _showCount: number;
9717
- _mapObjectsSortedByElevationDirty: boolean;
9718
- expanded: boolean;
9719
- polygonMeshesById: any;
9720
- core: any;
9721
- renderer: any;
9722
- loadOptions: {};
9723
- addMap(mapClass: any, callback?: () => void): Promise<void>;
9724
- setMap(mapClassOrId: any, callback: any): Promise<any>;
9725
- removeMap(mapClassOrId: any): void;
9726
- removeAllMaps(): void;
9727
- loadMaps(maps: any, startingMap: any, onFirstMapLoaded?: () => void, onDataLoaded?: () => void, onError?: () => void): void;
9867
+ duration?: number;
9728
9868
  /**
9729
- * Expand maps to display within view, typically used for multi-floor navigation. When passed a connection, maps included will not be displayed, instead, their 2d projection
9730
- will be available in the resulting promise, which can be used to display a 2D component in the client-side app.
9731
- *
9732
- * @method expandMaps
9733
- * @param mapIds {Array} Array of mapIds or mapObjects to display while expanded. For connections, pass &#123; connection: true, maps: [], connectionNodes: [], &#125;
9734
- * @param options {Object} Options object @optional
9735
- @param [options.focus=false] {Boolean} Focus the camera onto expanded maps
9736
- @param [options.debug=false] {Boolean} Display cubes around focus bounding box for debug info
9737
- @param [options.rotation=0] {Number} Rotation of scene relative to zero (degrees)
9738
- @param [options.duration=300] {Number} Duration of focus animation in ms
9739
- @returns {Promise} Promise that resolves to 2d screen projections of each layer/map (see example)
9740
- @example
9741
- // expand maps with 3 connection maps in between
9742
- expandMaps(
9743
- '55e89771d982bc06ca000000',
9744
- {
9745
- connection: true,
9746
- // connection nodes are an exit node from the '55e89771' man and entry node for the '55e9c73f' map
9747
- connectionNodes: [{
9748
- map: "55e89771",
9749
- x: 6232,
9750
- y: 4575
9751
- }, {
9752
- map: "55e9c73",
9753
- x: 5945.000000000001,
9754
- y: 4059.000000000001
9755
- }],
9756
- maps: [
9757
- '55e9acbf',
9758
- '55e8a9ed',
9759
- '55e85e23'
9760
- ]
9761
- },
9762
- '55e9c73f'
9763
- );
9764
-
9765
- // resulting promise (sorted by elevation (top to bottom))
9766
-
9767
- [
9768
- {
9769
- min: { x: -100, y: -50 },
9770
- max: { x: -100, y: -50 }
9771
- },
9772
- {
9773
- min: { x: -100, y: -50 },
9774
- max: { x: -100, y: -50 }
9775
- },
9776
- {
9777
- min: { x: -100, y: -50 },
9778
- max: { x: -100, y: -50 }
9779
- }
9780
- ]
9781
- */
9782
- expandMaps(mapsToExpand: any, options: any): Promise<any>;
9869
+ * Whether to zoom the camera in or out, or just pan it.
9870
+ * @defaultValue `true`
9871
+ */
9872
+ changeZoom?: boolean;
9783
9873
  /**
9784
- * Contract maps and display the current map
9785
- *
9786
- * @method contractMaps
9787
- * @param options {Object} Options object @optional
9788
- @param [options.focus] {Boolean} Focus the camera onto current map
9789
- @param [options.debug] {Boolean} Display cubes around focus bounding box for debug info
9790
- @param [options.duration=300] {Number} Duration of focus animation in ms
9791
- */
9792
- contractMaps(options?: any): Promise<any>;
9793
- expandPanBounds(bounds: any): void;
9874
+ * The animation curve to use for zooming in. Uses the animateCamera one by default.
9875
+ */
9876
+ curve?: typeof Easing;
9794
9877
  /**
9795
- * This can be used to invoke a callback function for _every_ set map invocation.
9796
- * @param {Function} cb callback function
9878
+ * Camera tilt between 0 (top-down) to 1 (from the side)
9797
9879
  */
9798
- addPersistentSetMapCallback(cb: Function): void;
9799
- persistentSetMapCallbacks: any;
9800
- setMapCallbacks: any[] | undefined;
9801
- get mapObjectsSortedByElevation(): any[];
9802
- _mapObjectsSortedByElevation: any[] | undefined;
9803
- get visibleMaps(): any[];
9804
- getCompoundBoundingBoxPoints(objects: any): Vector3[];
9805
- multiFloorView: MultiFloorView | undefined;
9806
- renderedMaps: any[] | undefined;
9807
- projections: any[] | undefined;
9808
- mapsFullyLoaded(callback?: () => void): Promise<void>;
9880
+ tilt?: number;
9881
+ /**
9882
+ * Rotation in degrees
9883
+ */
9884
+ rotation?: number;
9885
+ /**
9886
+ * You can overide the {{#crossLink "MapView/focusZoomFactor:property"}}{{/crossLink}} for a specific {{#crossLink "MapView/focusOn:method"}}{{/crossLink}} call, rather than globally, if you like.
9887
+ */
9888
+ focusZoomFactor?: number;
9809
9889
  /**
9810
- * Scroll maps up
9811
- * This will shift maps down to show next one (above)
9890
+ * Sets a floor for how close you can zoom in on the scene. If it's lower than mapView.controls.minZoom, it's ignored.
9891
+ * @defaultValue: 0
9812
9892
  */
9813
- scrollMapsUp(): Promise<any>;
9893
+ minZoom?: number;
9894
+ maxZoom?: number;
9814
9895
  /**
9815
- * Scroll maps down
9816
- * This will shift maps up to show next one (below)
9896
+ * Whether {@link Camera.minZoom} and {@link Camera.maxZoom} should be recalculated during the focusing animation.
9817
9897
  */
9818
- scrollMapsDown(): Promise<any>;
9819
- tiltMaps(tilt: any): void;
9820
- resize(): void;
9821
- }
9822
- import { PubSub } from '@mappedin/mappedin-js/renderer/internal/pub-sub';
9823
- import { Object3D } from 'three';
9824
- import { Vector3 } from 'three';
9825
- import MultiFloorView from '@mappedin/mappedin-js/renderer/internal/Mappedin.MultiFloorView';
9826
- }
9827
-
9828
- declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.DebugUI' {
9898
+ updateZoomLimits?: boolean;
9899
+ padding?: TPadding;
9900
+ points?: any[];
9901
+ boundingBox?: any;
9902
+ callback: () => void;
9903
+ cancelledCallback?: () => void;
9904
+ };
9829
9905
  /**
9830
- * A DOM element that can be populated with performance information.
9906
+ * Ben Liu, 2023/03/29
9831
9907
  *
9832
- * @class DebugUI
9833
- * @private
9908
+ * This causes the generation of the index.d.ts file to break entirely for some reason.
9909
+ *
9910
+ * TODO: Figure out why
9834
9911
  */
9835
- export default class DebugUI {
9836
- _element: HTMLDivElement;
9837
- _titleElement: HTMLSelectElement;
9838
- _minimizeElement: HTMLButtonElement;
9839
- _performancePanelElement: HTMLDivElement;
9840
- _performanceEntries: Map<any, any>;
9841
- _sortedPerformanceEntryNames: any[];
9842
- _overviewGraph: LineGraph;
9843
- _controlPanels: Map<any, any>;
9844
- _sortedControlPanelNames: any[];
9845
- _minimized: boolean;
9846
- destroy(): void;
9912
+ export interface ICore extends PubSub<INTERNAL_EVENT_PAYLOAD, INTERNAL_EVENT> {
9847
9913
  /**
9848
- * Return the DOM element used by this `DebugUI`, which may be
9849
- * added as a child of any other DOM element to display it.
9850
- *
9851
- * @method element
9852
- * @return {Element} the ui's root element
9914
+ * Controllers
9853
9915
  */
9854
- get element(): Element;
9916
+ eventSystem: EventSystem;
9917
+ floatingLabels: FloatingLabelsController;
9918
+ flatLabels: FlatLabelsController;
9919
+ paths: PathsController;
9920
+ polygonColors: PolygonColorsController;
9921
+ polygonHoverColors: PolygonHoverColorsController;
9922
+ polygonInteraction: PolygonInteractionController;
9923
+ polygonStates: PolygonStatesController;
9924
+ polygonImages: PolygonImagesController;
9925
+ markers: MarkersController;
9926
+ tooltips: TooltipsController;
9927
+ threeDMarkers: ThreeDMarkersController;
9928
+ blueDot: BlueDotController;
9929
+ camera: CameraController;
9930
+ tileManager: TileManager;
9931
+ billboardManager: BillboardManager;
9932
+ stackedMaps: StackedMapsController;
9933
+ outdoorViewController?: OutdoorViewController;
9934
+ exportController: ExportController;
9935
+ watermark: WatermarkController;
9936
+ layerController: LayerController;
9937
+ state: STATE;
9938
+ options: TMapViewOptions & {
9939
+ onDataLoaded?: (data: Mappedin) => void;
9940
+ onFirstMapLoaded?: (data: Mappedin) => void;
9941
+ };
9942
+ currentPath?: MappedinNode[];
9943
+ referenceMap: MappedinMap;
9944
+ taskScheduler: TaskScheduler;
9945
+ sceneManager: SceneManager | undefined;
9946
+ loadOptions?: TMapViewOptions['loadOptions'];
9947
+ imageFlippingEnabled: boolean;
9948
+ imageFlippingCache: Record<any, any>;
9949
+ cachedPadding: TPadding;
9950
+ getCameraFrameForPoints: any;
9951
+ polygonMeshesById: Record<string, Mesh>;
9952
+ textLabelsByPolygonId: Record<string, FlatLabel>;
9953
+ renderer: any;
9954
+ scene: any;
9955
+ cameraParameters: Vector2;
9956
+ cameraParametersZoomVector: Vector2;
9957
+ resolution: Vector2;
9958
+ determineNewLabelSize: any;
9959
+ visibleMapsInCurrentScene: MappedinMap[];
9960
+ visibleLayersInCurrentScene: {
9961
+ [mapId: string]: MappedinPolygon['layer'][];
9962
+ };
9963
+ visibleMapObjectsInCurrentScene: MapObject[];
9964
+ mapSetInProgress: Promise<undefined>;
9965
+ mapSetResolved: (...args: any[]) => any;
9966
+ on<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, fn: (payload: INTERNAL_EVENT_PAYLOAD[EVENT_NAME] extends {
9967
+ data: null;
9968
+ } ? INTERNAL_EVENT_PAYLOAD[EVENT_NAME]['data'] : INTERNAL_EVENT_PAYLOAD[EVENT_NAME]) => void): void;
9969
+ off<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, fn: changeListenerFn<INTERNAL_EVENT_PAYLOAD[EVENT_NAME]>): void;
9970
+ publish<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, payload?: INTERNAL_EVENT_PAYLOAD[EVENT_NAME]): void;
9855
9971
  /**
9856
- * Log the given entries to this performance logger, and update the display
9857
- * accordingly. If a given key isn't already being logged, an entry will be
9858
- * added for it. If a key is being logged but isn't reported, it will be
9859
- * treated as if it had a value of `0` reported.
9972
+ * Manual camera controls for MapView. Generally you should be using the functions on MapView like {{#crossLink "MapView/focusOn:method"}}{{/crossLink}},
9973
+ * but if you have some cool animations in mind, you can do it with the {{#crossLink "CameraControls"}}{{/crossLink}}.
9974
+ * Some of the functions don't do anything in 2D.
9860
9975
  *
9861
- * @method reportFramePerformance
9862
- * @param {string -> number} entries the most recent recorded values for each
9863
- * named frame update
9864
9976
  */
9865
- reportFramePerformance(entries: any): void;
9977
+ controls: any;
9866
9978
  /**
9867
- * Add the given controls to the given panels. More efficient than adding
9868
- * controls one-by-one since it only recomputes positions after all controls
9869
- * are added.
9979
+ * The Venue data this MapView is using.
9870
9980
  *
9871
- * @method addDebugControls
9872
- * @param {category: string: [{name: string, description: string, control: DebugUIControl}]} categories
9873
- * a mapping from category to a list of control names and controls
9981
+ * @property venue {MappedinVenue}
9982
+ * @final
9874
9983
  */
9875
- addDebugControls(categories: any): void;
9984
+ readonly venue: Mappedin;
9876
9985
  /**
9877
- * Add the given control to a panel.
9986
+ * The div MapView is using.
9878
9987
  *
9879
- * @method addDebugControl
9880
- * @param {string} category the name of the panel the control will be put under
9881
- * @param {string} name the name of the control
9882
- * @param {string} description a description for the control (tooltip)
9883
- * @param {DebugUIControl} control the control to add to the panel
9988
+ * @property container {Div}
9989
+ * @final
9884
9990
  */
9885
- addDebugControl(category: string, name: string, description: string, control: DebugUIControl): void;
9991
+ readonly container: HTMLElement;
9886
9992
  /**
9887
- * Remove the given controls from the UI.
9993
+ * The ID of the Map currently being displayed.
9888
9994
  *
9889
- * @method removeDebugControls
9890
- * @param {category: string: [name: string]} categories
9891
- * a mapping from category to a list of control names to remove
9892
9995
  */
9893
- removeDebugControls(categories: any): void;
9996
+ readonly currentMap: string | null;
9894
9997
  /**
9895
- * Remove the given control from a panel.
9998
+ * Change this factor to influence how much the camera zooms in on a {@link IMapView3D.focusOn} call.
9896
9999
  *
9897
- * @method removeDebugControl
9898
- * @param {string} category the name of the panel the control will be put under
9899
- * @param {string} name the name of the control
10000
+ * @property focusZoomFactor {Integer}
10001
+ * @default 3
9900
10002
  */
9901
- removeDebugControl(category: string, name: string): void;
9902
- _addDebugControl(category: any, name: any, description: any, control: any): void;
9903
- _removeDebugControl(category: any, name: any): void;
9904
- _onMinimizeClicked(): void;
9905
- _onCategoryChanged(): void;
9906
- }
9907
- /**
9908
- * A graph on a HTML canvas element that will display the values in the given
9909
- * time series.
9910
- *
9911
- * @class LineGraph
9912
- * @private
9913
- */
9914
- class LineGraph {
10003
+ focusZoomFactor: number;
9915
10004
  /**
9916
- * Return a new `LineGraph` displaying information from the given list of
9917
- * time series.
10005
+ * Returns the value you should call {@link CameraControls.setZoom} on to fit the Polygon exactly.
9918
10006
  *
9919
- * @constructor
9920
- * @param {[TimeSeries]} seriesList the list of time series that will be
9921
- * displayed on this graph.
9922
- * @param {number} width the width of this canvas element, in pixels
9923
- * @param {number} height the width of this canvas element, in pixels
10007
+ * @return The zoom level that will fit the Polygon
9924
10008
  */
9925
- constructor({ seriesList, width, height }: [TimeSeries]);
9926
- _gradients: Map<any, any>;
9927
- _canvas: HTMLCanvasElement;
9928
- _context: CanvasRenderingContext2D | null;
9929
- destroy(): void;
10009
+ getZoomLevelForPolygon(props: {
10010
+ /**
10011
+ * The Polygon or Polygon ID to get the zoom level for
10012
+ */
10013
+ polygonOrPolygonId: MappedinPolygon | string;
10014
+ }): number;
9930
10015
  /**
9931
- * @method element
9932
- * @return {Element} DOM element that can be added to display this graph
10016
+ * Returns the value you should call {@link CameraControls.setZoom} on to fit the {@link IMapView3D.currentMap} exactly.
10017
+ *
10018
+ * @return The zoom level that will fit the {@link IMapView3D.currentMap}.
9933
10019
  */
9934
- get element(): Element;
10020
+ getZoomLevelForCurrentMap(): number;
9935
10021
  /**
9936
- * Clear this canvas and re-draw the time series lines.
10022
+ * Returns the angle that points to north, in radians, from the default orientation.
9937
10023
  *
9938
- * @method redraw
10024
+ * @return The angle to north from the default orientation, in radians.
9939
10025
  */
9940
- redraw(): void;
10026
+ getNorth(): number;
9941
10027
  /**
9942
- * Set the list of time series that this graph displays.
10028
+ * Takes an element on the DOM and rotates it such that the top is pointing north. It will rotate with the camera, staying locked
10029
+ * on north. If you would like to align it do a different direction, or a different side of the element, pass in an offset. This
10030
+ * is how you would do a compass rose.
10031
+ *
10032
+ * This will modify your element's transform.
10033
+ *
10034
+ * @param element The element on the page to rotate.
10035
+ * @param offset The amount to offset the rotation by, in radians.
9943
10036
  *
9944
- * @method setSeriesList
9945
- * @param {[TimeSeries]} series series to display
9946
10037
  */
9947
- setSeriesList(series: [TimeSeries]): void;
9948
- _seriesList: [TimeSeries] | undefined;
9949
- }
9950
- /**
9951
- * A time series that averages values that are reported to it and inserts them
9952
- * into a ring buffer.
9953
- *
9954
- * @class TimeSeries
9955
- * @private
9956
- */
9957
- class TimeSeries {
9958
- constructor({ windowSize, totalAccumulationCount, hue, }: {
9959
- windowSize?: number | undefined;
9960
- totalAccumulationCount?: number | undefined;
9961
- hue?: number | undefined;
9962
- });
9963
- windowSize: number;
9964
- hue: number;
9965
- _totalAccumulationCount: number;
9966
- _ringBuffer: any[];
9967
- _ringBufferLength: number;
9968
- _ringBufferPointer: number;
9969
- _accumulatorValue: number;
9970
- _accumulatorCount: number;
9971
- _changed: boolean;
9972
- destroy(): void;
10038
+ lockNorth(element: HTMLElement, offset?: number): void;
9973
10039
  /**
9974
- * Incorporate the given value into the time series. This will accumulate up
9975
- * to `LINE_GRAPH_ACCUMULATION_COUNT` values, at which point they will be
9976
- * averaged and inserted into the time series. If the number of averaged entries
9977
- * exceeds `LINE_GRAPH_WINDOW_SIZE`, the ring buffer will drop the oldest
9978
- * entry.
9979
- *
9980
- * This will set the `changed()` flag if an accumulated value has been added
9981
- * to the ring buffer.
10040
+ * Stops the MapView from trying to rotate your element with the camera. Do this if you remove the element, or want to stop it from rotating.
10041
+ * @param element The node to stop rotating. It won't reset the transform, just leave it as is.
10042
+ */
10043
+ unlockNorth(element: HTMLElement): void;
10044
+ /**
10045
+ * Returns all polygons that contain the specified MappedinCoordinate.
9982
10046
  *
9983
- * @method report
9984
- * @param {number} value the value to add to the time series
10047
+ * @param coordinate The MappedinCoordinate to check
10048
+ * @param hoverableMeshChildren
10049
+ * @param options {@link TGetPolygonsAtCoordinateOptions}
9985
10050
  */
9986
- report(value: number): void;
10051
+ getPolygonsAtScreenCoordinate(x: number, y: number, options?: TGetPolygonsAtCoordinateOptions): MappedinPolygon[];
9987
10052
  /**
9988
- * Return the entry at the given index in the ring buffer. The value
9989
- * at `length - 1` is the most recently accumulated value.
10053
+ * Returns all polygons at the specified screen coordinate.
9990
10054
  *
9991
- * @method at
9992
- * @param {number} i the index to retrieve
9993
- * @return {number} the accumulated value at the given index
10055
+ * @param coordinate The Vector2 coordinate to check
10056
+ * @param hoverableMeshChildren
10057
+ * @param options {@link TGetPolygonsAtCoordinateOptions}
9994
10058
  */
9995
- at(i: number): number;
10059
+ getPolygonsAtCoordinate(coordinate: MappedinCoordinate, options?: TGetPolygonsAtCoordinateOptions): MappedinPolygon[];
10060
+ currentInteractionEvent: INTERNAL_EVENT | undefined;
10061
+ interactivePolygons: Record<string, boolean>;
9996
10062
  /**
9997
- * @method maximumValue
9998
- * @return {number} the maximum value in this time series
10063
+ * An object containing polygon ids and their hover colors.
9999
10064
  */
10000
- maximumValue(): number;
10065
+ polygonHoverColorsById: Record<string, Color>;
10001
10066
  /**
10002
- * Return true if this time series has changed since the previous `report()`
10003
- * invocation.
10004
- *
10005
- * @method changed
10006
- * @return {boolean}
10067
+ * An Object to keep track of highlighted polygon id and the highlight color as the value initiated by setPolygonColor
10007
10068
  */
10008
- changed(): boolean;
10069
+ highlightedPolygons: Record<string, string>;
10009
10070
  /**
10010
- * Return the number of accumulated values in this time series. Will never
10011
- * exceed `LINE_GRAPH_WINDOW_SIZE`.
10012
- *
10013
- * @return {number} number of accumulated entries
10071
+ * An object containing all outlined polygons.
10014
10072
  */
10015
- get length(): number;
10016
- }
10017
- export {};
10018
- }
10019
-
10020
- declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.DebugUIControl' {
10021
- export class DebugUIScalarSlider {
10022
- constructor({ minimum, maximum, step, current, onValueChanged }: {
10023
- minimum: any;
10024
- maximum: any;
10025
- step: any;
10026
- current: any;
10027
- onValueChanged: any;
10028
- });
10029
- _minimum: any;
10030
- _maximum: any;
10031
- _step: any;
10032
- _onValueChanged: any;
10033
- _element: HTMLInputElement;
10034
- destroy(): void;
10035
- addValueChangedListener(listener: any): void;
10036
- setValue(value: any): void;
10037
- get element(): HTMLInputElement;
10038
- get value(): string;
10039
- get displayedValue(): string;
10040
- get height(): number;
10041
- }
10042
- export class DebugUICheckbox {
10043
- constructor({ current, onValueChanged }: {
10044
- current: any;
10045
- onValueChanged: any;
10046
- });
10047
- _onValueChanged: any;
10048
- _element: HTMLDivElement;
10049
- _titleElement: HTMLInputElement;
10050
- destroy(): void;
10051
- addValueChangedListener(listener: any): void;
10052
- get element(): HTMLDivElement;
10053
- get titleElement(): HTMLInputElement;
10054
- get value(): boolean;
10055
- get displayedValue(): "true" | "false";
10056
- get height(): number;
10057
- get titleElementWidth(): number;
10058
- }
10059
- export class DebugUIDropdown {
10060
- constructor({ values, current, onValueChanged }: {
10061
- values: any;
10062
- current: any;
10063
- onValueChanged: any;
10064
- });
10065
- _values: any;
10066
- _onValueChanged: any;
10067
- _element: HTMLSelectElement;
10068
- destroy(): void;
10069
- addValueChangedListener(listener: any): void;
10070
- get element(): HTMLSelectElement;
10071
- get value(): string;
10072
- get displayedValue(): string;
10073
- get height(): number;
10074
- }
10075
- export class DebugUIButton {
10076
- constructor({ label, onClick }: {
10077
- label: any;
10078
- onClick: any;
10079
- });
10080
- _onClick: any;
10081
- _element: HTMLButtonElement;
10082
- destroy(): void;
10083
- addValueChangedListener(): void;
10084
- addClickListener(listener: any): void;
10085
- get element(): HTMLButtonElement;
10086
- get value(): string;
10087
- get displayedValue(): string;
10088
- get height(): number;
10089
- }
10090
- export class DebugUIColorPicker {
10091
- constructor({ current, onValueChanged }: {
10092
- current: any;
10093
- onValueChanged: any;
10094
- });
10095
- _onValueChanged: any;
10096
- _element: HTMLDivElement;
10097
- _titleElement: HTMLDivElement;
10098
- _color: any;
10099
- _listeners: any[];
10100
- _colorPickerMain: HTMLCanvasElement;
10101
- _colorPickerBottomSlider: HTMLCanvasElement;
10102
- _requestAnimationFrameHandle: number | null;
10103
- _requestAnimationFrameUpdate(): void;
10104
- _pickingMain: boolean;
10105
- _pickingX: number;
10106
- _pickingY: number;
10107
- _moveListener: (e: any) => void;
10108
- _upListener: any;
10109
- _pickingBottomSlider: boolean;
10110
- _bottomMoveListener: (e: any) => void;
10111
- _bottomUpListener: any;
10112
- _mode: string;
10113
- _modeButtons: {};
10114
- destroy(): void;
10115
- _destroyed: boolean | undefined;
10116
- addValueChangedListener(listener: any): void;
10117
- setValue(color: any): void;
10118
- _requestAnimationFrame(): void;
10119
- _notify(): void;
10120
- _updateMain(x: any, y: any): void;
10121
- _updateBottomSlider(x: any): void;
10122
- redraw(): void;
10123
- get element(): HTMLDivElement;
10124
- get titleElement(): HTMLDivElement;
10125
- get value(): any;
10126
- get displayedValue(): string;
10127
- get height(): number;
10128
- get titleElementWidth(): number;
10129
- }
10130
- export class DebugUIPanel {
10131
- constructor({ name }: {
10132
- name: any;
10133
- });
10134
- _name: any;
10135
- _element: HTMLDivElement;
10136
- _entries: any[];
10137
- _height: number;
10138
- destroy(): void;
10139
- get element(): HTMLDivElement;
10140
- get height(): number;
10141
- addControl(name: any, description: any, control: any): void;
10142
- removeControl(name: any): void;
10143
- _updateLayout(): void;
10073
+ outlinedPolygons: Map<string, MappedinPolygon>;
10074
+ /**
10075
+ * A plane that is parallel to the ground and is used for raycasting.
10076
+ */
10077
+ worldPlane: Mesh;
10078
+ getPositionLatLon(lat: number, lon: number, map?: MappedinMap | string | null): Vector3;
10079
+ currentScale: number;
10080
+ getPositionPolygon(polygon: MappedinPolygon | string): Vector3;
10081
+ /**
10082
+ * Takes an x/y pair in Mappedin coordinate space and gives you a Vector3 in scene space
10083
+ * @param nodeOrCoordinate a node or coordinate
10084
+ */
10085
+ convertTo3DMapPosition(nodeOrCoordinate: MappedinCoordinate | MappedinNode): Vector3;
10086
+ /**
10087
+ * Converts a Vector-like object into a MappedinCoordinate for a map.
10088
+ * @param position an object with x and y, like a Vector3
10089
+ * @param mapClass An optional map; otherwise, the current map will be used.
10090
+ */
10091
+ convert3DMapPositionToCoordinate(position: {
10092
+ x: number;
10093
+ y: number;
10094
+ }, mapClass?: MappedinMap): MappedinCoordinate;
10095
+ /**
10096
+ * Converts a 2D x,y screen position into a 3D MappedinCoordinate using projection
10097
+ */
10098
+ convertScreenCoordinateToMapCoordinate(x: number, y: number, map: MappedinMap): MappedinCoordinate;
10099
+ setPadding(padding: {
10100
+ top: number;
10101
+ left: number;
10102
+ bottom: number;
10103
+ right: number;
10104
+ }): void;
10105
+ smartCollisionEngine: SmartCollisionEngine;
10106
+ mapObjects: Map<MappedinMap['id'], MapObject>;
10107
+ /**
10108
+ * The scene only renders when something has changed. This should be something a 3rd party developer doesn't need to worry about,
10109
+ * but if you are doing something weird, or have your own special tween for something, you will want to call this function.
10110
+ * You can call it as often as you want, it just sets a flag that we need to render again, and renders a few frames if we weren't already doing that.
10111
+ * Ignored in 2D.
10112
+ */
10113
+ tryRendering(renderMode?: RENDER): void;
10114
+ setMapReason?: E_MAP_CHANGED_REASON;
10115
+ setMap(mapOrMapId: MappedinMap | string): Promise<null>;
10116
+ setMapWithReason(mapOrMapId: MappedinMap | string, context: E_MAP_CHANGED_REASON): Promise<null>;
10117
+ getPositionNode(node: MappedinNode): Vector3;
10118
+ cameraObject: any;
10119
+ setBackgroundColor(color: string, alpha?: number): void;
10120
+ mapManager: any;
10121
+ focusOn(focusOptions: TFocusOptionsLegacy): Tween;
10122
+ canvasWidth: number;
10123
+ canvasHeight: number;
10124
+ setState(state: STATE): Promise<void>;
10125
+ getNearestNodeByScreenCoordinate(x: number, y: number, mapOrMapId?: MappedinMap | MappedinMap['id']): MappedinNode;
10126
+ destroy(): void;
10144
10127
  }
10145
10128
  }
10146
10129
 
@@ -10342,6 +10325,38 @@ declare module '@mappedin/mappedin-js/renderer/private/Core' {
10342
10325
  export default Core;
10343
10326
  }
10344
10327
 
10328
+ declare module '@mappedin/mappedin-js/renderer/internal/outdoor-context/Mappedin.Tile' {
10329
+ import { Texture, Mesh, MeshBasicMaterial } from 'three';
10330
+ import type { ICore } from '@mappedin/mappedin-js/renderer/internal';
10331
+ import { MappedinCoordinate, MappedinMap } from '@mappedin/mappedin-js/get-venue';
10332
+ import { TileManager } from '@mappedin/mappedin-js/renderer/internal/outdoor-context/Mappedin.TileManager';
10333
+ export class Tile {
10334
+ #private;
10335
+ center: MappedinCoordinate;
10336
+ zoomLevel: number;
10337
+ mesh: Mesh;
10338
+ material?: MeshBasicMaterial;
10339
+ texture?: Texture;
10340
+ cache: {
10341
+ tileXY?: {
10342
+ tileX: number;
10343
+ tileY: number;
10344
+ };
10345
+ tileBoundingBoxInLatLon?: number[];
10346
+ };
10347
+ get tileXY(): {
10348
+ tileX: number;
10349
+ tileY: number;
10350
+ };
10351
+ get tileBoundingBoxInLatLon(): number[];
10352
+ constructor(center: MappedinCoordinate, zoomLevel: number, tileManager: TileManager, core: ICore, currentAbortController: AbortController);
10353
+ rendered: boolean;
10354
+ discardTexture(): void;
10355
+ applyTexture(): void;
10356
+ render(metersPerTile: number, referenceMap: MappedinMap): Mesh<import("three").BufferGeometry<import("three").NormalBufferAttributes>, import("three").Material | import("three").Material[], import("three").Object3DEventMap>;
10357
+ }
10358
+ }
10359
+
10345
10360
  declare module '@mappedin/mappedin-js/get-venue/Mappedin.MVF.types' {
10346
10361
  import { MapId, ObstructionCollection, EntranceCollection, SpaceCollection, Style } from '@mappedin/mvf';
10347
10362
  import { FeatureCollection, MultiPolygon, Point, Polygon } from 'geojson';