maplibre-gl-layers 0.17.0 → 0.18.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.
- package/dist/SpriteLayer.d.ts +2 -2
- package/dist/config.d.ts +2 -2
- package/dist/const.d.ts +2 -2
- package/dist/default.d.ts +2 -2
- package/dist/gl/atlas.d.ts +2 -2
- package/dist/gl/hitTest.d.ts +2 -2
- package/dist/gl/shader.d.ts +2 -2
- package/dist/gl/text.d.ts +2 -2
- package/dist/host/calculationHost.d.ts +2 -2
- package/dist/host/mapLibreProjectionHost.d.ts +2 -2
- package/dist/host/projectionHost.d.ts +2 -2
- package/dist/host/runtime.d.ts +2 -2
- package/dist/host/wasmCalculationHost.d.ts +2 -2
- package/dist/host/wasmHost.d.ts +2 -2
- package/dist/host/wasmProjectionHost.d.ts +2 -2
- package/dist/index.cjs +14 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +14 -12
- package/dist/index.mjs.map +1 -1
- package/dist/internalTypes.d.ts +2 -2
- package/dist/interpolation/degreeInterpolation.d.ts +2 -2
- package/dist/interpolation/distanceInterpolation.d.ts +2 -2
- package/dist/interpolation/easing.d.ts +2 -2
- package/dist/interpolation/interpolation.d.ts +2 -2
- package/dist/interpolation/interpolationChannels.d.ts +2 -2
- package/dist/interpolation/rotationInterpolation.d.ts +2 -2
- package/dist/types.d.ts +2 -2
- package/dist/utils/color.d.ts +2 -2
- package/dist/utils/image.d.ts +2 -2
- package/dist/utils/looseQuadTree.d.ts +2 -2
- package/dist/utils/math.d.ts +2 -2
- package/dist/utils/utils.d.ts +2 -2
- package/dist/wasm/config.json.d.ts +2 -2
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* name: maplibre-gl-layers
|
|
3
|
-
* version: 0.
|
|
3
|
+
* version: 0.18.0
|
|
4
4
|
* description: MapLibre's layer extension library enabling the display, movement, and modification of large numbers of dynamic sprite images
|
|
5
5
|
* author: Kouji Matsui (@kekyo@mi.kekyo.net)
|
|
6
6
|
* license: MIT
|
|
7
7
|
* repository.url: https://github.com/kekyo/maplibre-gl-layers.git
|
|
8
|
-
* git.commit.hash:
|
|
8
|
+
* git.commit.hash: ca8392c8aa3aae7e0e4e3c871e195d49b125e481
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
export * from './types';
|
package/dist/index.mjs
CHANGED
|
@@ -3,12 +3,12 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
/*!
|
|
5
5
|
* name: maplibre-gl-layers
|
|
6
|
-
* version: 0.
|
|
6
|
+
* version: 0.18.0
|
|
7
7
|
* description: MapLibre's layer extension library enabling the display, movement, and modification of large numbers of dynamic sprite images
|
|
8
8
|
* author: Kouji Matsui (@kekyo@mi.kekyo.net)
|
|
9
9
|
* license: MIT
|
|
10
10
|
* repository.url: https://github.com/kekyo/maplibre-gl-layers.git
|
|
11
|
-
* git.commit.hash:
|
|
11
|
+
* git.commit.hash: ca8392c8aa3aae7e0e4e3c871e195d49b125e481
|
|
12
12
|
*/
|
|
13
13
|
const UNLIMITED_SPRITE_SCALING_OPTIONS = {
|
|
14
14
|
metersPerPixel: 1,
|
|
@@ -26965,7 +26965,7 @@ const resolveVisibilityLodMultiplier = (sprite, cameraDistanceMeters) => {
|
|
|
26965
26965
|
return cameraDistanceMeters >= threshold ? 0 : 1;
|
|
26966
26966
|
};
|
|
26967
26967
|
const applyVisibilityDistanceLod = (preparedItems) => {
|
|
26968
|
-
var _a, _b, _c;
|
|
26968
|
+
var _a, _b, _c, _d;
|
|
26969
26969
|
if (!preparedItems.length) {
|
|
26970
26970
|
return;
|
|
26971
26971
|
}
|
|
@@ -26983,12 +26983,12 @@ const applyVisibilityDistanceLod = (preparedItems) => {
|
|
|
26983
26983
|
image.lodOpacity = lodMultiplier;
|
|
26984
26984
|
const baseOpacity = (_b = image.opacity.interpolation.baseValue) != null ? _b : image.opacity.current;
|
|
26985
26985
|
const combinedTarget = clampOpacity(
|
|
26986
|
-
baseOpacity * (sprite.opacityMultiplier
|
|
26986
|
+
baseOpacity * ((_c = sprite.opacityMultiplier) != null ? _c : 1) * lodMultiplier
|
|
26987
26987
|
);
|
|
26988
26988
|
applyResolvedOpacityTarget(
|
|
26989
26989
|
image,
|
|
26990
26990
|
combinedTarget,
|
|
26991
|
-
(
|
|
26991
|
+
(_d = image.opacity.interpolation.options) != null ? _d : null
|
|
26992
26992
|
);
|
|
26993
26993
|
}
|
|
26994
26994
|
};
|
|
@@ -27061,12 +27061,12 @@ const applySpriteInterpolationEvaluations$1 = (workItems, evaluations, timestamp
|
|
|
27061
27061
|
return active;
|
|
27062
27062
|
};
|
|
27063
27063
|
const ensureOpacityInterpolationTarget = (sprite, image) => {
|
|
27064
|
-
var _a, _b, _c;
|
|
27064
|
+
var _a, _b, _c, _d;
|
|
27065
27065
|
const target = clampOpacity(
|
|
27066
|
-
((_a = image.opacity.interpolation.baseValue) != null ? _a : image.opacity.current) * (sprite.opacityMultiplier
|
|
27066
|
+
((_a = image.opacity.interpolation.baseValue) != null ? _a : image.opacity.current) * ((_b = sprite.opacityMultiplier) != null ? _b : 1) * ((_c = image.lodOpacity) != null ? _c : 1)
|
|
27067
27067
|
);
|
|
27068
27068
|
const interpolationState = image.opacity.interpolation.state;
|
|
27069
|
-
const currentStateTarget = interpolationState ? clampOpacity((
|
|
27069
|
+
const currentStateTarget = interpolationState ? clampOpacity((_d = interpolationState.pathTarget) != null ? _d : interpolationState.to) : image.opacity.current;
|
|
27070
27070
|
if (interpolationState) {
|
|
27071
27071
|
if (Math.abs(currentStateTarget - target) <= OPACITY_TARGET_EPSILON) {
|
|
27072
27072
|
return;
|
|
@@ -30262,11 +30262,12 @@ const updateImageInterpolationDirtyState = (sprite, image) => {
|
|
|
30262
30262
|
}
|
|
30263
30263
|
};
|
|
30264
30264
|
const reapplySpriteOpacityMultiplier = (sprite) => {
|
|
30265
|
-
|
|
30265
|
+
var _a;
|
|
30266
|
+
const multiplier = (_a = sprite.opacityMultiplier) != null ? _a : 1;
|
|
30266
30267
|
sprite.images.forEach((orderMap) => {
|
|
30267
30268
|
orderMap.forEach((image) => {
|
|
30268
|
-
var
|
|
30269
|
-
const baseOpacity = (
|
|
30269
|
+
var _a2, _b;
|
|
30270
|
+
const baseOpacity = (_a2 = image.opacity.interpolation.baseValue) != null ? _a2 : image.opacity.current;
|
|
30270
30271
|
const interpolationOption = (_b = image.opacity.interpolation.options) != null ? _b : null;
|
|
30271
30272
|
applyOpacityUpdate(image, baseOpacity, interpolationOption, multiplier);
|
|
30272
30273
|
});
|
|
@@ -30766,6 +30767,7 @@ const createSpriteLayer = (options) => {
|
|
|
30766
30767
|
};
|
|
30767
30768
|
const sprites = /* @__PURE__ */ new Map();
|
|
30768
30769
|
const invalidateImageInterpolationState = (sprite, image) => {
|
|
30770
|
+
var _a2;
|
|
30769
30771
|
image.rotateDeg.interpolation.state = null;
|
|
30770
30772
|
image.offset.offsetDeg.interpolation.state = null;
|
|
30771
30773
|
image.offset.offsetMeters.interpolation.state = null;
|
|
@@ -30787,7 +30789,7 @@ const createSpriteLayer = (options) => {
|
|
|
30787
30789
|
image.opacity.invalidated = true;
|
|
30788
30790
|
image.opacity.interpolation.targetValue = image.opacity.current;
|
|
30789
30791
|
image.opacity.interpolation.lastCommandValue = image.opacity.current;
|
|
30790
|
-
const spriteOpacityMultiplier = sprite.opacityMultiplier
|
|
30792
|
+
const spriteOpacityMultiplier = (_a2 = sprite.opacityMultiplier) != null ? _a2 : 1;
|
|
30791
30793
|
const lodMultiplier = image.lodOpacity || 1;
|
|
30792
30794
|
if (spriteOpacityMultiplier > 0 && lodMultiplier > 0) {
|
|
30793
30795
|
image.opacity.interpolation.baseValue = clampOpacity(
|