@mappedin/mappedin-js 6.2.0 → 6.3.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.
@@ -1 +1 @@
1
- import{a as b,ba as x,ca as y,w as A,x as w,y as g}from"./chunk-NXEXDQWS.js";b();function M(o,l=!1){let r=o[0].index!==null,f=new Set(Object.keys(o[0].attributes)),i=new Set(Object.keys(o[0].morphAttributes)),c={},e={},h=o[0].morphTargetsRelative,u=new y,d=0;for(let t=0;t<o.length;++t){let s=o[t],a=0;if(r!==(s.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(let n in s.attributes){if(!f.has(n))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+'. All geometries must have compatible attributes; make sure "'+n+'" attribute exists among all geometries, or in none of them.'),null;c[n]===void 0&&(c[n]=[]),c[n].push(s.attributes[n]),a++}if(a!==f.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". Make sure all geometries have the same number of attributes."),null;if(h!==s.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(let n in s.morphAttributes){if(!i.has(n))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". .morphAttributes must be consistent throughout all geometries."),null;e[n]===void 0&&(e[n]=[]),e[n].push(s.morphAttributes[n])}if(l){let n;if(r)n=s.index.count;else if(s.attributes.position!==void 0)n=s.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". The geometry must have either an index or a position attribute"),null;u.addGroup(d,n,t),d+=n}}if(r){let t=0,s=[];for(let a=0;a<o.length;++a){let n=o[a].index;for(let m=0;m<n.count;++m)s.push(n.getX(m)+t);t+=o[a].attributes.position.count}u.setIndex(s)}for(let t in c){let s=B(c[t]);if(!s)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+t+" attribute."),null;u.setAttribute(t,s)}for(let t in e){let s=e[t][0].length;if(s===0)break;u.morphAttributes=u.morphAttributes||{},u.morphAttributes[t]=[];for(let a=0;a<s;++a){let n=[];for(let p=0;p<e[t].length;++p)n.push(e[t][p][a]);let m=B(n);if(!m)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+t+" morphAttribute."),null;u.morphAttributes[t].push(m)}}return u}function B(o){let l,r,f,i=-1,c=0;for(let d=0;d<o.length;++d){let t=o[d];if(l===void 0&&(l=t.array.constructor),l!==t.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(r===void 0&&(r=t.itemSize),r!==t.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(f===void 0&&(f=t.normalized),f!==t.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(i===-1&&(i=t.gpuType),i!==t.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;c+=t.count*r}let e=new l(c),h=new x(e,r,f),u=0;for(let d=0;d<o.length;++d){let t=o[d];if(t.isInterleavedBufferAttribute){let s=u/r;for(let a=0,n=t.count;a<n;a++)for(let m=0;m<r;m++){let p=t.getComponent(a,m);h.setComponent(a+s,m,p)}}else e.set(t.array,u);u+=t.count*r}return i!==void 0&&(h.gpuType=i),h}function R(o,l){if(l===A)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),o;if(l===g||l===w){let r=o.getIndex();if(r===null){let e=[],h=o.getAttribute("position");if(h!==void 0){for(let u=0;u<h.count;u++)e.push(u);o.setIndex(e),r=o.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),o}let f=r.count-2,i=[];if(l===g)for(let e=1;e<=f;e++)i.push(r.getX(0)),i.push(r.getX(e)),i.push(r.getX(e+1));else for(let e=0;e<f;e++)e%2===0?(i.push(r.getX(e)),i.push(r.getX(e+1)),i.push(r.getX(e+2))):(i.push(r.getX(e+2)),i.push(r.getX(e+1)),i.push(r.getX(e)));i.length/3!==f&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");let c=o.clone();return c.setIndex(i),c.clearGroups(),c}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",l),o}export{M as a,R as b};
1
+ import{a as b,ba as x,ca as y,w as A,x as w,y as g}from"./chunk-BUTQWGOR.js";b();function M(o,l=!1){let r=o[0].index!==null,f=new Set(Object.keys(o[0].attributes)),i=new Set(Object.keys(o[0].morphAttributes)),c={},e={},h=o[0].morphTargetsRelative,u=new y,d=0;for(let t=0;t<o.length;++t){let s=o[t],a=0;if(r!==(s.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(let n in s.attributes){if(!f.has(n))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+'. All geometries must have compatible attributes; make sure "'+n+'" attribute exists among all geometries, or in none of them.'),null;c[n]===void 0&&(c[n]=[]),c[n].push(s.attributes[n]),a++}if(a!==f.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". Make sure all geometries have the same number of attributes."),null;if(h!==s.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(let n in s.morphAttributes){if(!i.has(n))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". .morphAttributes must be consistent throughout all geometries."),null;e[n]===void 0&&(e[n]=[]),e[n].push(s.morphAttributes[n])}if(l){let n;if(r)n=s.index.count;else if(s.attributes.position!==void 0)n=s.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". The geometry must have either an index or a position attribute"),null;u.addGroup(d,n,t),d+=n}}if(r){let t=0,s=[];for(let a=0;a<o.length;++a){let n=o[a].index;for(let m=0;m<n.count;++m)s.push(n.getX(m)+t);t+=o[a].attributes.position.count}u.setIndex(s)}for(let t in c){let s=B(c[t]);if(!s)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+t+" attribute."),null;u.setAttribute(t,s)}for(let t in e){let s=e[t][0].length;if(s===0)break;u.morphAttributes=u.morphAttributes||{},u.morphAttributes[t]=[];for(let a=0;a<s;++a){let n=[];for(let p=0;p<e[t].length;++p)n.push(e[t][p][a]);let m=B(n);if(!m)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+t+" morphAttribute."),null;u.morphAttributes[t].push(m)}}return u}function B(o){let l,r,f,i=-1,c=0;for(let d=0;d<o.length;++d){let t=o[d];if(l===void 0&&(l=t.array.constructor),l!==t.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(r===void 0&&(r=t.itemSize),r!==t.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(f===void 0&&(f=t.normalized),f!==t.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(i===-1&&(i=t.gpuType),i!==t.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;c+=t.count*r}let e=new l(c),h=new x(e,r,f),u=0;for(let d=0;d<o.length;++d){let t=o[d];if(t.isInterleavedBufferAttribute){let s=u/r;for(let a=0,n=t.count;a<n;a++)for(let m=0;m<r;m++){let p=t.getComponent(a,m);h.setComponent(a+s,m,p)}}else e.set(t.array,u);u+=t.count*r}return i!==void 0&&(h.gpuType=i),h}function R(o,l){if(l===A)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),o;if(l===g||l===w){let r=o.getIndex();if(r===null){let e=[],h=o.getAttribute("position");if(h!==void 0){for(let u=0;u<h.count;u++)e.push(u);o.setIndex(e),r=o.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),o}let f=r.count-2,i=[];if(l===g)for(let e=1;e<=f;e++)i.push(r.getX(0)),i.push(r.getX(e)),i.push(r.getX(e+1));else for(let e=0;e<f;e++)e%2===0?(i.push(r.getX(e)),i.push(r.getX(e+1)),i.push(r.getX(e+2))):(i.push(r.getX(e+2)),i.push(r.getX(e+1)),i.push(r.getX(e)));i.length/3!==f&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");let c=o.clone();return c.setIndex(i),c.clearGroups(),c}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",l),o}export{M as a,R as b};
@@ -2,7 +2,7 @@ import { Color as Color$1, CompositeExpression, DiffCommand, DiffOperations, Fea
2
2
  import { AnnotationCollection, AnnotationSymbol, AreaCollection, AreaId, BaseTextAreaProperties, Category as MVFCategory, CategoryId, Connection as MVFConnection, Details, EnterpriseCategory as MVFEnterpriseCategory, EnterpriseCategory as MvfEnterpriseCategory, EnterpriseCategoryId as MVFEnterpriseCategoryId, EnterpriseLocation as MVFEnterpriseLocation, EnterpriseLocation as MvfEnterpriseLocation, EnterpriseLocationId as MVFEnterpriseLocationId, EnterpriseLocationInstance, EnterpriseTexture, EnterpriseVenue as MVFEnterpriseVenue, EntranceCollection, EntranceFeature, Facade as MVFFacade, Feature, Feature as MVFFeature, FeatureCollection, FloatingFloorTextProperties, FloorCollection, FloorId, FloorProperties as MVFFloor, FloorProperties as MvfFloor, FloorStack as MVFFloorStack, FloorStack as MvfFloorStack, FloorTextCommonProperties, Geometry, Hyperlink as MVFHyperlink, Image as MVFImage, Language, LineStringStyle, LineStringStyle as TMVFLineStringStyle, Location as MVFLocation, LocationId, LocationLink, LocationSocial, LocationState, MultiPolygon, NavigationFlagDeclarations, NodeCollection, NodeCollection as MVFNodeCollection, NodeId, ObstructionCollection, ObstructionFeature, ObstructionId, ObstructionProperties, OpeningHoursSpecification, OperationHours, ParsedMVF, ParsedMVF as TMVF, ParsedMVFLocalePack, Point, PointStyle, PointStyle as TMVFPointStyle, Polygon, PolygonStyle, PolygonStyle as TMVFPolygonStyle, SiblingGroup, SpaceCollection, SpaceFeature, SpaceId, SpaceProperties, Style as TMVFStyle, StyleCollection, StyleCollection as TMVFStyleCollection, TilesetStyle } from '@mappedin/mvf-v2';
3
3
  import { ParsedMVF, RawMVF } from '@mappedin/mvf-v2/no-validator';
4
4
  import { Group as TweenGroup, Tween } from '@tweenjs/tween.js';
5
- import { BatchedMesh, BatchedMeshGeometryRange, BufferAttribute, BufferGeometry, Camera, Camera as ThreeCamera, Color, Group, Intersection, LineSegments, Mesh, MeshLambertMaterial, MeshLambertMaterialParameters, Object3D, Object3DEventMap, PerspectiveCamera, Plane, PlaneGeometry, Raycaster, Scene, ShaderMaterial, Texture, TubeGeometry, Vector2, Vector3, WebGLRenderer } from 'three';
5
+ import { AmbientLight, BatchedMesh, BatchedMeshGeometryRange, BufferAttribute, BufferGeometry, Camera, Camera as ThreeCamera, Color, DirectionalLight, Group, Intersection, LineSegments, Mesh, MeshLambertMaterial, MeshLambertMaterialParameters, Object3D, Object3DEventMap, PerspectiveCamera, Plane, PlaneGeometry, Raycaster, Scene, ShaderMaterial, Texture, TubeGeometry, Vector2, Vector3, WebGLRenderer } from 'three';
6
6
  import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
7
7
 
8
8
  declare const VALID_CONTEXTS: readonly [
@@ -580,6 +580,7 @@ type Style = {
580
580
  };
581
581
  declare class StyleComponent implements Style {
582
582
  #private;
583
+ readonly type: "style";
583
584
  initialColor: string;
584
585
  set color(color: string);
585
586
  get color(): string;
@@ -611,6 +612,7 @@ declare class StyleComponent implements Style {
611
612
  constructor(style?: Partial<Style>);
612
613
  }
613
614
  declare class Text3DStyleComponent implements Partial<Text3DStyle> {
615
+ readonly type: "text3dStyle";
614
616
  visible?: boolean;
615
617
  altitude?: number;
616
618
  color?: string;
@@ -839,6 +841,7 @@ type ModelStyle = {
839
841
  clippingPlaneTopVisible: boolean;
840
842
  };
841
843
  declare class ModelStyleComponnet implements Partial<ModelStyle> {
844
+ readonly type: "modelStyle";
842
845
  dirty: boolean;
843
846
  visible: boolean;
844
847
  opacity: number;
@@ -902,6 +905,7 @@ declare class GeometryGroupObject3D extends Object3D {
902
905
  visible: boolean;
903
906
  readonly type: "geometry-group";
904
907
  components: never[];
908
+ getComponent(): void;
905
909
  userData: {
906
910
  entityId: string | number;
907
911
  entities3D: Set<string | number>;
@@ -919,6 +923,7 @@ declare class GeometryGroupObject3D extends Object3D {
919
923
  getfirstChildEntityId(): string | number | undefined;
920
924
  }
921
925
  declare class InteractionComponent {
926
+ type: "interaction";
922
927
  hover: boolean | "user-interaction";
923
928
  dirty: boolean;
924
929
  }
@@ -2003,10 +2008,10 @@ interface $ZodLiteral<T extends util.Literal = util.Literal> extends $ZodType {
2003
2008
  _zod: $ZodLiteralInternals<T>;
2004
2009
  }
2005
2010
  declare const $ZodLiteral: $constructor<$ZodLiteral>;
2006
- type _File = typeof globalThis extends {
2011
+ type _File$1 = typeof globalThis extends {
2007
2012
  File: infer F extends new (...args: any[]) => any;
2008
2013
  } ? InstanceType<F> : {};
2009
- interface File$1 extends _File {
2014
+ interface File$1 extends _File$1 {
2010
2015
  readonly type: string;
2011
2016
  readonly size: number;
2012
2017
  }
@@ -4679,6 +4684,10 @@ declare class ModelComponent {
4679
4684
  color: Color;
4680
4685
  setColor(): void;
4681
4686
  clippingPlane?: Plane;
4687
+ /**
4688
+ * The model scene that was loaded from GLB, minus the hole-fill-mesh business.
4689
+ */
4690
+ get modelScene(): Object3D<import("three").Object3DEventMap> | Geometry3DObject3D | undefined;
4682
4691
  position: Vector3;
4683
4692
  get altitude(): number;
4684
4693
  set altitude(value: number);
@@ -5007,6 +5016,7 @@ type Outline = {
5007
5016
  };
5008
5017
  declare class OutlineComponent implements Outline {
5009
5018
  #private;
5019
+ readonly type: "outline";
5010
5020
  color: string;
5011
5021
  dirty: boolean;
5012
5022
  /** Controls whether the outline should be updated in the renderer */
@@ -5036,6 +5046,7 @@ declare class OutlineComponent implements Outline {
5036
5046
  constructor(color: string);
5037
5047
  }
5038
5048
  declare class FocusableComponent {
5049
+ readonly type: "focusable";
5039
5050
  focusMesh?: Mesh;
5040
5051
  dirty: boolean;
5041
5052
  }
@@ -5068,6 +5079,7 @@ type SingleTexture = {
5068
5079
  ];
5069
5080
  };
5070
5081
  declare class TextureComponent implements TextureStyle {
5082
+ readonly type: "texture";
5071
5083
  texture?: SingleTexture;
5072
5084
  topTexture?: SingleTexture;
5073
5085
  showTexture: boolean;
@@ -5084,6 +5096,7 @@ type Border = {
5084
5096
  needsRebuild: boolean;
5085
5097
  };
5086
5098
  declare class BorderComponent implements Border {
5099
+ readonly type: "border";
5087
5100
  dirty: boolean;
5088
5101
  needsRebuild: boolean;
5089
5102
  set visible(visible: boolean);
@@ -5100,6 +5113,7 @@ type ClippingPlane = {
5100
5113
  topVisible?: boolean;
5101
5114
  };
5102
5115
  declare class ClippingPlaneComponent implements ClippingPlane {
5116
+ readonly type: "clippingPlane";
5103
5117
  dirty: boolean;
5104
5118
  needsRebuild: boolean;
5105
5119
  verticalOffset: number;
@@ -5138,6 +5152,23 @@ declare class PatMeshContainer extends Geometry3DObject3D {
5138
5152
  }
5139
5153
  type MeshComponentTypes = MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent | Text3DComponent | ImageComponent;
5140
5154
  type MappedComponentType<M> = M extends MeshComponent ? "geometry" : M extends PathComponent ? "path" : M extends ModelComponent ? "model" : M extends CustomGeometryComponent ? "custom-geometry" : M extends ImageComponent ? "image" : M extends Text3DComponent ? "text3d" : never;
5155
+ type ComponentTypeMap = {
5156
+ interaction: InteractionComponent;
5157
+ geometry: MeshComponent;
5158
+ path: PathComponent;
5159
+ model: ModelComponent;
5160
+ "custom-geometry": CustomGeometryComponent;
5161
+ image: ImageComponent;
5162
+ text3d: Text3DComponent;
5163
+ style: StyleComponent;
5164
+ text3dStyle: Text3DStyleComponent;
5165
+ modelStyle: ModelStyleComponnet;
5166
+ outline: OutlineComponent;
5167
+ focusable: FocusableComponent;
5168
+ texture: TextureComponent;
5169
+ border: BorderComponent;
5170
+ clippingPlane: ClippingPlaneComponent;
5171
+ };
5141
5172
  declare class Geometry3D<M extends MeshComponentTypes = MeshComponent, S extends StyleComponent | Text3DStyleComponent | ModelStyleComponnet = StyleComponent, I extends InteractionComponent = InteractionComponent, T extends MappedComponentType<M> = MappedComponentType<M>, O extends OutlineComponent | undefined = OutlineComponent | undefined, F extends FocusableComponent | undefined = FocusableComponent | undefined, TX extends TextureComponent | undefined = TextureComponent | undefined, B extends BorderComponent | undefined = BorderComponent | undefined, C extends ClippingPlaneComponent | undefined = ClippingPlaneComponent | undefined> {
5142
5173
  id: string | number;
5143
5174
  components: [
@@ -5150,6 +5181,7 @@ declare class Geometry3D<M extends MeshComponentTypes = MeshComponent, S extends
5150
5181
  TX?,
5151
5182
  C?
5152
5183
  ];
5184
+ getComponent<K extends keyof ComponentTypeMap>(type: K): ComponentTypeMap[K] | undefined;
5153
5185
  /**
5154
5186
  * Parent geometry group ID
5155
5187
  */
@@ -15227,7 +15259,7 @@ declare class CollisionSystem extends PubSub<TCollisionSystemEvent, keyof TColli
15227
15259
  working: boolean;
15228
15260
  private _postMessage;
15229
15261
  componentArray: (MarkerComponent | LabelComponent)[];
15230
- update: (watermarkWidth: number, watermarkHeight: number, watermarkPosition?: WatermarkPosition, isPanning?: boolean, staticColliders?: Rectangle[]) => void;
15262
+ update: (watermarkWidth: number, watermarkHeight: number, watermarkPosition?: WatermarkPosition, lockStrategies?: boolean, staticColliders?: Rectangle[]) => void;
15231
15263
  resize(watermarkWidth: number, watermarkHeight: number, watermarkPosition: WatermarkPosition): void;
15232
15264
  /**
15233
15265
  * Resolve collisions
@@ -15265,7 +15297,7 @@ declare class TapsController {
15265
15297
  destroy(): void;
15266
15298
  }
15267
15299
  type InteractionPayload = {
15268
- entity2D?: Geometry2D;
15300
+ entity2D: Geometry2D[];
15269
15301
  entity3D?: Geometry3D;
15270
15302
  position?: Vector3;
15271
15303
  groupContainers?: GroupContainerObject3D[];
@@ -15289,7 +15321,6 @@ type InteractionState = {
15289
15321
  } | undefined;
15290
15322
  };
15291
15323
  declare class InteractionSystem extends PubSub<InteractionEvents> {
15292
- #private;
15293
15324
  raycaster: Raycaster;
15294
15325
  private state;
15295
15326
  private coreState;
@@ -15309,7 +15340,6 @@ declare class InteractionSystem extends PubSub<InteractionEvents> {
15309
15340
  }>): void;
15310
15341
  setHovered3DEntityInteractionComponentDirty(): void;
15311
15342
  hasTouched: boolean;
15312
- onPointerMoveRaf: (event: PointerEvent) => void;
15313
15343
  private onPointerMove;
15314
15344
  tapsControl: TapsController;
15315
15345
  getThreeDIntersectsFromXY(point: Vector2): Intersection<Object3D<Object3DEventMap>>[];
@@ -15338,7 +15368,7 @@ declare class InteractionSystem extends PubSub<InteractionEvents> {
15338
15368
  enableDebug(): void;
15339
15369
  get _state(): {
15340
15370
  hovered3DEntity: Geometry3D | undefined;
15341
- hovered2DEntity: Geometry2D | undefined;
15371
+ hovered2DEntities: Set<string | number>;
15342
15372
  hovered3DContainers: GroupContainerObject3D[] | undefined;
15343
15373
  lastHover: Geometry3D | undefined;
15344
15374
  interaction: InteractionState;
@@ -15991,6 +16021,7 @@ declare class RenderSystem extends PubSub<{
15991
16021
  private twoDFrameId;
15992
16022
  private animationFrameId;
15993
16023
  private nextFrame;
16024
+ private updateEntitiesFrameId;
15994
16025
  update: (sync?: boolean) => Promise<any>;
15995
16026
  /**
15996
16027
  * Paint to screen
@@ -17167,6 +17198,19 @@ declare class ClippingPlaneSystem {
17167
17198
  private process;
17168
17199
  private createHoleFillGeometry;
17169
17200
  }
17201
+ export interface ISystemPlugin {
17202
+ /**
17203
+ *
17204
+ * @param state - The current state of the renderer.
17205
+ */
17206
+ update(state: RendererState): void;
17207
+ }
17208
+ declare class PluginSystem {
17209
+ private plugins;
17210
+ registerPlugin(plugin: ISystemPlugin): void;
17211
+ unregisterPlugin(plugin: ISystemPlugin): void;
17212
+ update(state: RendererState): void;
17213
+ }
17170
17214
  type Systems = {
17171
17215
  cameraSystem: CameraSystem;
17172
17216
  panBoundsSystem: PanBoundsSystem;
@@ -17199,6 +17243,7 @@ type Systems = {
17199
17243
  borderSystem: BorderSystem;
17200
17244
  renderOrderSystem: RenderOrderSystem;
17201
17245
  clippingPlaneSystem: ClippingPlaneSystem;
17246
+ pluginSystem: PluginSystem;
17202
17247
  };
17203
17248
  export type MapViewState = {
17204
17249
  readonly type: "map-view";
@@ -17252,10 +17297,12 @@ declare class Core extends PubSub<MapEvent> {
17252
17297
  altitude?: number;
17253
17298
  interactive?: boolean;
17254
17299
  }, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<ShapeState>;
17300
+ registerPlugin(plugin: ISystemPlugin): void;
17301
+ unregisterPlugin(plugin: ISystemPlugin): void;
17255
17302
  /**
17256
17303
  * Add a geometry group from GeoJSON data
17257
17304
  */
17258
- addGeometryGroup<T extends FeatureCollection$1<Polygon$1 | MultiPolygon$1 | LineString, any>>(id: string, geometry: T, style?: T extends FeatureCollection$1<LineString, any> ? LineStyle : PaintStyle, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<GeometryGroupState>;
17305
+ addGeometryGroup<T extends FeatureCollection$1<Polygon$1 | MultiPolygon$1 | LineString, any>>(id: string, geometry: T, style?: (T extends FeatureCollection$1<LineString, any> ? LineStyle : PaintStyle) | ((feature: Feature$1<Polygon$1 | MultiPolygon$1 | LineString, any>) => T extends FeatureCollection$1<LineString, any> ? LineStyle : PaintStyle), parent?: EntityId<GroupContainerState> | string | number | null): EntityId<GeometryGroupState>;
17259
17306
  addOccluder<T extends Feature$1<Polygon$1 | MultiPolygon$1, any>>(feature: T, parent?: EntityId<GroupContainerState> | string | number | null): number;
17260
17307
  addImage(id: string, geometry: Feature$1<Point$1, ImageProperties>, style: ImageStyle, parent?: EntityId<GroupContainerState> | string | null): EntityId<ImageState> | undefined;
17261
17308
  /**
@@ -17571,6 +17618,7 @@ type GroupContainerState = {
17571
17618
  declare class GroupContainerObject3D extends Object3D {
17572
17619
  childrenIds: Set<string | number>;
17573
17620
  children: (GroupContainerObject3D | GeometryGroupObject3D | BatchedText | Geometry2D["object3d"] | NonNullable<Geometry3D["object3d"]>)[];
17621
+ getComponent(): void;
17574
17622
  readonly type: "group-container";
17575
17623
  userData: {
17576
17624
  entityId: string | number;
@@ -17735,6 +17783,11 @@ declare class LabelComponent {
17735
17783
  }
17736
17784
  declare class Geometry2DObject3D extends Object3D {
17737
17785
  }
17786
+ type ComponentTypeMap$1 = {
17787
+ interaction: InteractionComponent;
17788
+ marker: MarkerComponent;
17789
+ label: LabelComponent;
17790
+ };
17738
17791
  declare class Geometry2D {
17739
17792
  id: string | number;
17740
17793
  get type(): "label" | "marker";
@@ -17748,6 +17801,7 @@ declare class Geometry2D {
17748
17801
  MarkerComponent | LabelComponent,
17749
17802
  InteractionComponent?
17750
17803
  ];
17804
+ getComponent<T extends keyof ComponentTypeMap$1>(type: T): ComponentTypeMap$1[T] | undefined;
17751
17805
  disposed: boolean;
17752
17806
  constructor(ui: MarkerComponent | LabelComponent, position: Vector3, verticalOffset?: number);
17753
17807
  private worldPosition;
@@ -18069,15 +18123,27 @@ type MapEventPayload<EventName extends keyof MapEvent> = MapEvent[EventName] ext
18069
18123
  } ? MapEvent[EventName]["data"] : MapEvent[EventName];
18070
18124
  type All3DTypes = Geometry3DTypes | GeometryGroupObject3D | GroupContainerObject3D;
18071
18125
  type RendererState = {
18072
- geometry3DMap: Map<string | number, All3DTypes>;
18073
- geometry2DMap: Map<string | number, Geometry2D>;
18074
- geometry2DIdsInScene: Set<Geometry2D["id"]>;
18075
- geometry3DIdsInScene: Set<All3DTypes["id"]>;
18126
+ /**
18127
+ * A map of all 3D geometries in the world.
18128
+ */
18129
+ readonly geometry3DMap: Map<string | number, All3DTypes>;
18130
+ /**
18131
+ * A map of all 2D geometries in the world.
18132
+ */
18133
+ readonly geometry2DMap: Map<string | number, Geometry2D>;
18134
+ /**
18135
+ * A set of all 2D geometry IDs in the scene. This is updated when objects' visiblity changes.
18136
+ */
18137
+ readonly geometry2DIdsInScene: Set<Geometry2D["id"]>;
18138
+ /**
18139
+ * A set of all 3D geometry IDs in the scene. This is updated when objects' visiblity changes.
18140
+ */
18141
+ readonly geometry3DIdsInScene: Set<All3DTypes["id"]>;
18076
18142
  /**
18077
18143
  * IDs of geometry groups that need to be loaded, including preloaded geometry groups that are not in the scene yet
18078
18144
  */
18079
- geometryGroupIdsToLoad: Set<GeometryGroupObject3D["userData"]["entityId"]>;
18080
- entityScene: GroupContainerObject3D;
18145
+ readonly geometryGroupIdsToLoad: Set<GeometryGroupObject3D["userData"]["entityId"]>;
18146
+ readonly geometryScene: GroupContainerObject3D;
18081
18147
  hoverColor: string;
18082
18148
  text3dHoverColor: string;
18083
18149
  center?: Position$1;
@@ -18100,6 +18166,10 @@ type RendererState = {
18100
18166
  number
18101
18167
  ];
18102
18168
  useStandaloneCamera: boolean;
18169
+ directionalLight: DirectionalLight;
18170
+ ambientLight: AmbientLight;
18171
+ renderer: WebGLRenderer;
18172
+ threeJSScene: Scene;
18103
18173
  };
18104
18174
  type EntityTypes = Geometry3DTypes | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D;
18105
18175
  type TransformImageRequest = (url: string) => Promise<{
@@ -18311,6 +18381,7 @@ declare class MarkerComponent {
18311
18381
  collisionDirty: boolean;
18312
18382
  visibilityNeedsUpdate: "show" | "hide" | false;
18313
18383
  constructor(contentHtml: string, options?: AddMarkerOptions);
18384
+ updateDimensionsIfZeroWidthHeight(width?: number, height?: number): void;
18314
18385
  updateDimensions(width?: number, height?: number): void;
18315
18386
  animation: Animation | null;
18316
18387
  currentStrategyIndex: number;
@@ -20373,6 +20444,16 @@ export declare class MapView {
20373
20444
  * @default false
20374
20445
  */
20375
20446
  set __INTERNAL__hidePathsNotOnCurrentFloor(value: boolean);
20447
+ /**
20448
+ * @internal
20449
+ * @experimental
20450
+ */
20451
+ registerPlugin(plugin: ISystemPlugin): void;
20452
+ /**
20453
+ * @internal
20454
+ * @experimental
20455
+ */
20456
+ unregisterPlugin(plugin: ISystemPlugin): void;
20376
20457
  }
20377
20458
  /**
20378
20459
  * ## Camera in Mappedin JS
@@ -22401,7 +22482,7 @@ declare class DirectionsInternal {
22401
22482
  multiplicativeDistanceWeightScaling?: boolean;
22402
22483
  flagDeclarations?: ParsedMVF["navigationFlags.json"];
22403
22484
  });
22404
- processTargets(fromNodesByTarget: Map<TNavigationTarget, string[]>, toNodesByTarget: Map<TNavigationTarget, string[]>): {
22485
+ processTargets(fromNodesByTarget: Map<TNavigationTarget, string[]>, toNodesByTarget: Map<TNavigationTarget, string[]>, mapData: MapDataInternal): {
22405
22486
  originIds: string[];
22406
22487
  destinationNodeIds: string[];
22407
22488
  featureToNodeIdsMap: Map<TNavigationTarget, string[]>;
@@ -27258,6 +27339,15 @@ export type TShow3DMapOptions = {
27258
27339
  * @default false
27259
27340
  */
27260
27341
  disableWorkers?: boolean;
27342
+ /**
27343
+ * @experimental
27344
+ * @internal
27345
+ *
27346
+ * If true, updateState calls will not be validated. This allows for faster updates and should likely only be used for production environment where the input
27347
+ * is predictable and has been validated by the developer.
27348
+ * @default false
27349
+ */
27350
+ disableUpdateStateValidation?: boolean;
27261
27351
  };
27262
27352
  /**
27263
27353
  * @internal
@@ -27370,6 +27460,7 @@ export {
27370
27460
  OperationHours,
27371
27461
  Point$1 as Point,
27372
27462
  Polygon$1 as Polygon,
27463
+ RendererState as TRendererState,
27373
27464
  SiblingGroup,
27374
27465
  Style$2 as Style,
27375
27466
  TImage3DState as TImageState,
package/lib/esm/index.js CHANGED
@@ -1 +1 @@
1
- import{A as C,B as D,C as E,D as G,E as H,G as I,H as J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,a as c,b as d,c as e,d as f,e as g,f as h,g as i,h as j,i as k,j as l,k as m,l as n,m as o,n as p,o as q,p as r,q as s,r as t,s as u,t as v,u as w,v as x,w as y,x as z,y as A,z as B}from"./chunk-DZR5BIFS.js";import{_a as F,a,b}from"./chunk-VNMMMLDZ.js";import"./chunk-MASF4ZFZ.js";import"./chunk-NXEXDQWS.js";import"./chunk-5W2UDR4H.js";export{x as ACTION_TYPE,H as ANIMATION_TWEENS,o as Annotation,g as Area,y as BEARING_TYPE,z as CONNECTION_TYPE,l as Connection,c as Coordinate,B as DOORS,C as Directions,h as Door,a as E_SDK_LOG_LEVEL,s as EnterpriseCategory,r as EnterpriseLocation,t as EnterpriseVenue,q as Facade,j as Floor,p as FloorStack,e as Hyperlink,f as ImageMetaData,E as LocationCategory,D as LocationProfile,k as MAPPEDIN_COLORS,m as MapObject,L as MapView,d as Node,n as PointOfInterest,i as Space,A as WALLS,O as __setWatermarkOnClickFn,V as checkWorkerUrls,J as disableText3DWorker,G as enableTestMode,N as findPreferredLanguageInVenue,R as forceEnterpriseLocations,T as getMapData,U as getMapDataEnterprise,I as getMultiFloorState,X as getVersion,M as hydrateMapData,P as hydrateMapDataFromMVF,u as parseMVF,F as preloadFont,b as setLoggerLevel,Q as setUseEnterpriseAPI,K as setWorkersUrl,S as shouldForceEnterpriseLocations,W as show3dMap,Y as show3dMapGeojson,w as unzipAndParseMVFv2,v as unzipMVF};
1
+ import{A as C,B as D,C as E,D as G,E as H,G as I,H as J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,a as c,b as d,c as e,d as f,e as g,f as h,g as i,h as j,i as k,j as l,k as m,l as n,m as o,n as p,o as q,p as r,q as s,r as t,s as u,t as v,u as w,v as x,w as y,x as z,y as A,z as B}from"./chunk-M5K474PU.js";import{a,ab as F,b}from"./chunk-NNBEOC7F.js";import"./chunk-YNQYXD2A.js";import"./chunk-BUTQWGOR.js";import"./chunk-5W2UDR4H.js";export{x as ACTION_TYPE,H as ANIMATION_TWEENS,o as Annotation,g as Area,y as BEARING_TYPE,z as CONNECTION_TYPE,l as Connection,c as Coordinate,B as DOORS,C as Directions,h as Door,a as E_SDK_LOG_LEVEL,s as EnterpriseCategory,r as EnterpriseLocation,t as EnterpriseVenue,q as Facade,j as Floor,p as FloorStack,e as Hyperlink,f as ImageMetaData,E as LocationCategory,D as LocationProfile,k as MAPPEDIN_COLORS,m as MapObject,L as MapView,d as Node,n as PointOfInterest,i as Space,A as WALLS,O as __setWatermarkOnClickFn,V as checkWorkerUrls,J as disableText3DWorker,G as enableTestMode,N as findPreferredLanguageInVenue,R as forceEnterpriseLocations,T as getMapData,U as getMapDataEnterprise,I as getMultiFloorState,X as getVersion,M as hydrateMapData,P as hydrateMapDataFromMVF,u as parseMVF,F as preloadFont,b as setLoggerLevel,Q as setUseEnterpriseAPI,K as setWorkersUrl,S as shouldForceEnterpriseLocations,W as show3dMap,Y as show3dMapGeojson,w as unzipAndParseMVFv2,v as unzipMVF};