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