venue-js 1.2.0-next.12 → 1.2.0-next.13

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.
package/dist/index.mjs CHANGED
@@ -3987,8 +3987,10 @@ var RendererManager = class extends EventTarget {
3987
3987
  const elements = elemIds.map((id) => this.elementsMap.get(id)).flat();
3988
3988
  elements.forEach((element) => {
3989
3989
  const controller = this.elementRenderer.createHighlightController(element);
3990
- controller.start();
3991
- this.highlightControllers.push(controller);
3990
+ if (controller && _isFunction(controller.start)) {
3991
+ controller.start();
3992
+ this.highlightControllers.push(controller);
3993
+ }
3992
3994
  });
3993
3995
  };
3994
3996
  clearHighlightElements = () => {
@@ -4038,6 +4040,20 @@ var defaultOptions = {
4038
4040
  interactions: true,
4039
4041
  locale: DEFAULT_LOCALE
4040
4042
  };
4043
+ var parseMaptalksOptions = (options) => {
4044
+ return {
4045
+ centerCross: options.centerCross ?? false,
4046
+ ...options.interactions === false ? {
4047
+ draggable: false,
4048
+ dragPan: false,
4049
+ dragRotate: false,
4050
+ dragPitch: false,
4051
+ scrollWheelZoom: false,
4052
+ touchZoom: false,
4053
+ doubleClickZoom: false
4054
+ } : {}
4055
+ };
4056
+ };
4041
4057
  var IndoorMap = class extends EventTarget {
4042
4058
  options;
4043
4059
  //TODO: refac functions; let them do only 1 thing in a function
@@ -4092,13 +4108,14 @@ var IndoorMap = class extends EventTarget {
4092
4108
  constructor(elementId, options) {
4093
4109
  super();
4094
4110
  const combinedOptions = _5.merge({}, defaultOptions, options);
4095
- this.options = options;
4111
+ this.options = combinedOptions;
4096
4112
  const {
4097
4113
  onMapReady,
4098
4114
  onMapLoading,
4099
4115
  pixelRatio,
4100
4116
  locale
4101
4117
  } = combinedOptions;
4118
+ const maptalksOptions = parseMaptalksOptions(combinedOptions);
4102
4119
  this.map = new Map2(elementId, {
4103
4120
  attribution: false,
4104
4121
  // Temporart set, not really default view
@@ -4106,16 +4123,7 @@ var IndoorMap = class extends EventTarget {
4106
4123
  center: INITIAL_CENTER,
4107
4124
  zoom: INITIAL_ZOOM,
4108
4125
  clickTimeThreshold: 600,
4109
- centerCross: options.centerCross ?? false,
4110
- ...options.interactions === false ? {
4111
- draggable: false,
4112
- dragPan: false,
4113
- dragRotate: false,
4114
- dragPitch: false,
4115
- scrollWheelZoom: false,
4116
- touchZoom: false,
4117
- doubleClickZoom: false
4118
- } : {},
4126
+ ...maptalksOptions,
4119
4127
  baseLayer: new TileLayer("base", {
4120
4128
  urlTemplate: "https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png",
4121
4129
  subdomains: ["a", "b", "c", "d"],
@@ -4145,6 +4153,12 @@ var IndoorMap = class extends EventTarget {
4145
4153
  this.map.on("click", this.handleMapClick);
4146
4154
  this.dataClient = options.dataClient;
4147
4155
  }
4156
+ setOptions(options) {
4157
+ const combinedOptions = _5.merge({}, defaultOptions, options);
4158
+ this.options = combinedOptions;
4159
+ const maptalksOptions = parseMaptalksOptions(combinedOptions);
4160
+ this.map.setOptions(maptalksOptions);
4161
+ }
4148
4162
  set dataClient(value) {
4149
4163
  this.#dataClient = value;
4150
4164
  if (!this.options.camera?.defaultView?.center) {
@@ -4810,6 +4824,36 @@ var IndoorMap = class extends EventTarget {
4810
4824
  requestAnimationFrame(this.render.bind(this));
4811
4825
  }
4812
4826
  };
4827
+
4828
+ // src/IndoorMap/renderer/3d/objects/PulsingMarker.ts
4829
+ import * as maptalks8 from "maptalks-gl";
4830
+ import { BaseObject as BaseObject7 } from "maptalks.three";
4831
+ import * as THREE4 from "three";
4832
+ var OPTIONS5 = {
4833
+ radius: 100,
4834
+ altitude: 0
4835
+ };
4836
+ var PulsingMarker = class extends BaseObject7 {
4837
+ constructor(coordinate, options, material, layer) {
4838
+ options = maptalks8.Util.extend({}, OPTIONS5, options, { layer, coordinate });
4839
+ super();
4840
+ this._initOptions(options);
4841
+ const { altitude, radius } = options;
4842
+ const r = layer.distanceToVector3(radius, radius).x;
4843
+ const geometry = new THREE4.CircleGeometry(r, 50);
4844
+ this._createMesh(geometry, material);
4845
+ const z = layer.altitudeToVector3(altitude, altitude).x;
4846
+ const position = layer.coordinateToVector3(coordinate, z);
4847
+ this.getObject3d().position.copy(position);
4848
+ this._scale = 1;
4849
+ }
4850
+ // test animation
4851
+ _animation() {
4852
+ this._scale = this._scale > 1 ? 0 : this._scale;
4853
+ this._scale += 0.02;
4854
+ this.getObject3d().scale.set(this._scale, this._scale, this._scale);
4855
+ }
4856
+ };
4813
4857
  export {
4814
4858
  ALL_FEATURE_TYPES,
4815
4859
  BASE_LAYER_NAME,
@@ -4830,7 +4874,9 @@ export {
4830
4874
  ORIGIN_MARKER_ID,
4831
4875
  occupant_helper_exports as OccupantHelpers,
4832
4876
  POI_MARKER_LAYER_NAME,
4877
+ PulsingMarker,
4833
4878
  QueryObserver2 as QueryObserver,
4879
+ TextSpriteMarker,
4834
4880
  USER_LOCATION_ELEMENT_ID,
4835
4881
  USER_LOCATION_LAYER_NAME,
4836
4882
  VENUE_EVENTS,