@mappedin/mappedin-js 4.0.15 → 4.0.18

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.
@@ -5,12 +5,13 @@
5
5
  // ../three/src/math/Vector3
6
6
  // ../@tweenjs/tween.js
7
7
  // ../three/src/math/Color
8
+ // ../geojson
8
9
 
9
10
  declare module '@mappedin/mappedin-js' {
10
11
  import Search from '@mappedin/mappedin-js/renderer/internal/Mappedin.Search';
11
12
  import Analytics from '@mappedin/mappedin-js/renderer/internal/Mappedin.Analytics';
12
13
  import { MapView } from '@mappedin/mappedin-js/renderer/MapView';
13
- import { getVenue, getVenueBundle, Mappedin, downloadBundle, getVenueBundleURL, MappedinDestinationSet, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions } from '@mappedin/mappedin-js/get-venue';
14
+ import { getVenue, getVenueBundle, Mappedin, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, MappedinDestinationSet, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions } 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, TJourneyOptions } from '@mappedin/mappedin-js/renderer/MapView.types';
16
17
  import { labelThemes } from '@mappedin/mappedin-js/renderer/MapView.types';
@@ -41,9 +42,9 @@ declare module '@mappedin/mappedin-js' {
41
42
  */
42
43
  function showVenue<T extends Mappedin>(el: HTMLElement, venue: T, options?: TMapViewOptions): Promise<MapView>;
43
44
  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 } from '@mappedin/mappedin-js/renderer/MapView.enums';
44
- export { Search, getVenue, getVenueBundle, showVenue, downloadBundle, getVenueBundleURL, PositionUpdater, Analytics, MappedinDestinationSet, MARKER_ANCHOR, labelThemes };
45
+ export { Search, getVenue, getVenueBundle, showVenue, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, PositionUpdater, Analytics, MappedinDestinationSet, MARKER_ANCHOR, labelThemes };
45
46
  import DefaultAssetManager from '@mappedin/mappedin-js/renderer/internal/Mappedin.AssetManager';
46
- const setAssetManager: (am: any) => void;
47
+ const setAssetManager: <T extends DefaultAssetManager>(am: T) => void;
47
48
  /**
48
49
  * @internal
49
50
  */
@@ -58,7 +59,7 @@ declare module '@mappedin/mappedin-js' {
58
59
  export type { TSafeAreaInsets, TFocusOnTargets, TFocusOnCameraOptions, TAnimatePositionOptions, TCameraAnimationOptions, TFocusOnOptions, default as Camera } from '@mappedin/mappedin-js/renderer/Camera';
59
60
  export { SAFE_AREA_INSET_TYPE, ANIMATION_TWEENS, CAMERA_EASING_MODE } from '@mappedin/mappedin-js/renderer/Camera';
60
61
  export type { TGetVenueOptions, MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinNavigatable, MappedinCoordinate, TShowVenueOptions } from '@mappedin/mappedin-js/get-venue';
61
- export { Mappedin, MappedinDirections } from '@mappedin/mappedin-js/get-venue';
62
+ export { Mappedin, MappedinDirections, MAP_RENDER_MODE } from '@mappedin/mappedin-js/get-venue';
62
63
  }
63
64
 
64
65
  declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.Search' {
@@ -444,7 +445,7 @@ declare module '@mappedin/mappedin-js/get-venue' {
444
445
  import type { TGetVenueOptions } from '@mappedin/mappedin-js/get-venue/Mappedin.types';
445
446
  import { Mappedin } from '@mappedin/mappedin-js/get-venue/Mappedin';
446
447
  /** Classes */
447
- export { Mappedin } from '@mappedin/mappedin-js/get-venue/Mappedin';
448
+ export { Mappedin, MappedinCollectionType } from '@mappedin/mappedin-js/get-venue/Mappedin';
448
449
  export { MappedinLocation } from '@mappedin/mappedin-js/get-venue/MappedinLocation';
449
450
  export { MappedinPolygon } from '@mappedin/mappedin-js/get-venue/MappedinPolygon';
450
451
  export { MappedinNode } from '@mappedin/mappedin-js/get-venue/MappedinNode';
@@ -467,6 +468,7 @@ declare module '@mappedin/mappedin-js/get-venue' {
467
468
  /** API data types */
468
469
  export type { TLocationType, TNode, TImage, TLogo, TGalleryImage, TPhone, TSocial, TColor, TVortex, TPicture, TOpeningHours, TSiblingGroup, TState, TCategory, TEvent, TGeoReference, TMap, TMapGroup, TBuilding, TLocation, TPolygon, TPolygonRanking, TVenue, TMappedinAPI } from '@mappedin/mappedin-js/get-venue/Mappedin.API.types';
469
470
  export type { TGetVenueOptions } from '@mappedin/mappedin-js/get-venue/Mappedin.types';
471
+ import { MAP_RENDER_MODE } from '@mappedin/mappedin-js/get-venue/Mappedin.types';
470
472
  export type TShowVenueOptions = {
471
473
  /**
472
474
  * Sets the initial background color of the map, including while loading.
@@ -478,14 +480,24 @@ declare module '@mappedin/mappedin-js/get-venue' {
478
480
  */
479
481
  backgroundAlpha?: number;
480
482
  /**
481
- * Whether or not to display labels initially
483
+ * Whether or not to display default styled Floating Labels initially
482
484
  */
483
485
  labelAllLocationsOnInit?: boolean;
484
486
  /**
485
487
  * The id of the first map to show on map load
486
488
  */
487
489
  firstMapId?: string;
490
+ loadOptions?: {
491
+ /**
492
+ * Set the map render strategy in order to optimize FPS
493
+ *
494
+ * @beta
495
+ */
496
+ mapRenderStrategy?: MAP_RENDER_MODE;
497
+ };
488
498
  };
499
+ export { MAP_RENDER_MODE };
500
+ export function getVenueMVF(userOptions: TGetVenueOptions): Promise<Mappedin>;
489
501
  /**
490
502
  * Get Venue Data for a Mappedin Venue
491
503
  */
@@ -522,6 +534,23 @@ declare module '@mappedin/mappedin-js/get-venue' {
522
534
  url: any;
523
535
  updated_at: any;
524
536
  }): Promise<Mappedin>;
537
+ /**
538
+ * Get the bundle URL and updated_at time.
539
+ * @internal
540
+ */
541
+ export function getVenueMVFURL(userOptions: TGetVenueBundleOptions): Promise<{
542
+ url: string;
543
+ updated_at: string;
544
+ }>;
545
+ /**
546
+ * @internal
547
+ */
548
+ export function downloadVenueBundleMVF(options: TGetVenueOptions,
549
+ /**
550
+ * use Web Workers to speed up MVF parsing. This is likely only benefitial for larger venues,
551
+ * and may be determental to smaller ones, hence it is off by default
552
+ */
553
+ useWorker?: boolean): Promise<unknown>;
525
554
  }
526
555
 
527
556
  declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core' {
@@ -647,19 +676,19 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedi
647
676
  }
648
677
  export type TBlueDotPositionUpdate = {
649
678
  /**
650
- * What Map is Blue Dot on
679
+ * The {@link MappedinMap} Blue Dot position is on
651
680
  */
652
681
  map?: MappedinMap;
653
682
  /**
654
- * The nearest Node to the BlueDot
683
+ * The nearest {@link MappedinNode} to the Blue Dot position
655
684
  */
656
685
  nearestNode?: MappedinNode;
657
686
  /**
658
- * Actual position of BlueDot (post smoothing, if smoothing is on)
687
+ * Actual position of Blue Dot (post smoothing, if smoothing is enabled)
659
688
  */
660
689
  position?: TGeolocationObject;
661
690
  /**
662
- * Current BlueDot bearing
691
+ * Current Blue Dot bearing
663
692
  */
664
693
  bearing?: number;
665
694
  };
@@ -669,11 +698,11 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedi
669
698
  */
670
699
  name: E_BLUEDOT_STATE;
671
700
  /**
672
- * Visiblity State of the BlueDot marker
701
+ * Visiblity state of the Blue Dot marker
673
702
  */
674
703
  markerVisibility?: E_BLUEDOT_MARKER_STATE;
675
704
  /**
676
- * Reason why BlueDot may be in the current state
705
+ * Reason why Blue Dot may be in the current state
677
706
  */
678
707
  reason?: E_BLUEDOT_STATE_REASON;
679
708
  /**
@@ -702,7 +731,7 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
702
731
  import { TBlueDotPositionUpdate, TBlueDotStateChange } from '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
703
732
  import { TOOLTIP_ANCHOR } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartTooltip';
704
733
  import type { Euler, Object3D, Vector3 } from 'three';
705
- import { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT } from '@mappedin/mappedin-js/renderer/MapView.enums';
734
+ import { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT, MAP_RENDER_MODE } from '@mappedin/mappedin-js/renderer/MapView.enums';
706
735
  export type { TEnableBlueDotOptions, TFloatingLabelAppearance };
707
736
  /**
708
737
  An extension of the GeolocationPosition type.
@@ -972,19 +1001,27 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
972
1001
  scale?: Vector3;
973
1002
  };
974
1003
  export type TMapViewOptions = {
1004
+ /**
1005
+ * Background color of the map in hex number or string e.g. `0x2e2e2e` or `#2e2e2e`.
1006
+ */
975
1007
  backgroundColor?: number | string;
976
1008
  /**
977
1009
  * The opacity of the initial background color.
978
1010
  */
979
1011
  backgroundAlpha?: number;
980
1012
  /**
981
- * Controls whether antialiasing is on. Defaults to true, as long as devicePixelRatio is 1. This is very expensive on high resolution screens.
1013
+ * Controls whether antialiasing is on. Defaults to `true`, as long as devicePixelRatio is 1. This is very expensive on high resolution screens.
982
1014
  * @default true
983
1015
  */
984
1016
  antialias?: boolean;
985
1017
  disableHover?: boolean;
986
1018
  disableZoomOnMapSizeChange?: boolean;
987
1019
  loadOptions?: {
1020
+ /**
1021
+ * By default, the SDK will merge all geometries by material to reduce the number of draw calls to the GPU
1022
+ * To rever back to using a single geometry for every polygon, pass `MAP_RENDER_MODE.MULTI_GEOMETRY`
1023
+ */
1024
+ mapRenderStrategy?: MAP_RENDER_MODE;
988
1025
  async?: boolean;
989
1026
  zoomOverrides?: {
990
1027
  zoomMultiplier?: number;
@@ -993,7 +1030,7 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
993
1030
  };
994
1031
  };
995
1032
  /**
996
- * What map should the SDK initialize to?
1033
+ * First map to be rendered
997
1034
  */
998
1035
  firstMap?: MappedinMap | string;
999
1036
  /**
@@ -1012,6 +1049,9 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
1012
1049
  onWebGLRendererError?: () => void;
1013
1050
  };
1014
1051
  export type TMapViewOptionsLegacy = {
1052
+ /**
1053
+ * Background color of the map in hex number or string e.g. `0x2e2e2e` or `#2e2e2e`.
1054
+ */
1015
1055
  backgroundColor?: number | string;
1016
1056
  /**
1017
1057
  * The opacity of the initial background color.
@@ -1045,7 +1085,7 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
1045
1085
  };
1046
1086
  };
1047
1087
  /**
1048
- * What map should the SDK initialize to?
1088
+ * First map to be rendered
1049
1089
  */
1050
1090
  firstMap?: MappedinMap | string;
1051
1091
  /**
@@ -1115,21 +1155,21 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
1115
1155
  */
1116
1156
  height?: number;
1117
1157
  /**
1118
- * The amount of space to leave before starting the text
1158
+ * The amount of space to leave before starting the text in pixels
1119
1159
  * @default 5
1120
1160
  */
1121
1161
  margin?: number;
1122
1162
  /**
1123
- * A optional color
1163
+ * Optional color in hexadecimal string e.g. `#2e2e2e`.
1124
1164
  */
1125
1165
  color?: string;
1126
1166
  /**
1127
- * How big to make the font. Defaults to 12
1167
+ * Size of the font in pixels.
1128
1168
  * @default 12
1129
1169
  */
1130
1170
  fontSize?: number;
1131
1171
  /**
1132
- * A CSS style string font. ie "sans-serif". You can specify your own font via @font-face rule with a font family, and then include that here.
1172
+ * A CSS style string font, e.g. "sans-serif". You can specify your own font via @font-face rule with a font family, and then include that here.
1133
1173
  */
1134
1174
  font?: string;
1135
1175
  /**
@@ -1138,7 +1178,7 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
1138
1178
  */
1139
1179
  scaleMin?: number;
1140
1180
  /**
1141
- * How much to decrement the scale each time it doesn't fit, so we don't end up with too many different font sizes on screen at once. If * you are only labeling a few Polygons rather than everything,
1181
+ * How much to decrement the scale each time it doesn't fit, so we don't end up with too many different font sizes on screen at once. If you are only labeling a few {@link MappedinPolygon}s rather than everything,
1142
1182
  * you can set this and and scaleMin to 0.1 to fit everything except really long names perfectly.
1143
1183
  * @default 0.25
1144
1184
  */
@@ -1148,7 +1188,7 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
1148
1188
  scale?: number;
1149
1189
  flatLabels?: false | undefined;
1150
1190
  /**
1151
- * Custom Rank - this determines how likely a Floating Label will appear
1191
+ * Ranking tier to determine how likely a {@link FloatingLabel} will appear
1152
1192
  */
1153
1193
  rank?: COLLISION_RANKING_TIERS | number;
1154
1194
  /**
@@ -1183,7 +1223,7 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
1183
1223
  [key in string]: string;
1184
1224
  };
1185
1225
  /**
1186
- * Display label despite the polygon having an image on it
1226
+ * Display label despite the {@link MappedinPolygon} having an image on it. Often these images represent store logos.
1187
1227
  * @default false
1188
1228
  */
1189
1229
  createDespiteImage?: boolean;
@@ -1218,7 +1258,7 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
1218
1258
  longitude: number;
1219
1259
  };
1220
1260
  /**
1221
- * A list of MappedinPolygons corresponding to every polygon that a user's
1261
+ * A list of {@link MappedinPolygon}s corresponding to every polygon that a user's
1222
1262
  * click passed through. These are in order of first to last intersected.
1223
1263
  * Will be empty if no interactive polygons were clicked.
1224
1264
  */
@@ -1317,6 +1357,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.Marker' {
1317
1357
  get strategies(): TColliderStrategy[];
1318
1358
  colliderDidMount(): void;
1319
1359
  setAction(action: any): void;
1360
+ colliderDidNotFindAHome(): void;
1320
1361
  colliderDidGoOffscreen(): void;
1321
1362
  colliderDidUpdateVisiblity(): void;
1322
1363
  }
@@ -1362,30 +1403,30 @@ declare module '@mappedin/mappedin-js/renderer/MapView.enums' {
1362
1403
  CUSTOM_GEOLOCATION_PROVIDER_ERROR = 3
1363
1404
  }
1364
1405
  /**
1365
- What we currently know about the user's position, and how confident we are.
1406
+ What we currently know about the user's position and how confident we are.
1366
1407
  */
1367
1408
  export enum E_BLUEDOT_STATE {
1368
1409
  /**
1369
- * We haven't started listening to position updates
1410
+ * Not listening to Blue Dot position updates
1370
1411
  */
1371
1412
  NOT_LISTENING = 0,
1372
1413
  /**
1373
- * We have started listening to position updates
1414
+ * Listenign for listening to position updates but have not yet received a position
1374
1415
  */
1375
1416
  LISTENING = 1,
1376
1417
  /**
1377
- * We've received relevant positions, and user is inside the venue
1418
+ * Received relevant positions and user is in the venue
1378
1419
  */
1379
1420
  HAS_POSITION = 2,
1380
1421
  /**
1381
1422
  * We've received a relevant position, and we have enough information to determine
1382
1423
  * which floor the user is on - either because we received a floor level, the venue
1383
- * only has one floor, or we're allowing implicit floor level.
1424
+ * only has one floor or we're allowing implicit floor level detection.
1384
1425
  */
1385
1426
  HAS_INDOOR_POSITION = 3,
1386
1427
  /**
1387
1428
  * We are uncertain about the user's position, likely because we haven't received
1388
- * a relevant position in a while
1429
+ * a relevant position in a while. Blue Dot will be rendered grey to indicate uncertainty of the actual position.
1389
1430
  */
1390
1431
  LOCATION_UNCERTAIN = 4
1391
1432
  }
@@ -1394,26 +1435,29 @@ declare module '@mappedin/mappedin-js/renderer/MapView.enums' {
1394
1435
  */
1395
1436
  export enum E_BLUEDOT_MARKER_STATE {
1396
1437
  /**
1397
- * BlueDot is hidden
1438
+ * Blue Dot is hidden
1398
1439
  */
1399
1440
  HIDDEN = 0,
1400
1441
  /**
1401
- * BlueDot is transparent
1442
+ * Blue Dot is transparent indicating the position is on a different floor
1402
1443
  */
1403
1444
  GHOST = 1,
1404
1445
  /**
1405
- * BlueDot is visible and opaque
1446
+ * Blue Dot is visible and opaque indicating accurate positioning on the current floor
1406
1447
  */
1407
1448
  NORMAL = 2,
1408
1449
  /**
1409
- * BlueDot is grayed out
1450
+ * Blue Dot is grayed out due to uncertainty about user's location, most likely due to not receiving recent position updates.
1410
1451
  */
1411
1452
  UNCERTAIN = 3
1412
1453
  }
1413
1454
  export enum STATE {
1455
+ /**
1456
+ * The map is in exploration mode where the user controls the camera position.
1457
+ */
1414
1458
  EXPLORE = "explore",
1415
1459
  /**
1416
- * FOLLOW state follows user's current location (BlueDot)
1460
+ * Follows user's current location by keeping the camera centered on the Blue Dot.
1417
1461
  */
1418
1462
  FOLLOW = "follow"
1419
1463
  /**
@@ -1429,19 +1473,19 @@ declare module '@mappedin/mappedin-js/renderer/MapView.enums' {
1429
1473
  }
1430
1474
  export enum E_SDK_EVENT {
1431
1475
  /**
1432
- * Emitted when the map is clicked
1476
+ * Emitted when the map is clicked or tapped on a touch screen.
1433
1477
  */
1434
1478
  CLICK = "CLICK",
1435
1479
  /**
1436
- * Emitted when the {@link STATE | SDK state} changes
1480
+ * Emitted when the {@link STATE | SDK state} changes.
1437
1481
  */
1438
1482
  STATE_CHANGE = "STATE_CHANGE",
1439
1483
  /**
1440
- * Emitted when a polygon is clicked
1484
+ * Emitted when an interactive {@link MappedinPolygon | polygon} is clicked
1441
1485
  */
1442
1486
  POLYGON_CLICKED = "POLYGON_CLICKED",
1443
1487
  /**
1444
- * Emitted when nothing is clicked
1488
+ * Emitted when nothing (outside of interactive polygons) is clicked
1445
1489
  */
1446
1490
  NOTHING_CLICKED = "NOTHING_CLICKED",
1447
1491
  /**
@@ -1462,15 +1506,16 @@ declare module '@mappedin/mappedin-js/renderer/MapView.enums' {
1462
1506
  ROTATION_CHANGED = "ROTATION_CHANGED",
1463
1507
  TILT_CHANGED = "TILT_CHANGED"
1464
1508
  }
1509
+ export { MAP_RENDER_MODE } from '@mappedin/mappedin-js/get-venue';
1465
1510
  }
1466
1511
 
1467
1512
  declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.AssetManager' {
1468
- import { TextureLoader } from 'three';
1513
+ import { Texture, TextureLoader } from 'three';
1469
1514
  import type { MappedinMap } from '@mappedin/mappedin-js/renderer';
1470
1515
  export default class DefaultAssetManager {
1471
1516
  textureLoader: TextureLoader;
1472
1517
  loadMapPolygons(map: MappedinMap): Promise<any>;
1473
- loadImage(url: string): Promise<unknown>;
1518
+ loadImage(url: string): Promise<Texture>;
1474
1519
  }
1475
1520
  }
1476
1521
 
@@ -1677,11 +1722,10 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.FloatingLabel'
1677
1722
  clearColor: () => void;
1678
1723
  zoomProportion: number;
1679
1724
  _cache: {};
1680
- _dirty: boolean;
1681
1725
  appearance: TAppearanceFilledIn;
1682
1726
  mapView: ICore;
1683
1727
  constructor(options: TFloatingLabelOptionsInternal, mapView: ICore);
1684
- enable(): void;
1728
+ enable(updateEngine?: boolean): void;
1685
1729
  get strategies(): TColliderStrategy[];
1686
1730
  getCachedSymbol(orientation: any, textAlign: any, xCoordinate: any): any;
1687
1731
  colliderDidMount(): void;
@@ -1690,7 +1734,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.FloatingLabel'
1690
1734
  colliderDidUpdateVisiblity(): void;
1691
1735
  colliderDidGoOutsideGrid(): void;
1692
1736
  colliderDidNotFindAHome(): void;
1693
- disable(): void;
1737
+ disable(updateEngine?: boolean): void;
1694
1738
  draw(context: CanvasRenderingContext2D): void;
1695
1739
  static original: FloatingLabel;
1696
1740
  static clone(options: TFloatingLabelOptionsInternal, mapView: ICore): any;
@@ -1747,6 +1791,9 @@ declare module '@mappedin/mappedin-js/renderer/Camera' {
1747
1791
  EASE_IN_OUT = "ease-in-out"
1748
1792
  }
1749
1793
  export type TCameraAnimationOptions = {
1794
+ /**
1795
+ * Animation duration in milliseconds
1796
+ */
1750
1797
  duration?: number;
1751
1798
  easing?: CAMERA_EASING_MODE;
1752
1799
  };
@@ -1783,27 +1830,27 @@ declare module '@mappedin/mappedin-js/renderer/Camera' {
1783
1830
  */
1784
1831
  get zoom(): number;
1785
1832
  /**
1786
- * Current Camera rotation (in radians)
1833
+ * Current Camera rotation (in radians) from north
1787
1834
  */
1788
1835
  get rotation(): number;
1789
1836
  /**
1790
- * Current Camera tilt
1837
+ * Current Camera tilt between 0 (top-down) to 1 (from the side)
1791
1838
  */
1792
1839
  get tilt(): number;
1793
1840
  /**
1794
- * Minimum distance (in meters) the camera is allowed to get to the ground.
1841
+ * Get the minimum distance (in meters) the camera is allowed to get to the ground.
1795
1842
  */
1796
1843
  get minZoom(): number;
1797
1844
  /**
1798
- * Minimum distance (in meters) the camera is allowed to get to the ground.
1845
+ * Set the minimum distance (in meters) the camera is allowed to get to the ground.
1799
1846
  */
1800
1847
  set minZoom(meters: number);
1801
1848
  /**
1802
- * Maximum distance (in meters) the camera is allowed to get to the ground.
1849
+ * Get the maximum distance (in meters) the camera is allowed to get from the ground.
1803
1850
  */
1804
1851
  get maxZoom(): number;
1805
1852
  /**
1806
- * Maximum distance (in meters) the camera is allowed to get to the ground.
1853
+ * Set the maximum distance (in meters) the camera is allowed to get from the ground.
1807
1854
  */
1808
1855
  set maxZoom(meters: number);
1809
1856
  setSafeAreaInsets(insets: {
@@ -1814,7 +1861,7 @@ declare module '@mappedin/mappedin-js/renderer/Camera' {
1814
1861
  }): void;
1815
1862
  getSafeAreaInsets(): any;
1816
1863
  /**
1817
- * Determine a new Camera view state based on a collection of targets, and start animating to that state.
1864
+ * Focus the Camera view on a collection of targets and animate to that state.
1818
1865
  * @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled.
1819
1866
  */
1820
1867
  focusOn(options: TFocusOnOptions): Promise<any>;
@@ -1824,7 +1871,6 @@ declare module '@mappedin/mappedin-js/renderer/Camera' {
1824
1871
  set(positionOptions?: TAnimatePositionOptions): void;
1825
1872
  /**
1826
1873
  * Animate the Camera's view to smoothly transition to a new state over time.
1827
- * Returns a promise that resolves when the animation completes and gets rejected if the animation is cancelled.
1828
1874
  *
1829
1875
  * @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled.
1830
1876
  */
@@ -1948,6 +1994,9 @@ declare module '@mappedin/mappedin-js/renderer/layers/BlueDot' {
1948
1994
  import { TEnableBlueDotOptions } from '@mappedin/mappedin-js/renderer/MapView.types';
1949
1995
  import { PubSub } from '@mappedin/mappedin-js/renderer/internal/pub-sub.typed';
1950
1996
  import EventSystemLayer from '@mappedin/mappedin-js/renderer/layers/EventSystem';
1997
+ /**
1998
+ * Blue Dot Layer used for controlling the Blue Dot and listening to Blue Dot state change and position update events. Use the {@link on}-method to set listeners for {@link TBlueDotStateChange} and {@link TBlueDotPositionUpdate} events.
1999
+ */
1951
2000
  class BlueDotLayer extends PubSub<E_BLUEDOT_EVENT_PAYLOAD, E_BLUEDOT_EVENT> {
1952
2001
  #private;
1953
2002
  /**
@@ -1959,7 +2008,7 @@ declare module '@mappedin/mappedin-js/renderer/layers/BlueDot' {
1959
2008
  */
1960
2009
  enable(options?: TEnableBlueDotOptions): void;
1961
2010
  /**
1962
- * Disable BlueDot
2011
+ * Disables Blue Dot and stops emitting events.
1963
2012
  */
1964
2013
  disable(): void;
1965
2014
  }
@@ -1978,7 +2027,17 @@ declare module '@mappedin/mappedin-js/renderer/layers/Journey' {
1978
2027
  */
1979
2028
  constructor(mapView: MapView, core: ICore);
1980
2029
  /**
1981
- * Draw a Journey
2030
+ * Draw a Journey based on directions. Example usage:
2031
+ *
2032
+ * ```typescript
2033
+ * const startLocation = venue.locations.find(location => location.name === "Cleo");
2034
+ * const endLocation = venue.locations.find(location => location.name === "American Eagle");
2035
+ *
2036
+ * const directions = startLocation.directionsTo(endLocation);
2037
+ * mapView.Journey.draw(directions);
2038
+ * ```
2039
+ *
2040
+ * Use options to set connection (such as elevators and escalators) HTML tooltip template, departure and destination marker templates, path style and polygon higlight color. If no options are set, sane defaults are used to draw markers, tooltips and polygon highlights.
1982
2041
  */
1983
2042
  draw(directions: MappedinDirections | MappedinDirections[], options?: TJourneyOptions): Journey;
1984
2043
  /**
@@ -2023,6 +2082,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.MapObject' {
2023
2082
  _started: boolean;
2024
2083
  _loaderPromise: null;
2025
2084
  _promiseResolve: null;
2085
+ hoverableMeshChildren: any[];
2026
2086
  objectsDictionary: {};
2027
2087
  north: null;
2028
2088
  mapScale: null;
@@ -2043,6 +2103,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.MapObject' {
2043
2103
  loadAsync: any;
2044
2104
  _taskScheduler: any;
2045
2105
  id: any;
2106
+ mapRenderingStrategy: any;
2046
2107
  _highPriorityTasks: FrameTaskGroup;
2047
2108
  _lowPriorityTasks: FrameTaskGroup;
2048
2109
  _markerTasks: FrameTaskGroup;
@@ -2050,6 +2111,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.MapObject' {
2050
2111
  _visibilityLatch: boolean | null;
2051
2112
  _objLoadedComplete: boolean;
2052
2113
  _objLoaded(object: any): any;
2114
+ _objLoadedMerged(object: any): void;
2053
2115
  enableImageFlipping(polygonId: any, rotation: any): void;
2054
2116
  elements: any;
2055
2117
  boundingBox: {
@@ -2175,7 +2237,7 @@ declare module '@mappedin/mappedin-js/renderer' {
2175
2237
  import Search from '@mappedin/mappedin-js/renderer/internal/Mappedin.Search';
2176
2238
  import Analytics from '@mappedin/mappedin-js/renderer/internal/Mappedin.Analytics';
2177
2239
  import { MapView } from '@mappedin/mappedin-js/renderer/MapView';
2178
- import { getVenue, getVenueBundle, Mappedin, downloadBundle, getVenueBundleURL, MappedinDestinationSet, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions } from '@mappedin/mappedin-js/get-venue';
2240
+ import { getVenue, getVenueBundle, Mappedin, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, MappedinDestinationSet, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions } from '@mappedin/mappedin-js/get-venue';
2179
2241
  import { PositionUpdater } from '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
2180
2242
  import type { TMapViewOptions, TJourneyOptions } from '@mappedin/mappedin-js/renderer/MapView.types';
2181
2243
  import { labelThemes } from '@mappedin/mappedin-js/renderer/MapView.types';
@@ -2206,9 +2268,9 @@ declare module '@mappedin/mappedin-js/renderer' {
2206
2268
  */
2207
2269
  function showVenue<T extends Mappedin>(el: HTMLElement, venue: T, options?: TMapViewOptions): Promise<MapView>;
2208
2270
  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 } from '@mappedin/mappedin-js/renderer/MapView.enums';
2209
- export { Search, getVenue, getVenueBundle, showVenue, downloadBundle, getVenueBundleURL, PositionUpdater, Analytics, MappedinDestinationSet, MARKER_ANCHOR, labelThemes };
2271
+ export { Search, getVenue, getVenueBundle, showVenue, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, PositionUpdater, Analytics, MappedinDestinationSet, MARKER_ANCHOR, labelThemes };
2210
2272
  import DefaultAssetManager from '@mappedin/mappedin-js/renderer/internal/Mappedin.AssetManager';
2211
- const setAssetManager: (am: any) => void;
2273
+ const setAssetManager: <T extends DefaultAssetManager>(am: T) => void;
2212
2274
  /**
2213
2275
  * @internal
2214
2276
  */
@@ -2223,43 +2285,54 @@ declare module '@mappedin/mappedin-js/renderer' {
2223
2285
  export type { TSafeAreaInsets, TFocusOnTargets, TFocusOnCameraOptions, TAnimatePositionOptions, TCameraAnimationOptions, TFocusOnOptions, default as Camera } from '@mappedin/mappedin-js/renderer/Camera';
2224
2286
  export { SAFE_AREA_INSET_TYPE, ANIMATION_TWEENS, CAMERA_EASING_MODE } from '@mappedin/mappedin-js/renderer/Camera';
2225
2287
  export type { TGetVenueOptions, MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinNavigatable, MappedinCoordinate, TShowVenueOptions } from '@mappedin/mappedin-js/get-venue';
2226
- export { Mappedin, MappedinDirections } from '@mappedin/mappedin-js/get-venue';
2288
+ export { Mappedin, MappedinDirections, MAP_RENDER_MODE } from '@mappedin/mappedin-js/get-venue';
2227
2289
  }
2228
2290
 
2229
2291
  declare module '@mappedin/mappedin-js/get-venue/Mappedin.types' {
2230
2292
  export type TGetVenueOptions = {
2231
- accessToken?: string;
2232
- clientId?: string;
2233
- clientSecret?: string;
2234
- baseUrl?: string;
2235
- includeHidden?: boolean;
2236
- noAuth?: boolean;
2237
- perspective?: string;
2238
- language?: string;
2239
- headers?: {
2240
- [key in string]: string;
2241
- };
2242
- venue: string;
2243
- things?: any;
2293
+ accessToken?: string;
2294
+ clientId?: string;
2295
+ clientSecret?: string;
2296
+ baseUrl?: string;
2297
+ includeHidden?: boolean;
2298
+ noAuth?: boolean;
2299
+ perspective?: string;
2300
+ language?: string;
2301
+ headers?: {
2302
+ [key in string]: string;
2303
+ };
2304
+ venue: string;
2305
+ things?: any;
2244
2306
  };
2245
2307
  export type TGetVenueOptionsInternal = {
2246
- baseUrl?: string;
2247
- supplementaryUrl?: string;
2248
- noAuth?: boolean;
2249
- includeHidden?: boolean;
2250
- apiGateway?: string;
2251
- authorization?: string;
2252
- /**
2253
- * @deprecated 2D support will be removed in the future
2254
- */
2255
- do2D?: boolean;
2256
- things?: any;
2257
- headers?: any;
2308
+ baseUrl?: string;
2309
+ supplementaryUrl?: string;
2310
+ noAuth?: boolean;
2311
+ includeHidden?: boolean;
2312
+ apiGateway?: string;
2313
+ authorization?: string;
2314
+ /**
2315
+ * @deprecated 2D support will be removed in the future
2316
+ */
2317
+ do2D?: boolean;
2318
+ things?: any;
2319
+ headers?: any;
2258
2320
  };
2321
+ export enum MAP_RENDER_MODE {
2322
+ /** Each polygon, its geometry and mesh are sent to the GPU every render frame.
2323
+ * This was the default rendering mode before 4.0.17
2324
+ */
2325
+ MULTI_GEOMETRY = "MULTI_GEOMETRY",
2326
+ /** Polygons' geometries are grouped by material and merged together, resulting in far fewer
2327
+ * draw calls to the GPU. Default rendering mode since 4.0.17
2328
+ */
2329
+ SINGLE_GEOMETRY = "SINGLE_GEOMETRY"
2330
+ }
2259
2331
  }
2260
2332
 
2261
2333
  declare module '@mappedin/mappedin-js/get-venue/Mappedin' {
2262
2334
  import { Navigator } from '@mappedin/mappedin-js/navigator';
2335
+ import { MVFData } from '@mappedin/mappedin-js/get-venue/Mappedin.MVF.types';
2263
2336
  import type { TGetVenueOptions, TGetVenueOptionsInternal } from '@mappedin/mappedin-js/get-venue/Mappedin.types';
2264
2337
  import { MappedinCategory } from '@mappedin/mappedin-js/get-venue/MappedinCategory';
2265
2338
  import { MappedinEvent } from '@mappedin/mappedin-js/get-venue/MappedinEvent';
@@ -2275,7 +2348,7 @@ declare module '@mappedin/mappedin-js/get-venue/Mappedin' {
2275
2348
  import { MappedinVenue } from '@mappedin/mappedin-js/get-venue/MappedinVenue';
2276
2349
  import { MappedinVortex } from '@mappedin/mappedin-js/get-venue/MappedinVortex';
2277
2350
  export const defaultOptions: TGetVenueOptionsInternal & TGetVenueOptions;
2278
- export enum CollectionType {
2351
+ export enum MappedinCollectionType {
2279
2352
  CATEGORY = "categories",
2280
2353
  EVENT = "events",
2281
2354
  LOCATION = "locations",
@@ -2286,14 +2359,14 @@ declare module '@mappedin/mappedin-js/get-venue/Mappedin' {
2286
2359
  VORTEX = "vortexes"
2287
2360
  }
2288
2361
  type TAccessors = {
2289
- [CollectionType.CATEGORY]: MappedinCategory;
2290
- [CollectionType.EVENT]: MappedinEvent;
2291
- [CollectionType.LOCATION]: MappedinLocation;
2292
- [CollectionType.MAPGROUP]: MappedinMapGroup;
2293
- [CollectionType.MAP]: MappedinMap;
2294
- [CollectionType.NODE]: MappedinNode;
2295
- [CollectionType.POLYGON]: MappedinPolygon;
2296
- [CollectionType.VORTEX]: MappedinVortex;
2362
+ [MappedinCollectionType.CATEGORY]: MappedinCategory;
2363
+ [MappedinCollectionType.EVENT]: MappedinEvent;
2364
+ [MappedinCollectionType.LOCATION]: MappedinLocation;
2365
+ [MappedinCollectionType.MAPGROUP]: MappedinMapGroup;
2366
+ [MappedinCollectionType.MAP]: MappedinMap;
2367
+ [MappedinCollectionType.NODE]: MappedinNode;
2368
+ [MappedinCollectionType.POLYGON]: MappedinPolygon;
2369
+ [MappedinCollectionType.VORTEX]: MappedinVortex;
2297
2370
  };
2298
2371
  const THINGS: {
2299
2372
  categories: typeof MappedinCategory;
@@ -2489,6 +2562,11 @@ declare module '@mappedin/mappedin-js/get-venue/Mappedin' {
2489
2562
  [id: string]: MappedinRankings;
2490
2563
  };
2491
2564
  getCollectionItemById<T extends keyof TAccessors, I extends string>(name: T, id: I): TAccessors[T] | null;
2565
+ /**
2566
+ * @hidden
2567
+ * @internal
2568
+ */
2569
+ hydrateFromMVF(mvfData: MVFData): Promise<undefined>;
2492
2570
  /**
2493
2571
  *
2494
2572
  * [experimental] Hydrate the Mappedin instance using a response from either {@link IMappedin.toString()}, {@link getVenueBundle} or by downloading the bundle manually
@@ -2623,6 +2701,59 @@ declare module '@mappedin/mappedin-js/get-venue/MappedinPolygon' {
2623
2701
  export class MappedinPolygon extends MappedinNavigatable {
2624
2702
  #private;
2625
2703
  geometry: any;
2704
+ image?: {
2705
+ visible: boolean;
2706
+ url: string | Blob;
2707
+ original: string | Blob;
2708
+ useLocalScaling: boolean;
2709
+ viewBox: {
2710
+ width: number;
2711
+ height: number;
2712
+ };
2713
+ scale: {
2714
+ x: number;
2715
+ y: number;
2716
+ };
2717
+ fitToBounds: boolean;
2718
+ position: {
2719
+ x: number;
2720
+ y: number;
2721
+ z: number;
2722
+ };
2723
+ rotation: {
2724
+ x: number;
2725
+ y: number;
2726
+ z: number;
2727
+ };
2728
+ };
2729
+ holes?: unknown[];
2730
+ textures?: {
2731
+ image: any;
2732
+ name: 'front' | 'side';
2733
+ useFrontFaceImage?: boolean;
2734
+ }[];
2735
+ material: {
2736
+ color: string;
2737
+ opacity?: number;
2738
+ };
2739
+ label?: {
2740
+ visible: boolean;
2741
+ text: string;
2742
+ align: string;
2743
+ position: {
2744
+ x: number;
2745
+ y: number;
2746
+ z: number;
2747
+ };
2748
+ rotation: {
2749
+ x: number;
2750
+ y: number;
2751
+ z: number;
2752
+ };
2753
+ fontFamily: string;
2754
+ fontSize: number;
2755
+ color: string;
2756
+ };
2626
2757
  /**
2627
2758
  * Node ID.
2628
2759
  *
@@ -2809,6 +2940,7 @@ declare module '@mappedin/mappedin-js/get-venue/MappedinMap' {
2809
2940
  import type { TGeoReference } from '@mappedin/mappedin-js/get-venue/Mappedin.API.types';
2810
2941
  import type { MappedinMapGroup } from '@mappedin/mappedin-js/get-venue/MappedinMapGroup';
2811
2942
  import { MappedinCoordinate } from '@mappedin/mappedin-js/get-venue/MappedinCoordinate';
2943
+ import { MappedinLocation } from '@mappedin/mappedin-js/get-venue';
2812
2944
  /**
2813
2945
  * A {@link MappedinMap} belonging to a specific {@link MappedinVenue}. Typically represents a certain floor. Give this to a {@link MapView} to display to the user.
2814
2946
  *
@@ -2835,6 +2967,11 @@ declare module '@mappedin/mappedin-js/get-venue/MappedinMap' {
2835
2967
  shortName: string;
2836
2968
  elevation: number;
2837
2969
  scale?: number;
2970
+ layers: {
2971
+ visible: boolean;
2972
+ name: string;
2973
+ id: string;
2974
+ }[];
2838
2975
  x_scale?: number;
2839
2976
  perspectiveId?: string;
2840
2977
  scene: any;
@@ -2849,6 +2986,11 @@ declare module '@mappedin/mappedin-js/get-venue/MappedinMap' {
2849
2986
  * @property polygons {[MappedinPolygon]}
2850
2987
  */
2851
2988
  get polygons(): MappedinPolygon[] | undefined;
2989
+ /**
2990
+ * Locations on this map
2991
+ */
2992
+ get locations(): MappedinLocation[];
2993
+ get nodes(): import("./MappedinNode").MappedinNode[];
2852
2994
  /**
2853
2995
  * Map Group this map belongs to.
2854
2996
  *
@@ -2886,28 +3028,56 @@ declare module '@mappedin/mappedin-js/get-venue/MappedinEvent' {
2886
3028
  import type { Mappedin } from '@mappedin/mappedin-js/get-venue/Mappedin';
2887
3029
  import type { MappedinLocation } from '@mappedin/mappedin-js/get-venue/MappedinLocation';
2888
3030
  /**
2889
- * An event.
3031
+ * An event such as a promotion attached to a location in a venue for a period of time. Events can be created in the Mappedin CMS.
2890
3032
  *
2891
3033
  * @class MappedinEvent
2892
3034
  */
2893
3035
  export class MappedinEvent {
2894
3036
  #private;
3037
+ /**
3038
+ * Unique id string of the event.
3039
+ */
2895
3040
  id: string;
2896
3041
  type: string;
3042
+ /**
3043
+ * Event name
3044
+ */
2897
3045
  name: string;
3046
+ /**
3047
+ * Optional, longer description of the event.
3048
+ */
2898
3049
  description?: string | undefined;
3050
+ /**
3051
+ * Optional image to be used for displaying the event.
3052
+ */
2899
3053
  image?: TImage | undefined;
3054
+ /**
3055
+ * Start timestamp of the event. Javascript date in milliseconds since 1 January 1970 UTC.
3056
+ */
2900
3057
  startDate?: number | undefined;
3058
+ /**
3059
+ * Start timestamp of the event. Javascript date in milliseconds since 1 January 1970 UTC.
3060
+ */
2901
3061
  endDate?: number | undefined;
3062
+ /**
3063
+ * Timestamp when the event should be displayed. Javascript date in milliseconds since 1 January 1970 UTC.
3064
+ */
2902
3065
  showDate?: number | undefined;
3066
+ /**
3067
+ * @internal
3068
+ */
2903
3069
  constructor(mappedin: Mappedin, data: any);
2904
3070
  /**
2905
- * Location this Event is occuring at.
2906
- *
2907
- * @property location {MappedinLocation}
3071
+ * Location this event is occuring at.
2908
3072
  */
2909
3073
  location(): MappedinLocation | undefined;
3074
+ /**
3075
+ * @internal
3076
+ */
2910
3077
  static hydrate(events: any, mappedin: Mappedin): MappedinEvent[];
3078
+ /**
3079
+ * @internal
3080
+ */
2911
3081
  static fetch(mappedin: Mappedin): Promise<MappedinEvent[]>;
2912
3082
  toJSON(): any;
2913
3083
  }
@@ -2980,9 +3150,10 @@ declare module '@mappedin/mappedin-js/get-venue/MappedinVenue' {
2980
3150
  tzidOverride: string;
2981
3151
  utcOffset: string;
2982
3152
  website: string;
2983
- constructor(data: any);
2984
- static hydrate(data: any): MappedinVenue;
3153
+ constructor(mappedin: Mappedin, data: any);
3154
+ static hydrate(data: any, mappedin: Mappedin): MappedinVenue;
2985
3155
  static fetch(mappedin: Mappedin): Promise<MappedinVenue>;
3156
+ get isMultiBuilding(): any;
2986
3157
  toJSON(): any;
2987
3158
  }
2988
3159
  }
@@ -3256,9 +3427,6 @@ declare module '@mappedin/mappedin-js/get-venue/Mappedin.API.types' {
3256
3427
  export type TMapGroup = {
3257
3428
  name: string;
3258
3429
  id: string;
3259
- maps: {
3260
- id: TMap['id'];
3261
- }[];
3262
3430
  };
3263
3431
  export type TBuilding = TLocation & {
3264
3432
  groupId: string;
@@ -3311,27 +3479,32 @@ declare module '@mappedin/mappedin-js/get-venue/Mappedin.API.types' {
3311
3479
  entranceNodeId: string;
3312
3480
  score: number;
3313
3481
  };
3314
- export type TVenue = {
3315
- address: string;
3316
- city: string;
3317
- countrycode: string;
3318
- defaultMap: string;
3319
- externalId: string;
3482
+ export type TLocationState = {
3320
3483
  id: string;
3321
- latitude: number;
3322
- logo: TLogo;
3323
- longitude: number;
3324
- metadata?: any;
3325
3484
  name: string;
3326
- operationHours: TOpeningHours[];
3327
- postal: string;
3328
- slug: string;
3329
- state: string;
3330
- telephone: string;
3331
- tzid: string;
3332
- tzidOverride: string;
3333
- utcOffset: string;
3334
- website: string;
3485
+ value: string;
3486
+ };
3487
+ export type TVenue = {
3488
+ address?: string;
3489
+ city?: string;
3490
+ countrycode?: string;
3491
+ defaultMap?: string;
3492
+ externalId?: string;
3493
+ id?: string;
3494
+ latitude?: number;
3495
+ logo?: TLogo;
3496
+ longitude?: number;
3497
+ metadata?: any;
3498
+ name?: string;
3499
+ operationHours?: TOpeningHours[];
3500
+ postal?: string;
3501
+ slug?: string;
3502
+ state?: string;
3503
+ telephone?: string;
3504
+ tzid?: string;
3505
+ tzidOverride?: string;
3506
+ utcOffset?: string;
3507
+ website?: string;
3335
3508
  };
3336
3509
  export type TMappedinAPI = {
3337
3510
  nodes: TNode[];
@@ -3343,6 +3516,7 @@ declare module '@mappedin/mappedin-js/get-venue/Mappedin.API.types' {
3343
3516
  themes: any;
3344
3517
  venue: TVenue;
3345
3518
  vortexes: TVortex[];
3519
+ locationStates?: TLocationState[];
3346
3520
  };
3347
3521
  }
3348
3522
 
@@ -3449,7 +3623,7 @@ declare module '@mappedin/mappedin-js/renderer/Core.interface' {
3449
3623
  */
3450
3624
  polygons?: (MappedinPolygon | MappedinPolygon['id'])[];
3451
3625
  /**
3452
- * The duration the focus animation should last for.
3626
+ * The duration (in ms) the focus animation should last for.
3453
3627
  * @defaultValue `100`
3454
3628
  */
3455
3629
  duration?: number;
@@ -3488,6 +3662,7 @@ declare module '@mappedin/mappedin-js/renderer/Core.interface' {
3488
3662
  * @internal
3489
3663
  */
3490
3664
  currentScale: number;
3665
+ loadOptions?: TMapViewOptions['loadOptions'];
3491
3666
  imageFlippingEnabled: boolean;
3492
3667
  imageFlippingCache: any;
3493
3668
  cachedPadding: any;
@@ -3761,8 +3936,10 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.LabelAtlas' {
3761
3936
  }
3762
3937
  export class FlatLabel {
3763
3938
  constructor(options: any, venue: any, mapObject: any, DEFAULT_FONT: any, polygonMeshesById: any, textLabelsByPolygonId: any, mapView: any, scope: any, atlas: any);
3939
+ id: any;
3764
3940
  text: any;
3765
3941
  stateText: string;
3942
+ fullText: any;
3766
3943
  font: any;
3767
3944
  atlas: any;
3768
3945
  canvasBounds: any;
@@ -3847,6 +4024,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.HTMLCollider' {
3847
4024
  declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider' {
3848
4025
  import SmartCollisionEngine from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollisionEngine';
3849
4026
  import { Vector3 } from 'three';
4027
+ import { Rectangle } from '@mappedin/mappedin-js/renderer/internal/quad-tree';
3850
4028
  export type TRange = [number, number, number, number];
3851
4029
  type TCustomCollider<T> = ICollider & T;
3852
4030
  export type TColliderStrategyProps = {
@@ -3860,6 +4038,10 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider'
3860
4038
  getBoundingBox: (TColliderStrategyProps: any) => TRange;
3861
4039
  onStrategySelected: (collider: TCustomCollider<any>) => void;
3862
4040
  };
4041
+ type TGetBoundingBox = ({ x, y }: {
4042
+ x: any;
4043
+ y: any;
4044
+ }) => [number, number, number, number];
3863
4045
  export type TDimensions = {
3864
4046
  width: number;
3865
4047
  height: number;
@@ -3872,13 +4054,19 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider'
3872
4054
  export interface ICollider {
3873
4055
  dimensions: TDimensions;
3874
4056
  screenPosition: [number, number];
3875
- currentStrategyName: string | null;
4057
+ getBoundingBoxForCurrentStrategy?: TGetBoundingBox;
3876
4058
  options?: Record<string, unknown>;
3877
4059
  mapId: string;
3878
4060
  visible: boolean;
3879
4061
  rank: number;
3880
- _dirty?: boolean;
3881
4062
  id: string;
4063
+ _bboxes?: [
4064
+ string,
4065
+ Rectangle,
4066
+ (collider: TCustomCollider<any>) => void,
4067
+ TGetBoundingBox
4068
+ ][];
4069
+ offscreen?: boolean;
3882
4070
  setAction: (action: EColliderAction) => void;
3883
4071
  action?: EColliderAction;
3884
4072
  position: Vector3;
@@ -3902,14 +4090,15 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider'
3902
4090
  __engine: any;
3903
4091
  _initialRank: number;
3904
4092
  screenPosition: [number, number];
3905
- currentStrategyName: null;
3906
4093
  enabled: boolean;
3907
4094
  options: any;
3908
4095
  mapId: string;
3909
4096
  id: string;
3910
4097
  action: EColliderAction;
4098
+ getBoundingBoxForCurrentStrategy: undefined;
3911
4099
  rank: number;
3912
4100
  visible: boolean;
4101
+ offscreen: boolean;
3913
4102
  position: Vector3;
3914
4103
  dimensions: {
3915
4104
  width: number;
@@ -4723,6 +4912,209 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4723
4912
  export {};
4724
4913
  }
4725
4914
 
4915
+ declare module '@mappedin/mappedin-js/get-venue/Mappedin.MVF.types' {
4916
+ import { FeatureCollection, Polygon, Point, MultiPolygon } from 'geojson';
4917
+ type ManifestFile = {
4918
+ type: 'file';
4919
+ name: string;
4920
+ };
4921
+ type ManifestFolder = {
4922
+ type: 'folder';
4923
+ name: string;
4924
+ children: ManifestFile[];
4925
+ };
4926
+ type OpeningHours = {
4927
+ opens: string;
4928
+ closes: string;
4929
+ dayOfWeek: string;
4930
+ validFrom?: string;
4931
+ validThrough?: string;
4932
+ };
4933
+ type Image = {
4934
+ original?: string;
4935
+ xlarge?: string;
4936
+ xxlarge?: string;
4937
+ medium?: string;
4938
+ '140x140'?: string;
4939
+ xsmall?: string;
4940
+ xxsmall?: string;
4941
+ '66x66'?: string;
4942
+ small?: string;
4943
+ large?: string;
4944
+ };
4945
+ type PolygonImage = string;
4946
+ type Phone = {
4947
+ number: string;
4948
+ extension?: string;
4949
+ };
4950
+ type Link = {
4951
+ label: string;
4952
+ url: string;
4953
+ };
4954
+ type Social = {
4955
+ facebook?: string;
4956
+ twitter?: string;
4957
+ instagram?: string;
4958
+ website?: string;
4959
+ };
4960
+ type LocationState = {
4961
+ type: string;
4962
+ start?: string;
4963
+ end?: string;
4964
+ };
4965
+ type ImageTransform = {
4966
+ position: {
4967
+ x: number;
4968
+ y: number;
4969
+ z: number;
4970
+ };
4971
+ rotation: number;
4972
+ scale: {
4973
+ x: number;
4974
+ y: number;
4975
+ };
4976
+ };
4977
+ type SiblingGroup = {
4978
+ label: string;
4979
+ siblings: string[];
4980
+ };
4981
+ export type MILocationProperties = {
4982
+ id: string;
4983
+ address?: string | null;
4984
+ categories: string[];
4985
+ description?: string | null;
4986
+ email?: string | null;
4987
+ externalId?: string | null;
4988
+ hours?: OpeningHours[] | null;
4989
+ links?: Link[] | null;
4990
+ logo?: Image | null;
4991
+ name: string;
4992
+ phone?: Phone | null;
4993
+ picture?: Image | null;
4994
+ services?: string | null;
4995
+ siblingGroups?: SiblingGroup[] | null;
4996
+ social?: Social | null;
4997
+ spaces?: TLocationSpaceReference[] | null;
4998
+ states?: LocationState[] | null;
4999
+ type: string;
5000
+ };
5001
+ export type MICategoryProperties = {
5002
+ id: string;
5003
+ name: string;
5004
+ picture?: Image;
5005
+ };
5006
+ export type MIBuildingProperties = {
5007
+ id: string;
5008
+ name: string;
5009
+ venue: string;
5010
+ };
5011
+ export type MILevelProperties = {
5012
+ id: string;
5013
+ abbreviation?: string;
5014
+ building?: string;
5015
+ elevation?: number;
5016
+ name: string;
5017
+ };
5018
+ export type MIPolygonlikeProperties = {
5019
+ id: string;
5020
+ altitude?: string;
5021
+ color?: string;
5022
+ externalId?: string | null;
5023
+ height?: string;
5024
+ layer?: string;
5025
+ level: string;
5026
+ parent?: string | null;
5027
+ };
5028
+ type TPseudoNodeSpaceReference = {
5029
+ node: string;
5030
+ map: string;
5031
+ };
5032
+ export type TRealSpaceReference = {
5033
+ id: string;
5034
+ map: string;
5035
+ };
5036
+ type TLocationSpaceReference = TPseudoNodeSpaceReference | TRealSpaceReference;
5037
+ export type TEntrances = {
5038
+ id: string;
5039
+ level: string;
5040
+ };
5041
+ export type MISpaceProperties = MIPolygonlikeProperties & {
5042
+ entrances: TEntrances[];
5043
+ };
5044
+ export type MIObstructionProperties = MIPolygonlikeProperties;
5045
+ export type MIConnectionProperties = {
5046
+ id: string;
5047
+ accessible: boolean;
5048
+ destinations: string[];
5049
+ level: string;
5050
+ multiplier: number;
5051
+ name: string;
5052
+ type: string;
5053
+ weight: number;
5054
+ };
5055
+ export type MINodeProperties = {
5056
+ id: string;
5057
+ accessible: boolean;
5058
+ externalId: string | null;
5059
+ level: string;
5060
+ multiplier: number;
5061
+ neighbors: string[];
5062
+ weight: number;
5063
+ };
5064
+ export type MIManifestProperties = {
5065
+ name: string;
5066
+ folder_struct: (ManifestFolder | ManifestFile)[];
5067
+ version: string;
5068
+ time: string;
5069
+ };
5070
+ export type MILayerStyleProperties = {
5071
+ layer: string;
5072
+ altitude: number;
5073
+ color: string;
5074
+ height: number;
5075
+ opacity: number;
5076
+ };
5077
+ export type MIPolygonStyleProperties = {
5078
+ id: string;
5079
+ altitude: number;
5080
+ color: string;
5081
+ height: number;
5082
+ image: PolygonImage;
5083
+ imageTransform: ImageTransform;
5084
+ opacity: number;
5085
+ };
5086
+ export type MIGeoJSONManifestCollection = FeatureCollection<Point, MIManifestProperties>;
5087
+ export type MIGeoJSONBuildingCollection = FeatureCollection<Polygon, MIBuildingProperties>;
5088
+ export type MIGeoJSONConnectionCollection = FeatureCollection<Point, MIConnectionProperties>;
5089
+ export type MIGeoJSONLevelCollection = FeatureCollection<Polygon | MultiPolygon, MILevelProperties>;
5090
+ export type MIGeoJSONSpaceCollection = FeatureCollection<Polygon, MISpaceProperties>;
5091
+ export type MIGeoJSONObstructionCollection = FeatureCollection<Polygon, MIObstructionProperties>;
5092
+ export type MIGeoJSONNodeCollection = FeatureCollection<Point, MINodeProperties>;
5093
+ export type MIGeoJSONLocationCollection = FeatureCollection<null, MILocationProperties>;
5094
+ export type MIGeoJSONCategoryCollection = FeatureCollection<null, MICategoryProperties>;
5095
+ export type MIGeoJSONLayerStyleCollection = FeatureCollection<null, MILayerStyleProperties>;
5096
+ export type MIGeoJSONPolygonStyleCollection = FeatureCollection<null, MIPolygonStyleProperties>;
5097
+ export type WithIDs<T> = Map<string, T>;
5098
+ /**
5099
+ * The entire data collection for an MVF, in a single JSON collection.
5100
+ *
5101
+ */
5102
+ export type MVFData = {
5103
+ connection: WithIDs<MIGeoJSONConnectionCollection>;
5104
+ level: WithIDs<MIGeoJSONLevelCollection>;
5105
+ node: WithIDs<MIGeoJSONNodeCollection>;
5106
+ obstruction: WithIDs<MIGeoJSONObstructionCollection>;
5107
+ polygonStyle: WithIDs<MIGeoJSONPolygonStyleCollection>;
5108
+ space: WithIDs<MIGeoJSONSpaceCollection>;
5109
+ building: MIGeoJSONBuildingCollection;
5110
+ category: MIGeoJSONCategoryCollection;
5111
+ layerStyle: MIGeoJSONLayerStyleCollection;
5112
+ location: MIGeoJSONLocationCollection;
5113
+ manifest: MIGeoJSONManifestCollection;
5114
+ };
5115
+ export {};
5116
+ }
5117
+
4726
5118
  declare module '@mappedin/mappedin-js/get-venue/MappedinLocationRankings' {
4727
5119
  import type { Mappedin } from '@mappedin/mappedin-js/get-venue/Mappedin';
4728
5120
  import type { TLocation } from '@mappedin/mappedin-js/get-venue/Mappedin.API.types';
@@ -4804,56 +5196,85 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollisionE
4804
5196
  import './Mappedin.SmartCollisionEngine.scss';
4805
5197
  import { ICollider, TRange } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider';
4806
5198
  import { MappedinMap, MapView } from '@mappedin/mappedin-js/renderer';
5199
+ import { ICore } from '@mappedin/mappedin-js/renderer/Core.interface';
5200
+ import { Rectangle, QuadTree } from '@mappedin/mappedin-js/renderer/internal/quad-tree';
4807
5201
  export const COLLIDER_STRATEGY_LOW_PRIORITY = "LOW_PRIORITY";
4808
5202
  class SmartCollisionEngine {
4809
- #private;
4810
- _makeCollidersDirtyThrottled: any;
4811
- colliderCanvas: HTMLCanvasElement;
4812
- debugCanvas: HTMLCanvasElement;
4813
- colliderCanvasContext: CanvasRenderingContext2D;
4814
- debugCanvasContext: CanvasRenderingContext2D;
4815
- collisionEngineContainerEl: HTMLDivElement;
4816
- stepsX: any;
4817
- stepsY: any;
4818
- totalWidth: any;
4819
- totalHeight: any;
4820
- project: any;
4821
- grid: Uint8Array;
4822
- colliders: Map<string, ICollider>;
4823
- offscreenRanges: TRange[];
4824
- get sortedColliders(): ICollider[];
4825
- initialized: boolean;
4826
- mapView: MapView;
4827
- constructor(mapView: any);
4828
- init: (container: HTMLDivElement, projectFn: ({ position, mapId }: {
4829
- position: Vector3;
4830
- mapId: MappedinMap['id'];
4831
- }) => {
4832
- x: number;
4833
- y: number;
4834
- }) => void;
4835
- updatePosition: () => void;
4836
- updateVisibility: () => void;
4837
- add: (colliderId: string, collider: ICollider) => void;
4838
- remove: (colliderId: string) => void;
4839
- /**
4840
- * When adding/removing new colliders, or when updating their priorty, we need to make all colliders around them as "dirty",
4841
- * so they can be reconcilded correctly
4842
- */
4843
- makeCollidersDirty: () => void;
4844
- /**
4845
- * Allow to throttle making collders dirty. This is useful for things like BlueDot follow mode,
4846
- * As we follow the BlueDot, colliders will overlap, but constantly updating their visiblity makes
4847
- * for a bad experience
4848
- */
4849
- makeCollidersDirtyThrottled: (time: any) => void;
4850
- resize: (container: any) => void;
4851
- update: () => void;
4852
- destroy: () => void;
5203
+ #private;
5204
+ colliderCanvas: HTMLCanvasElement;
5205
+ debugCanvas: HTMLCanvasElement;
5206
+ colliderCanvasContext: CanvasRenderingContext2D;
5207
+ debugCanvasContext: CanvasRenderingContext2D;
5208
+ collisionEngineContainerEl: HTMLDivElement;
5209
+ stepsX: any;
5210
+ stepsY: any;
5211
+ totalWidth: any;
5212
+ totalHeight: any;
5213
+ project: any;
5214
+ colliders: Map<string, ICollider>;
5215
+ offscreenRanges: TRange[];
5216
+ get sortedColliders(): ICollider[];
5217
+ initialized: boolean;
5218
+ mapView: MapView;
5219
+ core: ICore;
5220
+ screen: Rectangle;
5221
+ constructor(mapView: any, core: ICore);
5222
+ init: (container: HTMLDivElement, projectFn: ({ position, mapId }: {
5223
+ position: Vector3;
5224
+ mapId: MappedinMap['id'];
5225
+ }) => {
5226
+ x: number;
5227
+ y: number;
5228
+ }) => void;
5229
+ qtree: QuadTree;
5230
+ recompute: () => void;
5231
+ draw: () => void;
5232
+ reposition: () => void;
5233
+ add: (colliderId: string, collider: ICollider) => void;
5234
+ remove: (colliderId: string) => void;
5235
+ update: () => void;
5236
+ resize: (container: any) => void;
5237
+ destroy: () => void;
4853
5238
  }
4854
5239
  export default SmartCollisionEngine;
4855
5240
  }
4856
5241
 
5242
+ declare module '@mappedin/mappedin-js/renderer/internal/quad-tree' {
5243
+ export function contains(rect1: Rectangle, rect2: Rectangle): boolean;
5244
+ export function intersects(rect1: Rectangle, rect2: Rectangle): boolean;
5245
+ class Rectangle {
5246
+ x: number;
5247
+ y: number;
5248
+ w: number;
5249
+ h: number;
5250
+ userData?: any;
5251
+ constructor(x: number, y: number, w: number, h: number, userData?: any);
5252
+ contains(rectangle: Rectangle): boolean;
5253
+ intersects(rectangle: Rectangle): boolean;
5254
+ draw(context: CanvasRenderingContext2D): void;
5255
+ }
5256
+ class QuadTree {
5257
+ #private;
5258
+ boundary: Rectangle;
5259
+ capacity: number;
5260
+ objects: Rectangle[];
5261
+ topLeft: QuadTree;
5262
+ topRight: QuadTree;
5263
+ bottomLeft: QuadTree;
5264
+ bottomRight: QuadTree;
5265
+ divided: boolean;
5266
+ parent?: QuadTree;
5267
+ getSize(): any;
5268
+ constructor(boundary: Rectangle, parent?: QuadTree);
5269
+ subdivide(): void;
5270
+ query(rectangle: Rectangle): Rectangle[];
5271
+ insert(rectangle: Rectangle): boolean;
5272
+ drawObjects(context: CanvasRenderingContext2D): void;
5273
+ draw(context: CanvasRenderingContext2D): void;
5274
+ }
5275
+ export { QuadTree, Rectangle };
5276
+ }
5277
+
4857
5278
  declare module '@mappedin/mappedin-js/navigator/Edge' {
4858
5279
  import INode from '@mappedin/mappedin-js/navigator/interfaces/INode';
4859
5280
  import IVortex from '@mappedin/mappedin-js/navigator/interfaces/IVortex';