@mappedin/mappedin-js 5.11.0 → 5.12.0

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.
@@ -1,9 +1,9 @@
1
1
  // Generated by dts-bundle v0.7.3
2
2
  // Dependencies for this module:
3
+ // ../@mappedin/mvf
3
4
  // ../three
4
5
  // ../@tweenjs/tween.js
5
6
  // ../minisearch
6
- // ../@mappedin/mvf
7
7
  // ../stats.js
8
8
 
9
9
  declare module '@mappedin/mappedin-js' {
@@ -663,6 +663,7 @@ declare module '@mappedin/mappedin-js/get-venue' {
663
663
  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';
664
664
  export type { TGetVenueOptions } from '@mappedin/mappedin-js/get-venue/Mappedin.types';
665
665
  import { MAP_RENDER_MODE } from '@mappedin/mappedin-js/get-venue/Mappedin.types';
666
+ import { ParsedMVF } from '@mappedin/mvf';
666
667
  export type TShowVenueOptions = {
667
668
  /**
668
669
  * Sets the initial background color of the map, including while loading.
@@ -748,7 +749,7 @@ declare module '@mappedin/mappedin-js/get-venue' {
748
749
  /**
749
750
  * @internal
750
751
  */
751
- export function downloadVenueBundleMVF(options: TGetVenueBundleOptions): Promise<unknown>;
752
+ export function downloadVenueBundleMVF(options: TGetVenueBundleOptions): Promise<Uint8Array>;
752
753
  /**
753
754
  * Returns a {@link Mappedin} object hydrated with JSON data.
754
755
  * @param {string|Object} mappedinSerializableData A JSON string or object representing a venue.
@@ -756,6 +757,11 @@ declare module '@mappedin/mappedin-js/get-venue' {
756
757
  * @returns {Mappedin} A new Mappedin object with data from the mappedinSerializableData parameter.
757
758
  */
758
759
  export function hydrateVenue(mappedinSerializableData: any, shouldPopulateBundledImagesAsBlobs?: boolean): Promise<Mappedin>;
760
+ /**
761
+ * @internal
762
+ * Returns a {@link Mappedin} object hydrated with MVF data.
763
+ */
764
+ export function hydrateVenueMVF(mvfData: ParsedMVF): Promise<Mappedin>;
759
765
  }
760
766
 
761
767
  declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core' {
@@ -1257,10 +1263,20 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
1257
1263
  */
1258
1264
  firstMap?: MappedinMap | string;
1259
1265
  /**
1266
+ * @experimental
1267
+ *
1260
1268
  * Multi-buffer rendering should improve performance but may cause issues on older GPUs/browsers
1261
- * @default true
1269
+ * @default false
1262
1270
  */
1263
1271
  multiBufferRendering?: boolean;
1272
+ /**
1273
+ * @experimental
1274
+ *
1275
+ * Journey path will be visible through other objects. Note: this is on by default, but requires the
1276
+ * `multiBufferRendering` option (which is off by default) to be turned on.
1277
+ * @default true
1278
+ */
1279
+ xRayPath?: boolean;
1264
1280
  /**
1265
1281
  * True if the `opacity` argument to `setBackgroundColor` should be considered.
1266
1282
  * @default true
@@ -2830,6 +2846,10 @@ declare module '@mappedin/mappedin-js/renderer/internal/outdoor-context/Mappedin
2830
2846
  export type TTileManagerOptions = {
2831
2847
  tileRenderMode?: TILE_RENDER_MODES;
2832
2848
  provider: IOutdoorContextProvider;
2849
+ /**
2850
+ * How many times bigger the bounding box should be than the map's longest side
2851
+ */
2852
+ boundingBoxMultiplier?: number;
2833
2853
  };
2834
2854
  export class TileManager {
2835
2855
  #private;
@@ -2847,6 +2867,9 @@ declare module '@mappedin/mappedin-js/renderer/internal/outdoor-context/Mappedin
2847
2867
  renderVisibleTiles: () => void;
2848
2868
  _renderVisibleTiles(): void;
2849
2869
  cachedZoomLevel: number;
2870
+ visible: boolean;
2871
+ fadeOut(): Promise<any>;
2872
+ fadeIn(): Promise<any>;
2850
2873
  fetchTiles(): void;
2851
2874
  zoomLevelToAltitudeMap: number[][];
2852
2875
  plane: Object3D;
@@ -3336,7 +3359,6 @@ declare module '@mappedin/mappedin-js/get-venue/Mappedin.types' {
3336
3359
 
3337
3360
  declare module '@mappedin/mappedin-js/get-venue/Mappedin' {
3338
3361
  import { Navigator } from '@mappedin/mappedin-js/navigator';
3339
- import { MVFData } from '@mappedin/mappedin-js/get-venue/Mappedin.MVF.types';
3340
3362
  import type { TGetVenueOptions, TGetVenueOptionsInternal } from '@mappedin/mappedin-js/get-venue/Mappedin.types';
3341
3363
  import { MappedinCategory } from '@mappedin/mappedin-js/get-venue/MappedinCategory';
3342
3364
  import { MappedinEvent } from '@mappedin/mappedin-js/get-venue/MappedinEvent';
@@ -3352,6 +3374,7 @@ declare module '@mappedin/mappedin-js/get-venue/Mappedin' {
3352
3374
  import { MappedinVenue } from '@mappedin/mappedin-js/get-venue/MappedinVenue';
3353
3375
  import { MappedinVortex } from '@mappedin/mappedin-js/get-venue/MappedinVortex';
3354
3376
  import { IAnalytics } from '@mappedin/mappedin-js/get-venue/Mappedin.CustomerAnalytics';
3377
+ import { ParsedMVF } from '@mappedin/mvf';
3355
3378
  export const defaultOptions: TGetVenueOptionsInternal & TGetVenueOptions;
3356
3379
  export enum MappedinCollectionType {
3357
3380
  CATEGORY = "categories",
@@ -3587,7 +3610,7 @@ declare module '@mappedin/mappedin-js/get-venue/Mappedin' {
3587
3610
  * @hidden
3588
3611
  * @internal
3589
3612
  */
3590
- hydrateFromMVF(mvfData: MVFData): Promise<undefined>;
3613
+ hydrateFromMVF(mvfData: ParsedMVF): Promise<undefined>;
3591
3614
  /**
3592
3615
  *
3593
3616
  * @experimental Hydrate the Mappedin instance using a response from either {@link Mappedin.toString}, {@link getVenueBundle} or by downloading the bundle manually
@@ -5050,6 +5073,7 @@ declare module '@mappedin/mappedin-js/renderer/internal' {
5050
5073
  export { default as MapObject } from '@mappedin/mappedin-js/renderer/internal/Mappedin.MapObject';
5051
5074
  export { default as CAMERA_LAYER } from '@mappedin/mappedin-js/renderer/internal/Mappedin.CameraLayers';
5052
5075
  export { default as AssetManager } from '@mappedin/mappedin-js/renderer/internal/Mappedin.AssetManager';
5076
+ export { BundleAssetManager } from '@mappedin/mappedin-js/renderer/bundle-asset-manager';
5053
5077
  /**
5054
5078
  * Internal Events and Payloads
5055
5079
  */
@@ -6017,26 +6041,6 @@ declare module '@mappedin/mappedin-js/renderer/private/Core.interface' {
6017
6041
  }
6018
6042
  }
6019
6043
 
6020
- declare module '@mappedin/mappedin-js/get-venue/Mappedin.MVF.types' {
6021
- import { ManifestCollection, NodeCollection, ObstructionCollection, SpaceCollection, Connections, Maps, EntranceCollection, MapStacks, StyleCollection } from '@mappedin/mvf';
6022
- export type WithIDs<T> = Map<string, T>;
6023
- /**
6024
- * The entire data collection for an MVF, in a single JSON collection.
6025
- *
6026
- */
6027
- export type MVFData = {
6028
- obstruction: WithIDs<ObstructionCollection>;
6029
- space: WithIDs<SpaceCollection>;
6030
- node: WithIDs<NodeCollection>;
6031
- entrance: WithIDs<EntranceCollection>;
6032
- connection: Connections;
6033
- map: Maps;
6034
- mapstack: MapStacks;
6035
- manifest: ManifestCollection;
6036
- style: StyleCollection;
6037
- };
6038
- }
6039
-
6040
6044
  declare module '@mappedin/mappedin-js/get-venue/MappedinLocationRankings' {
6041
6045
  import type { Mappedin } from '@mappedin/mappedin-js/get-venue/Mappedin';
6042
6046
  import type { TLocation } from '@mappedin/mappedin-js/get-venue/Mappedin.API.types';
@@ -6629,8 +6633,8 @@ declare module '@mappedin/mappedin-js/get-venue/Mappedin.TaskScheduler' {
6629
6633
 
6630
6634
  declare module '@mappedin/mappedin-js/renderer/MapView.SceneManager' {
6631
6635
  import { MappedinMap } from '@mappedin/mappedin-js/get-venue';
6632
- import type { ICore, TCameraTransform, TCameraAnimationOptions } from '@mappedin/mappedin-js/renderer/internal';
6633
- import { MapViewScene } from '@mappedin/mappedin-js/renderer/internal';
6636
+ import type { ICore, TCameraAnimationOptions, TFocusOnCameraOptions, TCameraTargets } from '@mappedin/mappedin-js/renderer/internal';
6637
+ import { MapObject, MapViewScene } from '@mappedin/mappedin-js/renderer/internal';
6634
6638
  export type TSceneTransitionOptions = {
6635
6639
  /**
6636
6640
  * Map to set as active during the transition. This will decide where the camera will be positioned, as well as which
@@ -6638,11 +6642,6 @@ declare module '@mappedin/mappedin-js/renderer/MapView.SceneManager' {
6638
6642
  */
6639
6643
  activeMap?: MappedinMap;
6640
6644
  verticalDistanceBetweenMaps?: number;
6641
- /**
6642
- * Camera options to use when transitioning to the new scene
6643
- */
6644
- cameraTransform?: TCameraTransform;
6645
- cameraAnimationOptions?: TCameraAnimationOptions;
6646
6645
  /**
6647
6646
  * Whether to auto focus on the active map or leave the camera where it is.
6648
6647
  * For single building venues, this should look the same way it did with MapManager
@@ -6651,10 +6650,22 @@ declare module '@mappedin/mappedin-js/renderer/MapView.SceneManager' {
6651
6650
  * @default true
6652
6651
  */
6653
6652
  autoFocusOnActiveMap?: boolean;
6653
+ /**
6654
+ * Where to focus the camera during transition to Scene. Will focus to fit the map if not provided.
6655
+ * Currently, will discard any targets that are not on the active map.
6656
+ */
6657
+ focusOn?: {
6658
+ targets?: TCameraTargets;
6659
+ options?: TFocusOnCameraOptions & TCameraAnimationOptions;
6660
+ };
6654
6661
  };
6655
6662
  class SceneManager {
6656
6663
  #private;
6657
6664
  currentScene: MapViewScene;
6665
+ /**
6666
+ * MapObjects that have been loaded and positioned in the scene
6667
+ */
6668
+ processedMapObjects: Set<MapObject>;
6658
6669
  constructor(core: ICore, startingScene: MapViewScene);
6659
6670
  get currentMap(): MappedinMap;
6660
6671
  renderGrid(): void;
@@ -6711,6 +6722,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.MapObject' {
6711
6722
  labels: Set<any>;
6712
6723
  tooltips: Set<any>;
6713
6724
  markers: Set<any>;
6725
+ box: any;
6714
6726
  textObjects: any[];
6715
6727
  labelBatchCreator: null;
6716
6728
  imagesToFlip: any[];
@@ -6734,6 +6746,45 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.MapObject' {
6734
6746
  _objLoaded(object: any): any;
6735
6747
  _objLoadedMerged(object: any): Promise<any>;
6736
6748
  enableImageFlipping(polygonId: any, rotation: any): void;
6749
+ fadeIn({ duration, delay, easing, onStart, onUpdate, onComplete, }: {
6750
+ duration?: number | undefined;
6751
+ delay?: number | undefined;
6752
+ easing?: any;
6753
+ onStart?: (() => void) | undefined;
6754
+ onUpdate?: (() => void) | undefined;
6755
+ onComplete?: (() => void) | undefined;
6756
+ }): {
6757
+ start(core: any): Promise<any>;
6758
+ }[];
6759
+ fadeOut({ duration, delay, easing, onStart, onUpdate, onComplete, }: {
6760
+ duration?: number | undefined;
6761
+ delay?: number | undefined;
6762
+ easing?: any;
6763
+ onStart?: (() => void) | undefined;
6764
+ onUpdate?: (() => void) | undefined;
6765
+ onComplete?: (() => void) | undefined;
6766
+ }): {
6767
+ start(core: any): Promise<any>;
6768
+ }[];
6769
+ fade({ direction, duration, delay, easing, onStart, onUpdate, onComplete, }: {
6770
+ direction?: string | undefined;
6771
+ duration?: number | undefined;
6772
+ delay?: number | undefined;
6773
+ easing?: any;
6774
+ onStart?: (() => void) | undefined;
6775
+ onUpdate?: (() => void) | undefined;
6776
+ onComplete?: (() => void) | undefined;
6777
+ }): {
6778
+ start(core: any): Promise<any>;
6779
+ }[];
6780
+ /**
6781
+ * Sets the opacity of all children (for now) of the map object
6782
+ */
6783
+ setIndoorGeometryOpacity(opacity: any): void;
6784
+ /**
6785
+ * Resets the transparent and opacity values of all children (for now) of the map object
6786
+ */
6787
+ resetIndoorGeometryOpacity(): void;
6737
6788
  elements: any;
6738
6789
  boundingBox: {
6739
6790
  min: any;
@@ -7664,32 +7715,48 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.HTMLCollider' {
7664
7715
 
7665
7716
  declare module '@mappedin/mappedin-js/renderer/MapView.Scene' {
7666
7717
  import { MappedinMap } from '@mappedin/mappedin-js/get-venue';
7667
- import type { ICore, TSceneTransitionOptions } from '@mappedin/mappedin-js/renderer/internal';
7668
- import { MapObject } from '@mappedin/mappedin-js/renderer/internal';
7669
- export function getPanBoundsForObject(mapObject: MapObject, currentPanBounds: any): {
7670
- min: any;
7671
- max: any;
7672
- margin: any;
7673
- radius: any;
7674
- center: any;
7675
- };
7718
+ import type { ICore, SceneManager, TSceneTransitionOptions } from '@mappedin/mappedin-js/renderer/internal';
7719
+ import { MapObject, CAMERA_EASING_MODE } from '@mappedin/mappedin-js/renderer/internal';
7720
+ export const AUTO_FOCUS_DURATION = 500;
7721
+ export const AUTO_FOCUS_EASING = CAMERA_EASING_MODE.EASE_OUT;
7722
+ export const STARTING_TILT = 0.6;
7723
+ export const STARTING_ROTATION: undefined;
7676
7724
  class MapViewScene {
7677
- #private;
7678
- maps: MappedinMap[];
7679
- object: any;
7680
- currentMap: MappedinMap;
7681
- mapObjects: Map<MappedinMap['id'], MapObject>;
7682
- constructor(maps: MappedinMap[], core: ICore);
7683
- /**
7684
- * Determine each maps position and rotation relative to the refernce map
7685
- */
7686
- determineMapPositionAndRotation(map: MappedinMap): {
7687
- position: any[];
7688
- scale: number[];
7689
- rotation: number[];
7690
- };
7691
- /** Render scene */
7692
- render(map: MappedinMap, transitionOptions?: TSceneTransitionOptions, isStartingScene?: boolean): Promise<void>;
7725
+ #private;
7726
+ maps: MappedinMap[];
7727
+ mapObjectsArray: MapObject[];
7728
+ transitionOptions: TSceneTransitionOptions | undefined;
7729
+ object: any;
7730
+ verticalPaths: any;
7731
+ currentMap: MappedinMap;
7732
+ mapObjects: Map<MappedinMap['id'], MapObject>;
7733
+ constructor(maps: MappedinMap[], core: ICore);
7734
+ get mapObjectsByMapGroup(): {
7735
+ [x: string]: MapObject[];
7736
+ };
7737
+ /**
7738
+ * Determine each maps position and rotation relative to the refernce map
7739
+ */
7740
+ determineMapPositionAndRotation(map: MappedinMap): {
7741
+ position: any[];
7742
+ scale: number[];
7743
+ rotation: number[];
7744
+ };
7745
+ /**
7746
+ * Convenience function to initialize scene (for stacked maps)
7747
+ */
7748
+ prepare(sceneManager: SceneManager, transitionOptions?: TSceneTransitionOptions): Promise<void>;
7749
+ /**
7750
+ * Override this method if works need to be done when the window is resized
7751
+ */
7752
+ resize(): void;
7753
+ focusOnCurrentMap(transitionOptions?: TSceneTransitionOptions, isStartingScene?: boolean): Promise<unknown>;
7754
+ preRender(transitionOptions?: TSceneTransitionOptions): Promise<Promise<MapObject>[]>;
7755
+ /**
7756
+ * Override this method when unmounting a scene
7757
+ */
7758
+ unmount(): void;
7759
+ postRender(): void;
7693
7760
  }
7694
7761
  export default MapViewScene;
7695
7762
  }
@@ -7763,7 +7830,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.Element' {
7763
7830
  static imagesLoadingInProgress: Map<string, Promise<[any, any]>>;
7764
7831
  _addImage(polygon: MappedinPolygon, mapClass: MappedinMap): void;
7765
7832
  static _normalizeColor(color: any): number;
7766
- static _getMaterial(color: string, opacity: number): any;
7833
+ static _getMaterial(color: string, opacity: number, map: MappedinMap['id']): any;
7767
7834
  static _clip(vertices: any, offset: any): any;
7768
7835
  }
7769
7836
  export default Element;
@@ -8957,7 +9024,7 @@ let CameraControls = function (camera, canvas, scene, core) {
8957
9024
  *
8958
9025
  * @return {Mappedin.Tween} The tween being used, if you want to do anything to control it manually. Do not overide it's events.
8959
9026
  */
8960
- this.animateCamera = function (target, duration, curve, callback, options) {
9027
+ this.animateCamera = function (target, duration, curve, callback, cancelledCallback, options) {
8961
9028
  const _options = { mode: CAMERA_CONTROL_OPTIONS.cancel, ...options };
8962
9029
  let tweenStart = {};
8963
9030
  let tweenEnd = {};
@@ -9009,7 +9076,7 @@ let CameraControls = function (camera, canvas, scene, core) {
9009
9076
  }
9010
9077
  const zooming = tweenStart.zoom !== tweenEnd.zoom;
9011
9078
  const rotating = tweenStart.rotation !== tweenEnd.rotation;
9012
- const tilting = tweenStart.tilting !== tweenEnd.tilting;
9079
+ const tilting = tweenStart.tilt !== tweenEnd.tilt;
9013
9080
  var tween = new TWEEN.Tween(tweenStart)
9014
9081
  .to(tweenEnd, process.env.TESTING ? 0 : duration)
9015
9082
  .onUpdate(function (between) {
@@ -9061,6 +9128,9 @@ let CameraControls = function (camera, canvas, scene, core) {
9061
9128
  }
9062
9129
  else {
9063
9130
  completeTween(lastTween);
9131
+ if (typeof cancelledCallback === 'function') {
9132
+ cancelledCallback();
9133
+ }
9064
9134
  lastTween = null;
9065
9135
  }
9066
9136
  }
@@ -9787,7 +9857,7 @@ let CameraControls = function (camera, canvas, scene, core) {
9787
9857
  };
9788
9858
  export default CameraControls;
9789
9859
 
9790
- import { Color, DepthTexture, Mesh, Vector2, NearestFilter, OrthographicCamera, PlaneBufferGeometry, RGBAFormat, Scene, ShaderMaterial, UnsignedIntType, WebGLRenderTarget, WebGL1Renderer, WebGLRenderer, DepthStencilFormat, sRGBEncoding, } from 'three';
9860
+ import { Color, DepthTexture, Mesh, Vector2, NearestFilter, OrthographicCamera, PlaneBufferGeometry, RGBAFormat, Scene, ShaderMaterial, UnsignedIntType, WebGLRenderTarget, WebGL1Renderer, WebGLRenderer, sRGBEncoding, } from 'three';
9791
9861
  import { CAMERA_LAYER, RENDER } from '@mappedin/mappedin-js/renderer/internal';
9792
9862
  import CompositeVertexShader from '@mappedin/mappedin-js/renderer/internal/shaders/Mappedin.Composite.Vertex.glsl';
9793
9863
  import CompositeFragmentShader from '@mappedin/mappedin-js/renderer/internal/shaders/Mappedin.Composite.Fragment.glsl';
@@ -9820,6 +9890,8 @@ export default class Renderer {
9820
9890
  * The color that will be displayed behind the scene
9821
9891
  * @param [options.backgroundAlpha=1.0] {number}
9822
9892
  * The opacity of the background color
9893
+ * @param [options.xRayPath=true] {boolean}
9894
+ * If true, journey path will be visible through other objects
9823
9895
  * @param [options.onWebGLContextCreationError=null] {function}
9824
9896
  * A callback that will be triggered if WebGL context creation fails
9825
9897
  * @param [options.onWebGLContextLost=null] {function}
@@ -9832,9 +9904,6 @@ export default class Renderer {
9832
9904
  constructor(renderOptions) {
9833
9905
  renderOptions.multiBufferRendering = renderOptions.multiBufferRendering || false;
9834
9906
  this.contextLost = false;
9835
- this.implementation = renderOptions.multiBufferRendering
9836
- ? new MultiBufferRenderer(renderOptions)
9837
- : new SingleBufferRenderer(renderOptions);
9838
9907
  this.implementation = this.getRenderer(renderOptions);
9839
9908
  this.onWebGLContextCreationError = renderOptions.onWebGLContextCreationError;
9840
9909
  this.onWebGLContextLost = renderOptions.onWebGLContextLost;
@@ -10155,7 +10224,6 @@ class MultiBufferRenderer {
10155
10224
  try {
10156
10225
  const options = {
10157
10226
  alpha: renderOptions.alpha || false,
10158
- antialias: false,
10159
10227
  stencil: true,
10160
10228
  outputEncoding: sRGBEncoding,
10161
10229
  powerPreference: 'high-performance',
@@ -10168,9 +10236,14 @@ class MultiBufferRenderer {
10168
10236
  renderOptions.onWebGLRendererError(e);
10169
10237
  }
10170
10238
  }
10239
+ this.journeyOpacity = renderOptions.xRayPath ? 0.3 : 0.0;
10171
10240
  this.backgroundColor = new Color();
10172
10241
  this.backgroundAlpha = 1.0;
10173
10242
  this.mapboxOutdoorContext = null;
10243
+ // Antialiasing for WebGLRenderTargets is done through the samples option
10244
+ // Note: this only works for WebGL 2
10245
+ // TODO: For some reason this is breaking path opacity but since antialiasing only affects DPI 1 monitors, we'll just turn it off for multi-buffer
10246
+ const samples = 0; // renderOptions.antialias ? 4 : 0;
10174
10247
  // The render target (color and depth textures) that will be used to
10175
10248
  // store the static scene, to composite it with the animated scene.
10176
10249
  this.staticSceneRenderTarget = new WebGLRenderTarget(this.renderer.width, this.renderer.height);
@@ -10180,9 +10253,9 @@ class MultiBufferRenderer {
10180
10253
  this.staticSceneRenderTarget.texture.generateMipmaps = false;
10181
10254
  this.staticSceneRenderTarget.stencilBuffer = true;
10182
10255
  this.staticSceneRenderTarget.depthBuffer = true;
10183
- this.staticSceneRenderTarget.depthTexture = new DepthTexture();
10256
+ this.staticSceneRenderTarget.depthTexture = new DepthTexture(this.renderer.width, this.renderer.height);
10184
10257
  this.staticSceneRenderTarget.depthTexture.type = UnsignedIntType;
10185
- this.staticSceneRenderTarget.depthTexture.format = DepthStencilFormat;
10258
+ this.staticSceneRenderTarget.samples = samples;
10186
10259
  // The render target that will be used to store the dynamic scene,
10187
10260
  // re-rendered once per frame while animated elements exist in the
10188
10261
  // 3D scene (e.g., paths.)
@@ -10194,9 +10267,9 @@ class MultiBufferRenderer {
10194
10267
  this.animatedSceneRenderTarget.texture.generateMipmaps = false;
10195
10268
  this.animatedSceneRenderTarget.stencilBuffer = true;
10196
10269
  this.animatedSceneRenderTarget.depthBuffer = true;
10197
- this.animatedSceneRenderTarget.depthTexture = new DepthTexture();
10270
+ this.animatedSceneRenderTarget.depthTexture = new DepthTexture(this.renderer.width, this.renderer.height);
10198
10271
  this.animatedSceneRenderTarget.depthTexture.type = UnsignedIntType;
10199
- this.animatedSceneRenderTarget.depthTexture.format = DepthStencilFormat;
10272
+ this.animatedSceneRenderTarget.samples = samples;
10200
10273
  // The render target that will be used to store the scene whose elements
10201
10274
  // are always drawn on top of everything else. Rendering is done once per
10202
10275
  // frame while such elements exist in the 3D scene, just like the animated scene target.
@@ -10213,10 +10286,14 @@ class MultiBufferRenderer {
10213
10286
  this.alwaysOnTopSceneRenderTarget.texture.generateMipmaps = false;
10214
10287
  this.alwaysOnTopSceneRenderTarget.stencilBuffer = true;
10215
10288
  this.alwaysOnTopSceneRenderTarget.depthBuffer = true;
10216
- this.alwaysOnTopSceneRenderTarget.depthTexture = new DepthTexture();
10289
+ this.alwaysOnTopSceneRenderTarget.depthTexture = new DepthTexture(this.renderer.width, this.renderer.height);
10217
10290
  this.alwaysOnTopSceneRenderTarget.depthTexture.type = UnsignedIntType;
10218
- this.alwaysOnTopSceneRenderTarget.depthTexture.format = DepthStencilFormat;
10291
+ this.alwaysOnTopSceneRenderTarget.samples = samples;
10219
10292
  this.compositeUniforms = {
10293
+ animatedColorOpacity: {
10294
+ type: 'f',
10295
+ value: this.journeyOpacity,
10296
+ },
10220
10297
  staticSceneColorTexture: {
10221
10298
  type: 't',
10222
10299
  value: this.staticSceneRenderTarget.texture,
@@ -10531,6 +10608,18 @@ declare module '@mappedin/mappedin-js/renderer/internal/utils' {
10531
10608
  export function isObject(item: any): any;
10532
10609
  export function cyrb53(str: any, seed?: number): number;
10533
10610
  export function addMarginMultiplierToBoundingBox(bbox: any, multiplier: any): any;
10611
+ export function tweenPromise({ from, to, duration, easing, delay, onUpdate, onStart, onComplete, }: {
10612
+ from: any;
10613
+ to: any;
10614
+ duration?: number | undefined;
10615
+ easing?: any;
10616
+ delay?: number | undefined;
10617
+ onUpdate?: ((_: any) => void) | undefined;
10618
+ onStart?: (() => void) | undefined;
10619
+ onComplete?: (() => void) | undefined;
10620
+ }): {
10621
+ start(core: any): Promise<any>;
10622
+ };
10534
10623
  export function getPrimaryLocationForPolygon(polygon: any, venue: any): any;
10535
10624
  export function determineStartingMap(venue: any, options: any): any;
10536
10625
  }
@@ -11240,73 +11329,6 @@ declare module '@mappedin/mappedin-js/navigator/interfaces/ILocation' {
11240
11329
 
11241
11330
 
11242
11331
 
11243
- precision mediump float;
11244
-
11245
- uniform sampler2D textureLabel;
11246
-
11247
- varying vec2 vUV;
11248
- varying vec3 vColor;
11249
-
11250
- void main() {
11251
- gl_FragColor = texture2D(textureLabel, vUV);
11252
- gl_FragColor.rgb = vColor;
11253
- }
11254
-
11255
- attribute vec2 position;
11256
- attribute vec3 origin;
11257
- attribute vec2 size;
11258
- attribute float rotation;
11259
- attribute vec4 uv;
11260
- attribute vec3 color;
11261
-
11262
- uniform mat4 projectionMatrix;
11263
- uniform mat4 viewMatrix;
11264
- uniform mat4 modelMatrix;
11265
-
11266
- varying vec2 vUV;
11267
- varying vec3 vColor;
11268
-
11269
- void main() {
11270
- vec4 mapDirectionVector = vec4(0, 1, 0, 0) * viewMatrix * modelMatrix;
11271
- float mapDirection = atan(mapDirectionVector.y, mapDirectionVector.x);
11272
-
11273
- float cosRotation = cos(rotation);
11274
- float sinRotation = sin(rotation);
11275
-
11276
- mat4 rotationMatrix = mat4(
11277
- vec4(cosRotation, -sinRotation, 0.0, 0.0),
11278
- vec4(sinRotation, cosRotation, 0.0, 0.0),
11279
- vec4(0.0, 0.0, 1.0, 0.0),
11280
- vec4(0.0, 0.0, 0.0, 1.0)
11281
- );
11282
-
11283
- mat4 translate = mat4(
11284
- vec4(1, 0, 0, 0),
11285
- vec4(0, 1, 0, 0),
11286
- vec4(0, 0, 1, 0),
11287
- vec4(origin, 1)
11288
- );
11289
-
11290
- gl_Position = projectionMatrix *
11291
- viewMatrix *
11292
- modelMatrix *
11293
- translate *
11294
- rotationMatrix *
11295
- (vec4(position * size - vec2(0, size.y / 2.0), 0, 1));
11296
-
11297
-
11298
- vec2 uvStart = uv.xy;
11299
- vec2 uvSize = uv.zw;
11300
-
11301
- if (sin(mapDirection + rotation) > 0.0) {
11302
- vUV = position * uvSize + vec2(uvStart.x, uvStart.y - uvSize.y);
11303
- } else {
11304
- vUV = (vec2(1, 1) - position) * uvSize + vec2(uvStart.x, uvStart.y - uvSize.y);
11305
- }
11306
-
11307
- vColor = color;
11308
- }
11309
-
11310
11332
  declare module '@mappedin/mappedin-js/renderer/internal/quad-tree' {
11311
11333
  export function contains(rect1: Rectangle, rect2: Rectangle): boolean;
11312
11334
  export function intersects(rect1: Rectangle, rect2: Rectangle): boolean;
@@ -11455,51 +11477,3 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.MultiFloorView'
11455
11477
  }
11456
11478
  }
11457
11479
 
11458
- varying vec2 vUv;
11459
-
11460
- void main() {
11461
- vUv = uv;
11462
- gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
11463
- }
11464
-
11465
- varying vec2 vUv;
11466
- uniform sampler2D staticSceneColorTexture;
11467
- uniform sampler2D staticSceneDepthTexture;
11468
- uniform sampler2D animatedSceneColorTexture;
11469
- uniform sampler2D animatedSceneDepthTexture;
11470
- uniform sampler2D alwaysOnTopSceneColorTexture;
11471
-
11472
- vec4 alphaBlend(vec4 background, vec4 foreground) {
11473
- vec3 resultColor = (
11474
- foreground.rgb * foreground.a +
11475
- background.rgb * background.a * (1.0 - foreground.a)
11476
- );
11477
- float resultAlpha = foreground.a + background.a * (1.0 - foreground.a);
11478
- return vec4(resultColor / resultAlpha, resultAlpha);
11479
- }
11480
-
11481
- vec4 alphaBlendPremultipliedAlpha(vec4 background, vec4 foreground) {
11482
- return foreground + (background * (1.0 - foreground.a));
11483
- }
11484
-
11485
- void main() {
11486
- float staticDepth = texture2D(staticSceneDepthTexture, vUv).r;
11487
- float animatedDepth = texture2D(animatedSceneDepthTexture, vUv).r;
11488
-
11489
- vec4 staticColor = texture2D(staticSceneColorTexture, vUv).rgba;
11490
- vec4 animatedColor = texture2D(animatedSceneColorTexture, vUv).rgba;
11491
-
11492
- if (staticDepth < animatedDepth) {
11493
- // 19/06/10 Terence Dickson
11494
- // Spoiler alert! This is to help prepare for CE-1352, where alpha
11495
- // may be partial instead of zero. Not implementing that as part of
11496
- // this PR, however.
11497
- animatedColor.a *= 0.0;
11498
- }
11499
-
11500
- vec4 lowerColor = alphaBlend(staticColor, animatedColor);
11501
- vec4 alwaysOnTopColor = texture2D(alwaysOnTopSceneColorTexture, vUv).rgba;
11502
-
11503
- gl_FragColor = alphaBlendPremultipliedAlpha(lowerColor, alwaysOnTopColor);
11504
- }
11505
-