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.
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * name: maplibre-gl-layers
3
- * version: 0.17.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: 9fe9aa30db6602d13643e32c94af39ae2b26b082
8
+ * git.commit.hash: ca8392c8aa3aae7e0e4e3c871e195d49b125e481
9
9
  */
10
10
 
11
11
  import { SpriteLayerInterface, SpriteLayerOptions, SpriteLocation, SpriteImageDefinitionInit } from './types';
package/dist/config.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * name: maplibre-gl-layers
3
- * version: 0.17.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: 9fe9aa30db6602d13643e32c94af39ae2b26b082
8
+ * git.commit.hash: ca8392c8aa3aae7e0e4e3c871e195d49b125e481
9
9
  */
10
10
 
11
11
  /** Debug flag */
package/dist/const.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * name: maplibre-gl-layers
3
- * version: 0.17.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: 9fe9aa30db6602d13643e32c94af39ae2b26b082
8
+ * git.commit.hash: ca8392c8aa3aae7e0e4e3c871e195d49b125e481
9
9
  */
10
10
 
11
11
  import { Rect } from './utils/looseQuadTree';
package/dist/default.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * name: maplibre-gl-layers
3
- * version: 0.17.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: 9fe9aa30db6602d13643e32c94af39ae2b26b082
8
+ * git.commit.hash: ca8392c8aa3aae7e0e4e3c871e195d49b125e481
9
9
  */
10
10
 
11
11
  import { SpriteScalingOptions, SpriteTextureFilteringOptions } from './types';
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * name: maplibre-gl-layers
3
- * version: 0.17.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: 9fe9aa30db6602d13643e32c94af39ae2b26b082
8
+ * git.commit.hash: ca8392c8aa3aae7e0e4e3c871e195d49b125e481
9
9
  */
10
10
 
11
11
  import { Deferred } from 'async-primitives';
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * name: maplibre-gl-layers
3
- * version: 0.17.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: 9fe9aa30db6602d13643e32c94af39ae2b26b082
8
+ * git.commit.hash: ca8392c8aa3aae7e0e4e3c871e195d49b125e481
9
9
  */
10
10
 
11
11
  import { Map as MapLibreMap } from 'maplibre-gl';
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * name: maplibre-gl-layers
3
- * version: 0.17.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: 9fe9aa30db6602d13643e32c94af39ae2b26b082
8
+ * git.commit.hash: ca8392c8aa3aae7e0e4e3c871e195d49b125e481
9
9
  */
10
10
 
11
11
  import { SpriteAnchor, SpriteScreenPoint, SpriteTextureFilteringOptions } from '../types';
package/dist/gl/text.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * name: maplibre-gl-layers
3
- * version: 0.17.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: 9fe9aa30db6602d13643e32c94af39ae2b26b082
8
+ * git.commit.hash: ca8392c8aa3aae7e0e4e3c871e195d49b125e481
9
9
  */
10
10
 
11
11
  import { SpriteTextGlyphDimensions, SpriteTextGlyphOptions } from '../types';
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * name: maplibre-gl-layers
3
- * version: 0.17.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: 9fe9aa30db6602d13643e32c94af39ae2b26b082
8
+ * git.commit.hash: ca8392c8aa3aae7e0e4e3c871e195d49b125e481
9
9
  */
10
10
 
11
11
  import { Map as MapLibreMap } from 'maplibre-gl';
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * name: maplibre-gl-layers
3
- * version: 0.17.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: 9fe9aa30db6602d13643e32c94af39ae2b26b082
8
+ * git.commit.hash: ca8392c8aa3aae7e0e4e3c871e195d49b125e481
9
9
  */
10
10
 
11
11
  import { Map as MapLibreMap } from 'maplibre-gl';
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * name: maplibre-gl-layers
3
- * version: 0.17.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: 9fe9aa30db6602d13643e32c94af39ae2b26b082
8
+ * git.commit.hash: ca8392c8aa3aae7e0e4e3c871e195d49b125e481
9
9
  */
10
10
 
11
11
  import { mat4 as Mat4 } from 'gl-matrix';
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * name: maplibre-gl-layers
3
- * version: 0.17.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: 9fe9aa30db6602d13643e32c94af39ae2b26b082
8
+ * git.commit.hash: ca8392c8aa3aae7e0e4e3c871e195d49b125e481
9
9
  */
10
10
 
11
11
  import { SpriteLayerCalculationVariant, SpriteLayerHostOptions } from '../types';
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * name: maplibre-gl-layers
3
- * version: 0.17.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: 9fe9aa30db6602d13643e32c94af39ae2b26b082
8
+ * git.commit.hash: ca8392c8aa3aae7e0e4e3c871e195d49b125e481
9
9
  */
10
10
 
11
11
  import { DistanceInterpolationEvaluationResult, DegreeInterpolationEvaluationResult, ImageHandleBufferController, IdHandler, InternalSpriteCurrentState, InternalSpriteImageState, PreparedDrawSpriteImageParams, PrepareDrawSpriteImageParams, Releasable, RegisteredImage, RenderCalculationHost, RenderInterpolationParams, RenderInterpolationResult, SpriteOriginReference, SpriteInterpolationEvaluationResult } from '../internalTypes';
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * name: maplibre-gl-layers
3
- * version: 0.17.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: 9fe9aa30db6602d13643e32c94af39ae2b26b082
8
+ * git.commit.hash: ca8392c8aa3aae7e0e4e3c871e195d49b125e481
9
9
  */
10
10
 
11
11
  import { SpriteLayerCalculationVariant } from '../types';
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * name: maplibre-gl-layers
3
- * version: 0.17.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: 9fe9aa30db6602d13643e32c94af39ae2b26b082
8
+ * git.commit.hash: ca8392c8aa3aae7e0e4e3c871e195d49b125e481
9
9
  */
10
10
 
11
11
  import { ProjectionHostParams } from './projectionHost';
package/dist/index.cjs CHANGED
@@ -4,12 +4,12 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  /*!
6
6
  * name: maplibre-gl-layers
7
- * version: 0.17.0
7
+ * version: 0.18.0
8
8
  * description: MapLibre's layer extension library enabling the display, movement, and modification of large numbers of dynamic sprite images
9
9
  * author: Kouji Matsui (@kekyo@mi.kekyo.net)
10
10
  * license: MIT
11
11
  * repository.url: https://github.com/kekyo/maplibre-gl-layers.git
12
- * git.commit.hash: 9fe9aa30db6602d13643e32c94af39ae2b26b082
12
+ * git.commit.hash: ca8392c8aa3aae7e0e4e3c871e195d49b125e481
13
13
  */
14
14
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
15
15
  var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
@@ -26968,7 +26968,7 @@ const resolveVisibilityLodMultiplier = (sprite, cameraDistanceMeters) => {
26968
26968
  return cameraDistanceMeters >= threshold ? 0 : 1;
26969
26969
  };
26970
26970
  const applyVisibilityDistanceLod = (preparedItems) => {
26971
- var _a, _b, _c;
26971
+ var _a, _b, _c, _d;
26972
26972
  if (!preparedItems.length) {
26973
26973
  return;
26974
26974
  }
@@ -26986,12 +26986,12 @@ const applyVisibilityDistanceLod = (preparedItems) => {
26986
26986
  image.lodOpacity = lodMultiplier;
26987
26987
  const baseOpacity = (_b = image.opacity.interpolation.baseValue) != null ? _b : image.opacity.current;
26988
26988
  const combinedTarget = clampOpacity(
26989
- baseOpacity * (sprite.opacityMultiplier || 1) * lodMultiplier
26989
+ baseOpacity * ((_c = sprite.opacityMultiplier) != null ? _c : 1) * lodMultiplier
26990
26990
  );
26991
26991
  applyResolvedOpacityTarget(
26992
26992
  image,
26993
26993
  combinedTarget,
26994
- (_c = image.opacity.interpolation.options) != null ? _c : null
26994
+ (_d = image.opacity.interpolation.options) != null ? _d : null
26995
26995
  );
26996
26996
  }
26997
26997
  };
@@ -27064,12 +27064,12 @@ const applySpriteInterpolationEvaluations$1 = (workItems, evaluations, timestamp
27064
27064
  return active;
27065
27065
  };
27066
27066
  const ensureOpacityInterpolationTarget = (sprite, image) => {
27067
- var _a, _b, _c;
27067
+ var _a, _b, _c, _d;
27068
27068
  const target = clampOpacity(
27069
- ((_a = image.opacity.interpolation.baseValue) != null ? _a : image.opacity.current) * (sprite.opacityMultiplier || 1) * ((_b = image.lodOpacity) != null ? _b : 1)
27069
+ ((_a = image.opacity.interpolation.baseValue) != null ? _a : image.opacity.current) * ((_b = sprite.opacityMultiplier) != null ? _b : 1) * ((_c = image.lodOpacity) != null ? _c : 1)
27070
27070
  );
27071
27071
  const interpolationState = image.opacity.interpolation.state;
27072
- const currentStateTarget = interpolationState ? clampOpacity((_c = interpolationState.pathTarget) != null ? _c : interpolationState.to) : image.opacity.current;
27072
+ const currentStateTarget = interpolationState ? clampOpacity((_d = interpolationState.pathTarget) != null ? _d : interpolationState.to) : image.opacity.current;
27073
27073
  if (interpolationState) {
27074
27074
  if (Math.abs(currentStateTarget - target) <= OPACITY_TARGET_EPSILON) {
27075
27075
  return;
@@ -30265,11 +30265,12 @@ const updateImageInterpolationDirtyState = (sprite, image) => {
30265
30265
  }
30266
30266
  };
30267
30267
  const reapplySpriteOpacityMultiplier = (sprite) => {
30268
- const multiplier = sprite.opacityMultiplier || 1;
30268
+ var _a;
30269
+ const multiplier = (_a = sprite.opacityMultiplier) != null ? _a : 1;
30269
30270
  sprite.images.forEach((orderMap) => {
30270
30271
  orderMap.forEach((image) => {
30271
- var _a, _b;
30272
- const baseOpacity = (_a = image.opacity.interpolation.baseValue) != null ? _a : image.opacity.current;
30272
+ var _a2, _b;
30273
+ const baseOpacity = (_a2 = image.opacity.interpolation.baseValue) != null ? _a2 : image.opacity.current;
30273
30274
  const interpolationOption = (_b = image.opacity.interpolation.options) != null ? _b : null;
30274
30275
  applyOpacityUpdate(image, baseOpacity, interpolationOption, multiplier);
30275
30276
  });
@@ -30769,6 +30770,7 @@ const createSpriteLayer = (options) => {
30769
30770
  };
30770
30771
  const sprites = /* @__PURE__ */ new Map();
30771
30772
  const invalidateImageInterpolationState = (sprite, image) => {
30773
+ var _a2;
30772
30774
  image.rotateDeg.interpolation.state = null;
30773
30775
  image.offset.offsetDeg.interpolation.state = null;
30774
30776
  image.offset.offsetMeters.interpolation.state = null;
@@ -30790,7 +30792,7 @@ const createSpriteLayer = (options) => {
30790
30792
  image.opacity.invalidated = true;
30791
30793
  image.opacity.interpolation.targetValue = image.opacity.current;
30792
30794
  image.opacity.interpolation.lastCommandValue = image.opacity.current;
30793
- const spriteOpacityMultiplier = sprite.opacityMultiplier || 1;
30795
+ const spriteOpacityMultiplier = (_a2 = sprite.opacityMultiplier) != null ? _a2 : 1;
30794
30796
  const lodMultiplier = image.lodOpacity || 1;
30795
30797
  if (spriteOpacityMultiplier > 0 && lodMultiplier > 0) {
30796
30798
  image.opacity.interpolation.baseValue = clampOpacity(