@mappedin/react-native-sdk 5.1.5 → 5.2.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.
Files changed (3) hide show
  1. package/dist/index.d.ts +825 -13
  2. package/dist/index.js +218 -218
  3. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -1112,6 +1112,12 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1112
1112
  * Will be empty if no interactive polygons were clicked.
1113
1113
  */
1114
1114
  polygons: MappedinPolygon[];
1115
+ /**
1116
+ * A list of {@link MappedinMap}s corresponding to every map that a user's
1117
+ * click passed through. These are in order of first to last intersected.
1118
+ * Will be empty if no maps were clicked.
1119
+ */
1120
+ maps: MappedinMap[];
1115
1121
  /**
1116
1122
  * Indicates whether the user clicked close to the Blue Dot object on the
1117
1123
  * map, if present. If Blue Dot is disabled, this will always be false.
@@ -1880,7 +1886,7 @@ declare module '@mappedin/react-native-sdk/wrappers/common/events' {
1880
1886
 
1881
1887
  declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
1882
1888
  import { IDirectionsResult, MappedinMap, MappedinNode, TBlueDotPositionUpdate, TBlueDotStateChange, TGetVenueOptions, TCameraTransform, TAddFlatLabelOptions, TAddFloatingLabelOptions, TPathOptions, TShowVenueOptions, STATE, TGeolocationObject, TEnableBlueDotOptions, MappedinLocation, TFlatLabelAllLocationsOptions, TFloatingLabelAllLocationsOptions, TMappedinOfflineSearchOptions, TFocusOnCameraOptions, TCameraAnimationOptions, TGetPolygonsAtCoordinateOptions, E_CAMERA_DIRECTION, TFlatLabelAppearance, TFloatingLabelAppearance } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
1883
- import { TFocusOnTargetsSerializable, TMiMapViewOptions, TSerializedCoordinate } from '@mappedin/react-native-sdk/wrappers/common/types';
1889
+ import { TFocusOnTargetsSerializable, TMiMapViewOptions, TSerializedCoordinate, TSerializedMap } from '@mappedin/react-native-sdk/wrappers/common/types';
1884
1890
  import { BRIDGE_EVENT, EVENT, MINIMAP_EVENT, NATIVE_EVENT } from '@mappedin/react-native-sdk/wrappers/common';
1885
1891
  import { TSerializableJourneyOptions, TSerializedLocation, TSerializedNode, TSerializedPolygon } from '@mappedin/react-native-sdk/wrappers/common/types';
1886
1892
  import { TCreateTooltipCommonOptions, TCreateTooltipOptions } from '@mappedin/react-native-sdk/core/packages/renderer';
@@ -2177,6 +2183,7 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
2177
2183
  longitude: number;
2178
2184
  };
2179
2185
  polygons: TSerializedPolygon[];
2186
+ maps: TSerializedMap[];
2180
2187
  nearBlueDot: boolean;
2181
2188
  };
2182
2189
  [EVENT.GET_POLYGONS_AT_COORDINATE]: {
@@ -2224,6 +2231,10 @@ declare module '@mappedin/react-native-sdk/wrappers/common/types' {
2224
2231
  id: string;
2225
2232
  type: 'Polygon';
2226
2233
  };
2234
+ export type TSerializedMap = {
2235
+ id: string;
2236
+ type: 'Map';
2237
+ };
2227
2238
  export type TSerializedCoordinate = {
2228
2239
  type: 'Coordinate';
2229
2240
  mapId: string;
@@ -2289,6 +2300,8 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Core.interface
2289
2300
  import { INTERNAL_EVENT_PAYLOAD } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
2290
2301
  import { TPadding } from '@mappedin/react-native-sdk/core/packages/renderer';
2291
2302
  import Tween, { Easing } from '@tweenjs/tween.js';
2303
+ import { TaskScheduler } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.TaskScheduler';
2304
+ import SceneManager from '@mappedin/react-native-sdk/core/packages/renderer/MapView.SceneManager';
2292
2305
  export type TFocusOptionsLegacy = {
2293
2306
  /**
2294
2307
  * An array of Nodes to focus in on
@@ -2339,10 +2352,14 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Core.interface
2339
2352
  * @internal
2340
2353
  */
2341
2354
  currentScale: number;
2355
+ referenceMap: MappedinMap;
2356
+ taskScheduler: TaskScheduler;
2357
+ sceneManager: SceneManager;
2342
2358
  loadOptions?: TMapViewOptions['loadOptions'];
2343
2359
  imageFlippingEnabled: boolean;
2344
2360
  imageFlippingCache: any;
2345
2361
  cachedPadding: any;
2362
+ getCameraFrameForPoints: any;
2346
2363
  polygonMeshesById: any;
2347
2364
  textLabelsByPolygonId: any;
2348
2365
  renderer: any;
@@ -2440,7 +2457,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Core.interface
2440
2457
  onMapClicked(position: {
2441
2458
  latitude: number;
2442
2459
  longitude: number;
2443
- }, polygons: string[], nearBlueDot: boolean): void;
2460
+ }, polygons: string[], maps: MappedinMap[], nearBlueDot: boolean): void;
2444
2461
  /**
2445
2462
  * This is called when an interactive Polygon is clicked on.
2446
2463
  * You will almost certainly want to replace this with your own function in your client app.
@@ -3026,6 +3043,7 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
3026
3043
  longitude: number;
3027
3044
  };
3028
3045
  polygons: import("./types").TSerializedPolygon[];
3046
+ maps: import("./types").TSerializedMap[];
3029
3047
  nearBlueDot: boolean;
3030
3048
  };
3031
3049
  };
@@ -5502,6 +5520,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5502
5520
  }
5503
5521
 
5504
5522
  declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView' {
5523
+ import { Texture } from 'three';
5505
5524
  import './internal/Mappedin.css';
5506
5525
  import { Mappedin, MappedinCoordinate, MappedinLocation, MappedinMap, MappedinNode, MappedinPolygon } from '@mappedin/react-native-sdk/core/packages/get-venue';
5507
5526
  import { E_SDK_EVENT_PAYLOAD, TCreateMarkerOptions, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TMapViewOptions, TPathOptions, TCreateTooltipCommonOptions, TCreateTooltipOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
@@ -5516,15 +5535,29 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView' {
5516
5535
  import { IFlatLabels } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.FlatLabels';
5517
5536
  import { IFloatingLabels } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.FloatingLabels';
5518
5537
  export enum INTERNAL_EVENT {
5519
- CAMERA_MOVING = 0,
5520
- SET_BLUE_DOT_SIZE_FROM_ZOOM = 1,
5521
- PUBLISH_BLUE_DOT = 2,
5522
- SET_STATE_SILENT = 3,
5523
- BLUE_DOT_UPDATE_POSITION = 4,
5524
- BLUE_DOT_SET_FOLLOWING = 5,
5525
- CLEAR_MOUSE = 6
5538
+ ON_FIRST_MAP_LOADED = 0,
5539
+ TEXTURE_LOADED = 1,
5540
+ RENDER = 2,
5541
+ RENDER_NOW = 3,
5542
+ UPDATE_FLIPPABLES = 4,
5543
+ SET_MAP_START = 5,
5544
+ SET_MAP = 6,
5545
+ CAMERA_MOVING = 7,
5546
+ SET_BLUE_DOT_SIZE_FROM_ZOOM = 8,
5547
+ PUBLISH_BLUE_DOT = 9,
5548
+ SET_STATE_SILENT = 10,
5549
+ BLUE_DOT_UPDATE_POSITION = 11,
5550
+ BLUE_DOT_SET_FOLLOWING = 12,
5551
+ CLEAR_MOUSE = 13
5526
5552
  }
5527
5553
  export type INTERNAL_EVENT_PAYLOAD = {
5554
+ [INTERNAL_EVENT.SET_MAP_START]: undefined;
5555
+ [INTERNAL_EVENT.ON_FIRST_MAP_LOADED]: undefined;
5556
+ [INTERNAL_EVENT.TEXTURE_LOADED]: Texture;
5557
+ [INTERNAL_EVENT.RENDER]: undefined;
5558
+ [INTERNAL_EVENT.RENDER_NOW]: undefined;
5559
+ [INTERNAL_EVENT.UPDATE_FLIPPABLES]: undefined | boolean;
5560
+ [INTERNAL_EVENT.SET_MAP]: undefined;
5528
5561
  [INTERNAL_EVENT.CAMERA_MOVING]: any;
5529
5562
  [INTERNAL_EVENT.SET_BLUE_DOT_SIZE_FROM_ZOOM]: number;
5530
5563
  [INTERNAL_EVENT.PUBLISH_BLUE_DOT]: undefined;
@@ -5794,6 +5827,570 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView' {
5794
5827
  }
5795
5828
  }
5796
5829
 
5830
+ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.TaskScheduler' {
5831
+ /**
5832
+ * A function that can be submitted to the Task Scheduler to run each frame for
5833
+ * some provided number of frames. A single update can be repeatedly submitted;
5834
+ * if the number of frames left on the update is less than `frameCount`, it will
5835
+ * be reset to `frameCount`.
5836
+ *
5837
+ * @class FrameUpdate
5838
+ * @private
5839
+ */
5840
+ export class FrameUpdate {
5841
+ /**
5842
+ * Create a new frame update that can be submitted to a scheduler.
5843
+ * @constructor
5844
+ * @param [options] {Object} Options for the update
5845
+ * @param [options.callback] {function}
5846
+ * The actual function to run every time this update is scheduled for
5847
+ * a frame.
5848
+ * @param [options.frameCount=1] {number}
5849
+ * How many frames this update should run for when it's submitted to
5850
+ * a scheduler
5851
+ * @param [options.ordering=0] {number}
5852
+ * An ordering value that's used to determine the order in which
5853
+ * frame updates will be run within a frame; larger numbers will
5854
+ * be run first
5855
+ * @param [options.supersededBy=[]] {[FrameUpdate]}
5856
+ * If this update is scheduled to run in a frame, but another update in
5857
+ * the provided list is also scheduled to run on that frame, then
5858
+ * this update will not be run.
5859
+ * @param [options.name=undefined] {string}
5860
+ * If provided, an arbitrary name for logging purposes.
5861
+ * @param [options.userdata] {Any}
5862
+ * Arbitrary data that you can store along with this update.
5863
+ */
5864
+ constructor(options: {
5865
+ callback: Function;
5866
+ frameCount?: number;
5867
+ ordering?: number;
5868
+ supersededBy?: Set<never>;
5869
+ name: string;
5870
+ userdata?: Record<string, any>;
5871
+ });
5872
+ _callback: Function;
5873
+ _frameCount: number;
5874
+ _ordering: number;
5875
+ _supersededBy: Set<never>;
5876
+ name: string;
5877
+ _remainingFrameCount: number;
5878
+ _lastFrameTime: number;
5879
+ userdata?: Record<string, any>;
5880
+ /**
5881
+ * Return the amount of time that this frame update took to execute during
5882
+ * its most recent execution, in milliseconds. If called during this frame
5883
+ * update, the value returned will be for the previous invocation. If called
5884
+ * before this frame update has been executed at least once, the returned
5885
+ * value is unspecified.
5886
+ *
5887
+ * @method lastFrameTime
5888
+ * @return {number} the previous frame time, in milliseconds
5889
+ */
5890
+ getLastFrameTime(): number;
5891
+ }
5892
+ /**
5893
+ * A task that can be submitted to the Task Scheduler to be run every time
5894
+ * there is a frame update with spare time in the frame.
5895
+ *
5896
+ * @class FrameTask
5897
+ * @private
5898
+ */
5899
+ export class FrameTask {
5900
+ /**
5901
+ * Create a new frame task that can be submitted to a scheduler.
5902
+ * @constructor
5903
+ * @param [options] {Object} Options for the task
5904
+ * @param [options.callback] {function}
5905
+ * The actual function to run when this task is scheduled.
5906
+ * @param [options.group=null] {FrameTaskGroup}
5907
+ * If provided, a group to which this task will be added when scheduled
5908
+ * @param [options.priority=0] {number}
5909
+ * Tasks with higher priority will be taken from the queue before tasks
5910
+ * with a lower priority.
5911
+ * @param [options.postponeOnAdd=false] {number}
5912
+ * If true, this task will not be run until `resumeTask` is called on the
5913
+ * scheduler.
5914
+ * @param [options.name=undefined] {string}
5915
+ * If provided, an arbitrary name for logging purposes.
5916
+ * @param [options.userdata] {Any}
5917
+ * Arbitrary data that you can store along with this task.
5918
+ */
5919
+ constructor(options: {
5920
+ userdata: Record<string, any>;
5921
+ priority: number;
5922
+ group?: FrameTaskGroup;
5923
+ postponeOnAdd: number | boolean;
5924
+ name: string;
5925
+ lastFrameTime: number;
5926
+ callback: Function;
5927
+ });
5928
+ _postponed: number | boolean;
5929
+ userdata: Record<string, any>;
5930
+ _priority: number;
5931
+ _group: FrameTaskGroup | null;
5932
+ name: string;
5933
+ _lastFrameTime: number;
5934
+ _callback: Function;
5935
+ _complete: boolean;
5936
+ _scheduled: boolean;
5937
+ _cancelled: boolean;
5938
+ /**
5939
+ * Return true if this task has been run at least once.
5940
+ *
5941
+ * @method isComplete
5942
+ * @return {boolean}
5943
+ */
5944
+ isComplete(): boolean;
5945
+ /**
5946
+ * Return the amount of time that this frame task took to execute,
5947
+ * in milliseconds. If this task has not yet completed, the returned value
5948
+ * is unspecified.
5949
+ *
5950
+ * @method lastFrameTime
5951
+ * @return {number} the frame time, in milliseconds
5952
+ */
5953
+ getLastFrameTime(): number;
5954
+ }
5955
+ /**
5956
+ * A group of tasks that must all be completed before the group is considered
5957
+ * complete. The tasks will be automatically garbage collected so that references
5958
+ * to the task don't linger.
5959
+ *
5960
+ * @class FrameTaskGroup
5961
+ * @private
5962
+ */
5963
+ export class FrameTaskGroup {
5964
+ /**
5965
+ * Create a new frame task group.
5966
+ *
5967
+ * @constructor
5968
+ * @param [options] {Object} Options for the task group
5969
+ * @param [options.onComplete] {function}
5970
+ * A callback that will be triggered once every task in this group
5971
+ * has been completed. This callback may schedule a task, and the
5972
+ * scheduler will run that task in the same frame, if there is still
5973
+ * frame time for it.
5974
+ * @param [options.priority=0] {number}
5975
+ * The priority of all the tasks in this group.
5976
+ * @param [options.postponeOnAdd=false] {number}
5977
+ * If true, tasks from this task group will not be run until `resumeTask`
5978
+ * is called on the scheduler with this group.
5979
+ * @param [options.name=undefined] {string}
5980
+ * If provided, an arbitrary name for logging purposes.
5981
+ * @param [options.userdata] {Any}
5982
+ * Arbitrary data that you can store along with this task group.
5983
+ */
5984
+ constructor(options: {
5985
+ onComplete?: Function;
5986
+ priority?: number;
5987
+ userdata: Record<string, any>;
5988
+ postponeOnAdd: number | boolean;
5989
+ name: string;
5990
+ });
5991
+ _postponed: number | boolean;
5992
+ _onComplete: Function;
5993
+ _priority: number;
5994
+ userdata: Record<string, any>;
5995
+ name: string;
5996
+ _tasks: Set<any>;
5997
+ _scheduledTasks: Set<any>;
5998
+ _scheduled: boolean;
5999
+ _cancelled: boolean;
6000
+ /**
6001
+ * Return true if every task in this group has been run at least once.
6002
+ * @method isComplete
6003
+ * @return {boolean}
6004
+ */
6005
+ isComplete(): boolean;
6006
+ /**
6007
+ * Return a list of tasks in this group. This will be a copy of the
6008
+ * underlying task group, so it's safe to mutate the group while
6009
+ * iterating over this array.
6010
+ *
6011
+ * @method tasks
6012
+ * @return {[FrameTask]} list of tasks in this group
6013
+ */
6014
+ getTasks(): any[];
6015
+ /**
6016
+ * Empty this task group. This will trivially satisfy `isComplete`.
6017
+ *
6018
+ * @method clear
6019
+ */
6020
+ clear(): void;
6021
+ /**
6022
+ * Return one arbitrary incomplete task from this group, or undefined if
6023
+ * there are none.
6024
+ *
6025
+ * @method _popTask
6026
+ * @return {FrameTask} arbitrary scheduled task
6027
+ * @private
6028
+ */
6029
+ _popTask(): any;
6030
+ }
6031
+ /**
6032
+ * A timer for the task scheduler that uses real wall-time to determine if there's
6033
+ * enough remaining time in a frame to execute another task.
6034
+ *
6035
+ * @class RealTimeTimer
6036
+ * @private
6037
+ */
6038
+ export class RealTimeTimer {
6039
+ _maxMillisecondsPerFrame: number;
6040
+ _time: number;
6041
+ /**
6042
+ * @constructor
6043
+ * @param [options] {Object} Options for the timer
6044
+ * @param [options.maxMillisecondsPerFrame]
6045
+ * If the time since the beginning of the frame has been less than
6046
+ * or equal to this value, then another task may be executed
6047
+ */
6048
+ constructor(options?: {
6049
+ maxMillisecondsPerFrame?: number;
6050
+ });
6051
+ /**
6052
+ * Begin timing a frame.
6053
+ *
6054
+ * @method beginFrame
6055
+ */
6056
+ beginFrame(): void;
6057
+ /**
6058
+ * If true, there is enough time remaining to execute another task.
6059
+ *
6060
+ * @method hasTimeRemaining
6061
+ * @return {boolean}
6062
+ */
6063
+ hasTimeRemaining(): boolean;
6064
+ }
6065
+ /**
6066
+ * A timer that ticks every time `hasTimeRemaining` is called.
6067
+ *
6068
+ * @class FixedTimer
6069
+ * @private
6070
+ */
6071
+ export class FixedTimer {
6072
+ _ticks: number;
6073
+ maxTasksPerFrame: number;
6074
+ /**
6075
+ * @constructor
6076
+ * @param [options] {Object} Options for the timer
6077
+ * @param [options.maxTasksPerFrame=5]
6078
+ * The number of tasks that will be exceuted in a single update call.
6079
+ * Can be modified as the `maxTasksPerFrame` property on this boject.
6080
+ */
6081
+ constructor(options?: {
6082
+ maxTasksPerFrame?: number;
6083
+ });
6084
+ /**
6085
+ * Begin timing a frame.
6086
+ *
6087
+ * @method beginFrame
6088
+ */
6089
+ beginFrame(): void;
6090
+ /**
6091
+ * If true, there is enough time remaining to execute another task.
6092
+ *
6093
+ * @method hasTimeRemaining
6094
+ * @return {boolean}
6095
+ */
6096
+ hasTimeRemaining(): boolean;
6097
+ }
6098
+ /**
6099
+ * A class that handles scheduling tasks to be performed within the time
6100
+ * constraints of frame updates, triggered using `requestAnimationFrame`.
6101
+ *
6102
+ * Tasks can either be scheduled once per frame (called "frame updates"), or
6103
+ * to execute as many times per frame as there is room for after processing
6104
+ * all frame updates (called "frame tasks").
6105
+ *
6106
+ * Posted tasks will always run during the same frame, assuming there's time to
6107
+ * process them. However, an update or task that posts an update will not run
6108
+ * that update until the next frame.
6109
+ *
6110
+ * @class TaskScheduler
6111
+ * @private
6112
+ */
6113
+ export class TaskScheduler {
6114
+ /**
6115
+ * Construct a new `TaskScheduler` with no tasks scheduled.
6116
+ *
6117
+ * @constructor
6118
+ * @param [options] {Object} Options for the scheduler
6119
+ * @param [options.timer=new RealTimeTimer()]
6120
+ * Timer that determines whether there is sufficient time left in a frame
6121
+ * to continue executing tasks
6122
+ * @param [options.performance=false]
6123
+ * If true, this task scheduler will annotate tasks and frame updates with
6124
+ * performance information.
6125
+ */
6126
+ constructor(options?: {
6127
+ timer?: RealTimeTimer;
6128
+ performance?: boolean;
6129
+ });
6130
+ _raf?: (callback: FrameRequestCallback) => number;
6131
+ _timer: RealTimeTimer;
6132
+ _performance: boolean;
6133
+ _scheduledUpdatesByOrdering: Multimap;
6134
+ _scheduledTasksByPriority: Multimap;
6135
+ _postponedTasks: Set<any>;
6136
+ _requestAnimationFrameHandle: number | null;
6137
+ _updatesToRunThisFrame: any[];
6138
+ _lastFrameTime: number;
6139
+ _updatesRunLastFrame: Set<any>;
6140
+ /**
6141
+ * Empty the task scheduler's queue. All tasks in it will be cancelled.
6142
+ *
6143
+ * @method clear
6144
+ */
6145
+ clear(): void;
6146
+ /**
6147
+ * Destroy this task scheduler and remove all tasks from it.
6148
+ *
6149
+ * @method destroy
6150
+ */
6151
+ destroy(): void;
6152
+ /**
6153
+ * Schedule this task scheduler to execute updates and tasks on the next
6154
+ * available animation frame.
6155
+ *
6156
+ * @method requestAnimationFrame
6157
+ */
6158
+ requestAnimationFrame(): void;
6159
+ /**
6160
+ * Run all scheduled updates, and re-schedule another animation frame if any
6161
+ * scheduled updates still exist. If any scheduled update specifies
6162
+ * `shouldRunTasksAfterCompletion`, this will also run queued tasks until the
6163
+ * frame time runs out.
6164
+ *
6165
+ * @method update
6166
+ * @param timestamp {number} the current animation time, as returned from
6167
+ * `performance.now()`; will be automatically filled in by
6168
+ * `requestAnimationFrame` when it triggers this as a callback
6169
+ */
6170
+ update(timestamp: number): void;
6171
+ /**
6172
+ * Execute all tasks that are currently pending, without regard for the
6173
+ * available frame time.
6174
+ *
6175
+ * @method flushTasks
6176
+ */
6177
+ flushTasks(): void;
6178
+ /**
6179
+ * Return the amount of time elapsed during the last completed frame update,
6180
+ * in milliseconds. This value is unspecified if the task scheduler's
6181
+ * `update` method has not yet run or if the scheduler has been cleared.
6182
+ * If called during a frame update, this will
6183
+ * return the time elapsed during the previous frame update.
6184
+ *
6185
+ * @method lastFrameTime
6186
+ * @return {number} time elapsed during last frame update, in milliseconds
6187
+ */
6188
+ getLastFrameTime(): number;
6189
+ /**
6190
+ * Return a set containing every update that was run during the previous
6191
+ * frame update. This will be empty if the task scheduler's `update` method
6192
+ * has not yet been run or if the scheduler has been cleared.
6193
+ */
6194
+ getUpdatesRunLastFrame(): Set<any>;
6195
+ _executeOneTask(timestamp: number): void;
6196
+ /**
6197
+ * Schedule an update to be run for the next `update.frameCount` frames. If
6198
+ * the update already exists in the scheduler, the update's frame count will
6199
+ * be refreshed to `update.frameCount`. This will also schedule an animation
6200
+ * frame to begin processing the update.
6201
+ *
6202
+ * @method scheduleUpdate
6203
+ * @param task {FrameUpdate} the update to schedule
6204
+ */
6205
+ scheduleUpdate(update: FrameUpdate): void;
6206
+ /**
6207
+ * Schedule a task to be run during a frame update. This will also schedule
6208
+ * an animation frame to begin processing the task queue.
6209
+ *
6210
+ * @method scheduleTask
6211
+ * @param task {FrameTask} the task to schedule
6212
+ */
6213
+ scheduleTask(task: FrameTask): void;
6214
+ /**
6215
+ * If the given update is in the queue, remove it.
6216
+ *
6217
+ * @method cancelUpdate
6218
+ * @param task {FrameUpdate} the update to cancel
6219
+ */
6220
+ cancelUpdate(update: FrameUpdate): void;
6221
+ /**
6222
+ * If the given task or group is in the queue, remove it. Cancelling a
6223
+ * completed task is a no-op.
6224
+ *
6225
+ * Canceling an individual task will also remove it from its task group, if
6226
+ * it isn't already complete.
6227
+ *
6228
+ * @method cancelTask
6229
+ * @param task {FrameTask or FrameTaskGroup} the task to cancel
6230
+ */
6231
+ cancelTask(task: FrameTask | FrameTaskGroup): void;
6232
+ /**
6233
+ * Set the provided task or group not to run, until it's resumed using `resumeTask`.
6234
+ *
6235
+ * Tasks that are in a group can't be postponed individually; instead, call
6236
+ * `postponeTask` with the entire group.
6237
+ *
6238
+ * @method postponeTask
6239
+ * @param task {FrameTask or FrameTaskGroup} the task to postpone
6240
+ */
6241
+ postponeTask(task: FrameTask | FrameTaskGroup): void;
6242
+ /**
6243
+ * Allow a postponed task or task group to resume processing. This will also
6244
+ * request an animation frame to allow the resumed task to be processed.
6245
+ *
6246
+ * Tasks that are in a group can't be resumed individually; instead, call
6247
+ * `resumeTask` with the entire group.
6248
+ *
6249
+ * @method resumeTask
6250
+ * @param task {FrameTask or FrameTaskGroup} the task to resume
6251
+ */
6252
+ resumeTask(task: FrameTask | FrameTaskGroup): void;
6253
+ /**
6254
+ * Change the priority of the given scheduled task or task group.
6255
+ *
6256
+ * @method setTaskPriority
6257
+ * @param task {FrameTask or FrameTaskGroup} the task whose priority will be changed
6258
+ * @param priority {number} the priority to assign the task
6259
+ */
6260
+ setTaskPriority(task: FrameTask | FrameTaskGroup, priority: number): void;
6261
+ }
6262
+ /**
6263
+ * A map that maps a numeric key to a set of values.
6264
+ *
6265
+ * For use in the scheduler, we also maintain a sorted list of keys.
6266
+ *
6267
+ * @class Multimap
6268
+ * @private
6269
+ */
6270
+ class Multimap {
6271
+ /**
6272
+ * @method constructor
6273
+ */
6274
+ constructor();
6275
+ _map: Map<any, any>;
6276
+ _size: number;
6277
+ _sortedKeys: any[];
6278
+ /**
6279
+ * Return true if the set for the given key contains the provided value.
6280
+ *
6281
+ * @method has
6282
+ * @param key {number} the key whose set to check
6283
+ * @param value {Any} the value to check
6284
+ */
6285
+ has(key: number, value: any): any;
6286
+ /**
6287
+ * Return the list of elements at the given key. Make sure not to modify
6288
+ * it, as it will mess up the total element count.
6289
+ *
6290
+ * @method get
6291
+ * @param key {number}
6292
+ * @param value {Set(Any)}
6293
+ */
6294
+ get(key: number): any;
6295
+ /**
6296
+ * @method insert
6297
+ * @param key {number} the key to which another value will be added
6298
+ * @param value {Any} the value to add to the key's set
6299
+ */
6300
+ insert(key: number, value: any): void;
6301
+ /**
6302
+ * @method delete
6303
+ * @param key {number} the key at which the value is stored
6304
+ * @param value {Any} the value to delete
6305
+ */
6306
+ delete(key: number, value: any): void;
6307
+ /**
6308
+ * Remove and return an arbitrary value from the set at the given key.
6309
+ *
6310
+ * @method pop
6311
+ * @param key {number} the key from which to remove a value
6312
+ * @return {Any} arbitrary value from the given key's set, or undefined if
6313
+ * the set at the given key is empty.
6314
+ */
6315
+ pop(key: number): any;
6316
+ /**
6317
+ * Remove and return an arbitrary value from the set corresponding to
6318
+ * the key with the highest numeric value, using the javascript `<`
6319
+ * operator.
6320
+ *
6321
+ * @method popFromMaxKey
6322
+ * @return {Any} arbitrary value from the highest key's set, or undefined
6323
+ * if the map is empty
6324
+ */
6325
+ popFromMaxKey(): any;
6326
+ /**
6327
+ * Return an iterator over every value in this multimap, at every key.
6328
+ * Mutating the multimap during iteration will result in undefined
6329
+ * behaviour.
6330
+ *
6331
+ * @method values
6332
+ * @return {Iterator} iterator over the values in the map
6333
+ */
6334
+ values(): {
6335
+ [Symbol.iterator]: () => any;
6336
+ next: () => any;
6337
+ };
6338
+ /**
6339
+ * A list of keys in this set, sorted by numeric value. Not cloned,
6340
+ * for efficiency's sake, so please don't mutate it.
6341
+ *
6342
+ * @method keys
6343
+ * @return {[number]} sorted list of numeric keys in the map
6344
+ */
6345
+ keys(): any[];
6346
+ /**
6347
+ * The number of elements in this multimap, equal to the sum of the sizes
6348
+ * of each key's set of values.
6349
+ *
6350
+ * @property size {number} number of elements in this multimap
6351
+ */
6352
+ get size(): number;
6353
+ }
6354
+ export {};
6355
+ }
6356
+
6357
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.SceneManager' {
6358
+ import { MappedinMap } from '@mappedin/react-native-sdk/core/packages/get-venue';
6359
+ import { TCameraTransform, TCameraAnimationOptions } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
6360
+ import { ICore } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
6361
+ import MapViewScene from '@mappedin/react-native-sdk/core/packages/renderer/MapView.Scene';
6362
+ export type TSceneTransitionOptions = {
6363
+ /**
6364
+ * Map to set as active during the transition. This will decide where the camera will be positioned, as well as which
6365
+ * colliders are enabled.
6366
+ */
6367
+ activeMap?: MappedinMap;
6368
+ verticalDistanceBetweenMaps?: number;
6369
+ /**
6370
+ * Camera options to use when transitioning to the new scene
6371
+ */
6372
+ cameraTransform?: TCameraTransform;
6373
+ cameraAnimationOptions?: TCameraAnimationOptions;
6374
+ /**
6375
+ * Whether to auto focus on the active map or leave the camera where it is.
6376
+ * For single building venues, this should look the same way it did with MapManager
6377
+ * For multi-building venues, this means the camera will not pan over to where the active map
6378
+ * is relative to the world, which may look like broken behavior.
6379
+ * @default true
6380
+ */
6381
+ autoFocusOnActiveMap?: boolean;
6382
+ };
6383
+ class SceneManager {
6384
+ #private;
6385
+ currentScene: MapViewScene;
6386
+ constructor(core: ICore, startingScene: MapViewScene);
6387
+ get currentMap(): MappedinMap;
6388
+ renderGrid(): void;
6389
+ transitionTo(scene: MapViewScene, transitionOptions?: TSceneTransitionOptions): Promise<void>;
6390
+ }
6391
+ export default SceneManager;
6392
+ }
6393
+
5797
6394
  declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollider' {
5798
6395
  import SmartCollisionEngine from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollisionEngine';
5799
6396
  import { Vector3 } from 'three';
@@ -6011,8 +6608,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/blue-
6011
6608
  * @param [options.minRadius] The ring around the blue dot will only be drawn if `options.radius` is greater than or equal to this value, in metres. Must be >= 0.
6012
6609
  * @param [options.radiusUpdateInterval] The width of radius update steps, in metres. For example, if interval is 3 and assume `minRadius` is 8, then the radius will be updated on 8, 11, 14, 17, etc. Must be >= 0.
6013
6610
  */
6014
- constructor({ mapManager, mapView, threeDMarkerLayer, core, minRadius, maxRadius, radiusUpdateInterval, radiusTweenOptions }?: {
6015
- mapManager: any;
6611
+ constructor({ mapView, threeDMarkerLayer, core, minRadius, maxRadius, radiusUpdateInterval, radiusTweenOptions }?: {
6016
6612
  mapView: any;
6017
6613
  threeDMarkerLayer: any;
6018
6614
  core: any;
@@ -6024,7 +6620,6 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/blue-
6024
6620
  easing: any;
6025
6621
  } | undefined;
6026
6622
  });
6027
- mapManager: any;
6028
6623
  mapView: any;
6029
6624
  threeDMarkerLayer: any;
6030
6625
  core: any;
@@ -6193,6 +6788,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/layers/EventSy
6193
6788
  calculateMouseCoordinates: (event: any) => void;
6194
6789
  getMouseRayIntersects: (objects: Object3D | Object3D[]) => any;
6195
6790
  detectPolygonsUnderMouse: () => any[];
6791
+ detectMapsUnderMouse: () => any;
6196
6792
  getMouseMapPosition: () => {
6197
6793
  x: number;
6198
6794
  y: number;
@@ -6213,6 +6809,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
6213
6809
  import { MappedinDirections } from '@mappedin/react-native-sdk/core/packages/get-venue';
6214
6810
  import { TJourneyOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
6215
6811
  import { MapView } from '@mappedin/react-native-sdk/core/packages/renderer';
6812
+ import { ICore } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
6216
6813
  export type TMappedinDirections = {
6217
6814
  distance: number;
6218
6815
  path: INode[];
@@ -6232,7 +6829,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
6232
6829
  accessible: boolean;
6233
6830
  get isMultiFloor(): boolean;
6234
6831
  get mapIdsInvolvedInJourney(): string[];
6235
- constructor(directions: MappedinDirections | MappedinDirections[], options: TJourneyOptions | undefined, mapView: MapView, mapManager: any);
6832
+ constructor(directions: MappedinDirections | MappedinDirections[], options: TJourneyOptions | undefined, mapView: MapView, core: ICore);
6236
6833
  setStep: (step: any) => void;
6237
6834
  static instance: Journey | null;
6238
6835
  static create(directions: MappedinDirections | MappedinDirections[], options: any, mapView: MapView, mapManager: any): Journey;
@@ -6862,6 +7459,32 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/bundle-asset-m
6862
7459
  }
6863
7460
  }
6864
7461
 
7462
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.Scene' {
7463
+ import { MappedinMap } from '@mappedin/react-native-sdk/core/packages/get-venue';
7464
+ import { ICore } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
7465
+ import MapObject from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.MapObject';
7466
+ import { TSceneTransitionOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.SceneManager';
7467
+ class MapViewScene {
7468
+ #private;
7469
+ maps: MappedinMap[];
7470
+ object: any;
7471
+ currentMap: MappedinMap;
7472
+ mapObjects: Map<MappedinMap['id'], MapObject>;
7473
+ constructor(maps: MappedinMap[], core: ICore);
7474
+ /**
7475
+ * Determine each maps position and rotation relative to the refernce map
7476
+ */
7477
+ determineMapPositionAndRotation(map: MappedinMap): {
7478
+ position: any[];
7479
+ scale: number[];
7480
+ rotation: number[];
7481
+ };
7482
+ /** Render scene */
7483
+ render(map: MappedinMap, transitionOptions?: TSceneTransitionOptions, isStartingScene?: boolean): Promise<void>;
7484
+ }
7485
+ export default MapViewScene;
7486
+ }
7487
+
6865
7488
  declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollisionEngine' {
6866
7489
  import { Vector3 } from 'three';
6867
7490
  import './Mappedin.SmartCollisionEngine.scss';
@@ -6890,6 +7513,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
6890
7513
  core: ICore;
6891
7514
  screen: Rectangle;
6892
7515
  constructor(mapView: any, core: ICore);
7516
+ beginUpdate(): void;
6893
7517
  init: (container: HTMLDivElement, projectFn: ({ position, mapId }: {
6894
7518
  position: any;
6895
7519
  mapId: MappedinMap['id'];
@@ -6945,3 +7569,191 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/quad-
6945
7569
  export { QuadTree, Rectangle };
6946
7570
  }
6947
7571
 
7572
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.MapObject' {
7573
+ export namespace TASK_PRIORITY {
7574
+ const VISIBLE_MAP_HIGH: number;
7575
+ const VISIBLE_MAP_LOW: number;
7576
+ const VISIBLE_MAP_MARKER: number;
7577
+ const ASYNC_MAP_HIGH: number;
7578
+ const ASYNC_MAP_LOW: number;
7579
+ const ASYNC_MAP_MARKER: number;
7580
+ const MAP_LOADED: number;
7581
+ }
7582
+ export const SCENE_FROM_LIVE_JSON: false;
7583
+ /**
7584
+ * A handle to a 3D marker added to a map.
7585
+ *
7586
+ * @class ThreeJSMarkerHandle
7587
+ */
7588
+ export class ThreeJSMarkerHandle {
7589
+ constructor({ mapId, object }: {
7590
+ mapId: any;
7591
+ object: any;
7592
+ });
7593
+ _mapId: any;
7594
+ _object: any;
7595
+ /**
7596
+ * Return the ThreeJS object associated with this marker, so that it
7597
+ * can be moved around, scaled, etc.
7598
+ *
7599
+ * @property {Object3D} object
7600
+ */
7601
+ get object(): any;
7602
+ _destroy(): void;
7603
+ }
7604
+ export default MapObject;
7605
+ class MapObject extends PubSub {
7606
+ constructor(mapClass: any, polygonMeshesById: any, showCount: any, core: any, loadOptions?: {});
7607
+ _flippableImagedById: {};
7608
+ _started: boolean;
7609
+ _loaderPromise: null;
7610
+ _promiseResolve: null;
7611
+ hoverableMeshChildren: any[];
7612
+ objectsDictionary: {};
7613
+ north: null;
7614
+ mapScale: null;
7615
+ object: any;
7616
+ labels: Set<any>;
7617
+ tooltips: Set<any>;
7618
+ markers: Set<any>;
7619
+ textObjects: any[];
7620
+ labelBatchCreator: null;
7621
+ imagesToFlip: any[];
7622
+ seenByCamera: boolean;
7623
+ threeJSMarkers: Map<any, any>;
7624
+ core: any;
7625
+ mapClass: any;
7626
+ polygonMeshesById: any;
7627
+ _showCount: any;
7628
+ loadMethod: string;
7629
+ loadAsync: any;
7630
+ _taskScheduler: any;
7631
+ id: any;
7632
+ mapRenderingStrategy: any;
7633
+ _highPriorityTasks: FrameTaskGroup;
7634
+ _lowPriorityTasks: FrameTaskGroup;
7635
+ _markerTasks: FrameTaskGroup;
7636
+ _mapLoadedTasks: FrameTaskGroup;
7637
+ _visibilityLatch: boolean | null;
7638
+ _objLoadedComplete: boolean;
7639
+ _objLoaded(object: any): any;
7640
+ _objLoadedMerged(object: any): Promise<any>;
7641
+ enableImageFlipping(polygonId: any, rotation: any): void;
7642
+ elements: any;
7643
+ boundingBox: {
7644
+ min: any;
7645
+ max: any;
7646
+ } | undefined;
7647
+ loadPolygonNow(polygonId: any): void;
7648
+ _addElementToScene(element: any): void;
7649
+ /** *
7650
+ Load the map, if it's not already loaded. Returns the old promise if it's already done, so you can safely call it whenever needed.
7651
+
7652
+ If needed, this could be modified to
7653
+
7654
+ Returns a Promise that will be Done when the OBJ, MTL and textures have been downloaded, and the objectsDictionary has been generated.
7655
+
7656
+ **/
7657
+ load(): null;
7658
+ loadMethodUsed: string | undefined;
7659
+ _dispose(objectToDispose: any): void;
7660
+ add(childObjectToAdd: any): void;
7661
+ getPositionLatLon(lat: any, lon: any): any;
7662
+ getMapScale(): null;
7663
+ getNorth(): null;
7664
+ disableAllImageFlipping(): void;
7665
+ get visible(): boolean;
7666
+ /**
7667
+ * Return true if this map has been loaded to the point where it can be
7668
+ * manipulated as a complete object. In synchronous mode, this requires all
7669
+ * loading tasks to be completed, but in async mode, only high-priority
7670
+ * tasks (adding polygons to the world) have to be completed.
7671
+ */
7672
+ isReady(): boolean;
7673
+ /**
7674
+ * Return true if this map has been loaded to the point where the only tasks
7675
+ * remaining are marker tasks.
7676
+ */
7677
+ isFullyLoaded(): boolean;
7678
+ /**
7679
+ * A function that should be called when the map is made visible, in order
7680
+ * to kick off its tasks.
7681
+ */
7682
+ onVisible(): void;
7683
+ /**
7684
+ * A function that should be called when the map is made invisible, in order
7685
+ * to postpone its tasks.
7686
+ */
7687
+ onInvisible(): void;
7688
+ /**
7689
+ * Queue a task on this map that will be executed when the high and low
7690
+ * priority tasks have been processed.
7691
+ */
7692
+ addPendingMarkerTask(marker: any, callback: any): void;
7693
+ /**
7694
+ * Queue a task on this map that must be completed before the map will be
7695
+ * considered `isReady` in synchronous loading mode.
7696
+ */
7697
+ addPendingLowPriorityTask(name: any, callback: any): void;
7698
+ /**
7699
+ * Queue a task on this map that will be queued when the map is loaded, or
7700
+ * immediately if the map has already been loaded.
7701
+ */
7702
+ addPendingMapLoadedTask(name: any, callback: any): void;
7703
+ /**
7704
+ * Queue a task on this map that must be completed before the map will be
7705
+ * considered `isReady`, and will be evaluated before any low-priority
7706
+ * tasks.
7707
+ */
7708
+ _addPendingHighPriorityTask(name: any, callback: any): void;
7709
+ /**
7710
+ * Add a ThreeJS marker to this map object. This should be called through
7711
+ * the `MapView3D`.
7712
+ *
7713
+ * @method addThreeJSMarker
7714
+ * @param {Object} options
7715
+ * @param {Object3D} [options.object] the marker object to add to the scene
7716
+ * @param {Vector3} [options.position=null] if provided, sets the object's position on the map
7717
+ * @param {Euler} [options.rotation=null] if provided, sets the object's rotation relative to the map
7718
+ * @param {Vector3} [options.scale=null] if provided, sets the object's scale relative to the map
7719
+ * @return {ThreeJSMarkerHandle} a unique identifier for the marker
7720
+ */
7721
+ addThreeJSMarker(options: {
7722
+ object?: any;
7723
+ position?: any;
7724
+ rotation?: any;
7725
+ scale?: any;
7726
+ }): ThreeJSMarkerHandle;
7727
+ /**
7728
+ * Remove the given `ThreeJSMarker` from this map.
7729
+ *
7730
+ * @method removeThreeJSMarker
7731
+ * @param {ThreeJSMarkerHandle} markerHandle the marker to remove
7732
+ * @return {boolean} true if the marker existed on the map and was removed;
7733
+ * false if the marker does not exist on the map
7734
+ */
7735
+ removeThreeJSMarker(markerHandle: ThreeJSMarkerHandle): boolean;
7736
+ /**
7737
+ * Remove all `ThreeJSMarker` from this map.
7738
+ *
7739
+ * @method removeThreeJSMarker
7740
+ */
7741
+ _removeThreeJSMarkers(): void;
7742
+ removeLabels(): void;
7743
+ /**
7744
+ * Called when a task group that may be required for map loading completes,
7745
+ * to see if all the relevant task groups have been completed.
7746
+ */
7747
+ _checkIfLoaded(): void;
7748
+ mapLoaded: any;
7749
+ /**
7750
+ * Called when the root ThreeJS object has been created, and child elements
7751
+ * may be added.
7752
+ */
7753
+ _onRootObjectCreated(): void;
7754
+ _popinChildObjects(): void;
7755
+ }
7756
+ import { PubSub } from "@mappedin/react-native-sdk/core/packages/renderer/internal/pub-sub";
7757
+ import { FrameTaskGroup } from "@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.TaskScheduler";
7758
+ }
7759
+