venue-js 1.2.0-next.17 → 1.2.0-next.19
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.d.mts +1 -6
- package/dist/index.d.ts +1 -6
- package/dist/index.js +21 -53
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -37
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -291,7 +291,7 @@ __export(occupant_helper_exports, {
|
|
|
291
291
|
getOccupantMainLocation: () => getOccupantMainLocation,
|
|
292
292
|
getOccupantMarkerLocations: () => getOccupantMarkerLocations
|
|
293
293
|
});
|
|
294
|
-
import
|
|
294
|
+
import { compact } from "lodash-es";
|
|
295
295
|
var getOccupantMainLocation = (occupant) => {
|
|
296
296
|
return occupant.properties.kiosk || occupant.properties.unit;
|
|
297
297
|
};
|
|
@@ -300,7 +300,7 @@ var getOccupantCorrelatedLocations = (occupant) => {
|
|
|
300
300
|
...occupant.properties.units,
|
|
301
301
|
...occupant.properties.kiosks
|
|
302
302
|
];
|
|
303
|
-
return
|
|
303
|
+
return compact(allCorrelatedLocations);
|
|
304
304
|
};
|
|
305
305
|
var getOccupantMarkerLocations = (occupant, options) => {
|
|
306
306
|
const placementType = options?.type ? options.type : occupant.properties.show_name_on_all_units ? "ALL_LOCATIONS" : "ONCE_PER_LEVEL";
|
|
@@ -308,11 +308,11 @@ var getOccupantMarkerLocations = (occupant, options) => {
|
|
|
308
308
|
const mainLocationLevel = mainLocation?.properties?.level_id;
|
|
309
309
|
const allCorrelatedLocations = getOccupantCorrelatedLocations(occupant);
|
|
310
310
|
if (placementType === "ALL_LOCATIONS") {
|
|
311
|
-
return
|
|
311
|
+
return compact([mainLocation, ...allCorrelatedLocations]);
|
|
312
312
|
}
|
|
313
313
|
const otherLevelLocations = allCorrelatedLocations.filter((f) => f.properties.level_id !== mainLocationLevel);
|
|
314
314
|
const onePerLevelLocations = [...new Map(otherLevelLocations.map((loc) => [loc.properties.level_id, loc])).values()];
|
|
315
|
-
return
|
|
315
|
+
return compact([mainLocation, ...onePerLevelLocations]);
|
|
316
316
|
};
|
|
317
317
|
|
|
318
318
|
// src/data/getDataClient.ts
|
|
@@ -2673,7 +2673,7 @@ var CameraManager = class {
|
|
|
2673
2673
|
};
|
|
2674
2674
|
|
|
2675
2675
|
// src/IndoorMap/renderer/RendererManager.ts
|
|
2676
|
-
import { min, compact, isFunction } from "lodash-es";
|
|
2676
|
+
import { min, compact as compact2, isFunction } from "lodash-es";
|
|
2677
2677
|
import { center as turfCenter2 } from "@turf/center";
|
|
2678
2678
|
import * as THREE3 from "three";
|
|
2679
2679
|
|
|
@@ -4421,7 +4421,7 @@ var RendererManager = class extends EventTarget {
|
|
|
4421
4421
|
});
|
|
4422
4422
|
units.filter((u4) => u4.properties.category === "room").forEach((unit) => {
|
|
4423
4423
|
const openingRelationships = relationships.filter((r) => r.properties.origin?.id === unit.id || r.properties.destination?.id === unit.id);
|
|
4424
|
-
const roomOpenings =
|
|
4424
|
+
const roomOpenings = compact2(openingRelationships.map((rel) => {
|
|
4425
4425
|
const openingId = rel?.properties.intermediary[0].id;
|
|
4426
4426
|
return openings.find((o) => o.id === openingId);
|
|
4427
4427
|
}));
|
|
@@ -5346,36 +5346,6 @@ var IndoorMap = class extends EventTarget {
|
|
|
5346
5346
|
requestAnimationFrame(this.render.bind(this));
|
|
5347
5347
|
}
|
|
5348
5348
|
};
|
|
5349
|
-
|
|
5350
|
-
// src/IndoorMap/renderer/3d/objects/PulsingMarker.ts
|
|
5351
|
-
import * as maptalks8 from "maptalks-gl";
|
|
5352
|
-
import { BaseObject as BaseObject7 } from "maptalks.three";
|
|
5353
|
-
import * as THREE4 from "three";
|
|
5354
|
-
var OPTIONS5 = {
|
|
5355
|
-
radius: 100,
|
|
5356
|
-
altitude: 0
|
|
5357
|
-
};
|
|
5358
|
-
var PulsingMarker = class extends BaseObject7 {
|
|
5359
|
-
constructor(coordinate, options, material, layer) {
|
|
5360
|
-
options = maptalks8.Util.extend({}, OPTIONS5, options, { layer, coordinate });
|
|
5361
|
-
super();
|
|
5362
|
-
this._initOptions(options);
|
|
5363
|
-
const { altitude, radius } = options;
|
|
5364
|
-
const r = layer.distanceToVector3(radius, radius).x;
|
|
5365
|
-
const geometry = new THREE4.CircleGeometry(r, 50);
|
|
5366
|
-
this._createMesh(geometry, material);
|
|
5367
|
-
const z = layer.altitudeToVector3(altitude, altitude).x;
|
|
5368
|
-
const position = layer.coordinateToVector3(coordinate, z);
|
|
5369
|
-
this.getObject3d().position.copy(position);
|
|
5370
|
-
this._scale = 1;
|
|
5371
|
-
}
|
|
5372
|
-
// test animation
|
|
5373
|
-
_animation() {
|
|
5374
|
-
this._scale = this._scale > 1 ? 0 : this._scale;
|
|
5375
|
-
this._scale += 0.02;
|
|
5376
|
-
this.getObject3d().scale.set(this._scale, this._scale, this._scale);
|
|
5377
|
-
}
|
|
5378
|
-
};
|
|
5379
5349
|
export {
|
|
5380
5350
|
ALL_FEATURE_TYPES,
|
|
5381
5351
|
BASE_LAYER_NAME,
|
|
@@ -5396,7 +5366,6 @@ export {
|
|
|
5396
5366
|
ORIGIN_MARKER_ID,
|
|
5397
5367
|
occupant_helper_exports as OccupantHelpers,
|
|
5398
5368
|
POI_MARKER_LAYER_NAME,
|
|
5399
|
-
PulsingMarker,
|
|
5400
5369
|
QueryObserver2 as QueryObserver,
|
|
5401
5370
|
TextSpriteMarker,
|
|
5402
5371
|
USER_LOCATION_ELEMENT_ID,
|