maplibre-gl-layers 0.11.0 → 0.12.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/README.md +7 -2
- package/dist/SpriteLayer.d.ts +8 -52
- package/dist/calculationHost.d.ts +63 -0
- package/dist/config.d.ts +18 -0
- package/dist/const.d.ts +51 -13
- package/dist/default.d.ts +29 -0
- package/dist/degreeInterpolation.d.ts +2 -2
- package/dist/distanceInterpolation.d.ts +2 -2
- package/dist/easing.d.ts +2 -2
- package/dist/image.d.ts +32 -0
- package/dist/index.cjs +4340 -1979
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +4340 -1980
- package/dist/index.mjs.map +1 -1
- package/dist/internalTypes.d.ts +340 -77
- package/dist/interpolation.d.ts +2 -2
- package/dist/interpolationChannels.d.ts +2 -2
- package/dist/looseQuadTree.d.ts +10 -10
- package/dist/mapLibreProjectionHost.d.ts +18 -0
- package/dist/math.d.ts +110 -171
- package/dist/projectionHost.d.ts +60 -0
- package/dist/rotationInterpolation.d.ts +2 -2
- package/dist/shader.d.ts +83 -0
- package/dist/types.d.ts +16 -8
- package/dist/utils.d.ts +25 -20
- package/dist/wasmCalculationHost.d.ts +68 -0
- package/dist/wasmHost.d.ts +125 -0
- package/dist/wasmProjectionHost.d.ts +19 -0
- package/package.json +8 -7
- package/dist/location.d.ts +0 -24
package/README.md
CHANGED
|
@@ -25,7 +25,10 @@ Here is a minimal example that places a single sprite:
|
|
|
25
25
|
```typescript
|
|
26
26
|
// Use MapLibre GL JS together with maplibre-gl-layers
|
|
27
27
|
import { Map } from 'maplibre-gl';
|
|
28
|
-
import {
|
|
28
|
+
import {
|
|
29
|
+
createSpriteLayer,
|
|
30
|
+
initializeSpriteLayerHost,
|
|
31
|
+
} from 'maplibre-gl-layers';
|
|
29
32
|
|
|
30
33
|
// Create the MapLibre instance
|
|
31
34
|
const map = new Map({
|
|
@@ -38,8 +41,10 @@ const map = new Map({
|
|
|
38
41
|
// Create the SpriteLayer
|
|
39
42
|
const spriteLayer = createSpriteLayer({ id: 'vehicles' });
|
|
40
43
|
|
|
41
|
-
//
|
|
44
|
+
// When MapLibre is ready
|
|
42
45
|
map.on('load', async () => {
|
|
46
|
+
// Optional: enable WASM acceleration (falls back to JS when unavailable)
|
|
47
|
+
await initializeSpriteLayerHost();
|
|
43
48
|
map.addLayer(spriteLayer);
|
|
44
49
|
|
|
45
50
|
// Register an image that can be referenced by sprites
|
package/dist/SpriteLayer.d.ts
CHANGED
|
@@ -1,44 +1,17 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* name: maplibre-gl-layers
|
|
3
|
-
* version: 0.
|
|
3
|
+
* version: 0.12.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: e8e2cd81aeec4b10f2898c0ede5880ac56bf748d
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* Computes the perspective ratio from MapLibre's internal transform.
|
|
16
|
-
* Used to calculate distance-based scaling that responds to pitch, zoom, and altitude.
|
|
17
|
-
* @param {MapLibreMap} mapInstance - MapLibre map providing the transform and camera distance.
|
|
18
|
-
* @param {SpriteLocation} location - Location used to derive mercator coordinates for scaling.
|
|
19
|
-
* @param {MercatorCoordinate | undefined} [cachedMercator] - Optional precomputed Mercator coordinate for the location.
|
|
20
|
-
* @returns {number} Perspective ratio applied when scaling sprites; defaults to 1 if unavailable.
|
|
21
|
-
*/
|
|
22
|
-
export declare const calculatePerspectiveRatio: (mapInstance: MapLibreMap, location: SpriteLocation, cachedMercator?: MercatorCoordinate) => number;
|
|
23
|
-
/**
|
|
24
|
-
* Multiplies a 4x4 matrix with a 4-component vector using row-major indexing.
|
|
25
|
-
* @param {MatrixInput} matrix - Matrix to multiply.
|
|
26
|
-
* @param {number} x - X component of the vector.
|
|
27
|
-
* @param {number} y - Y component of the vector.
|
|
28
|
-
* @param {number} z - Z component of the vector.
|
|
29
|
-
* @param {number} w - W component of the vector.
|
|
30
|
-
* @returns {[number, number, number, number]} Resulting homogeneous coordinate.
|
|
31
|
-
*/
|
|
32
|
-
export declare const multiplyMatrixAndVector: (matrix: MatrixInput, x: number, y: number, z: number, w: number) => [number, number, number, number];
|
|
33
|
-
/**
|
|
34
|
-
* Projects a longitude/latitude/elevation tuple into clip space using the provided context.
|
|
35
|
-
* @param {number} lng - Longitude in degrees.
|
|
36
|
-
* @param {number} lat - Latitude in degrees.
|
|
37
|
-
* @param {number} elevationMeters - Elevation above the ellipsoid in meters.
|
|
38
|
-
* @param {ClipContext | null} context - Clip-space context; `null` skips projection.
|
|
39
|
-
* @returns {[number, number, number, number] | null} Clip coordinates or `null` when projection fails.
|
|
40
|
-
*/
|
|
41
|
-
export declare const projectLngLatToClipSpace: (lng: number, lat: number, elevationMeters: number, context: ClipContext | null) => [number, number, number, number] | null;
|
|
11
|
+
import { SpriteLayerInterface, SpriteLayerOptions, SpriteAnchor, SpriteLocation, SpriteImageDefinitionInit, SpriteImageOffset, SpriteInterpolationOptions, SpriteLayerCalculationVariant } from './types';
|
|
12
|
+
import { InternalSpriteImageState, InternalSpriteCurrentState, SpriteOriginReference } from './internalTypes';
|
|
13
|
+
export declare const initializeSpriteLayerHost: (calculationVariant?: SpriteLayerCalculationVariant) => Promise<SpriteLayerCalculationVariant>;
|
|
14
|
+
export declare const releaseSpriteLayerHost: () => void;
|
|
42
15
|
/**
|
|
43
16
|
* Applies auto-rotation to all images within a sprite when movement exceeds the configured threshold.
|
|
44
17
|
* @template T Arbitrary sprite tag type.
|
|
@@ -47,24 +20,6 @@ export declare const projectLngLatToClipSpace: (lng: number, lat: number, elevat
|
|
|
47
20
|
* @returns {boolean} `true` when auto-rotation was applied, `false` otherwise.
|
|
48
21
|
*/
|
|
49
22
|
export declare const applyAutoRotation: <T>(sprite: InternalSpriteCurrentState<T>, nextLocation: SpriteLocation) => boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Compiles a shader from source, throwing if compilation fails.
|
|
52
|
-
* @param {WebGLRenderingContext} glContext - Active WebGL context.
|
|
53
|
-
* @param {number} type - Shader type (`VERTEX_SHADER` or `FRAGMENT_SHADER`).
|
|
54
|
-
* @param {string} source - GLSL source code.
|
|
55
|
-
* @returns {WebGLShader} Compiled shader object.
|
|
56
|
-
* @throws When shader creation or compilation fails.
|
|
57
|
-
*/
|
|
58
|
-
export declare const compileShader: (glContext: WebGLRenderingContext, type: number, source: string) => WebGLShader;
|
|
59
|
-
/**
|
|
60
|
-
* Links a vertex and fragment shader into a WebGL program.
|
|
61
|
-
* @param {WebGLRenderingContext} glContext - Active WebGL context.
|
|
62
|
-
* @param {string} vertexSource - Vertex shader GLSL source.
|
|
63
|
-
* @param {string} fragmentSource - Fragment shader GLSL source.
|
|
64
|
-
* @returns {WebGLProgram} Linked shader program ready for use.
|
|
65
|
-
* @throws When linking fails or a program cannot be created.
|
|
66
|
-
*/
|
|
67
|
-
export declare const createShaderProgram: (glContext: WebGLRenderingContext, vertexSource: string, fragmentSource: string) => WebGLProgram;
|
|
68
23
|
/**
|
|
69
24
|
* Clones a sprite anchor, defaulting to the origin when none supplied.
|
|
70
25
|
* @param {SpriteAnchor} [anchor] - Anchor to clone.
|
|
@@ -88,9 +43,10 @@ export declare const cloneInterpolationOptions: (options: SpriteInterpolationOpt
|
|
|
88
43
|
* @param {SpriteImageDefinitionInit} imageInit - Caller-provided image definition.
|
|
89
44
|
* @param {number} subLayer - Sub-layer index the image belongs to.
|
|
90
45
|
* @param {number} order - Ordering slot within the sub-layer.
|
|
46
|
+
* @param {SpriteOriginReference} originReference - Encode/Decode origin reference.
|
|
91
47
|
* @returns {InternalSpriteImageState} Normalized internal state ready for rendering.
|
|
92
48
|
*/
|
|
93
|
-
export declare const createImageStateFromInit: (imageInit: SpriteImageDefinitionInit, subLayer: number, order: number) => InternalSpriteImageState;
|
|
49
|
+
export declare const createImageStateFromInit: (imageInit: SpriteImageDefinitionInit, subLayer: number, order: number, originReference: SpriteOriginReference) => InternalSpriteImageState;
|
|
94
50
|
/**
|
|
95
51
|
* Factory that creates the MapLibre layer interface for the sprite layer.
|
|
96
52
|
* Implements the CustomLayerInterface lifecycle (init -> render -> dispose), packing thousands
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* name: maplibre-gl-layers
|
|
3
|
+
* version: 0.12.0
|
|
4
|
+
* description: MapLibre's layer extension library enabling the display, movement, and modification of large numbers of dynamic sprite images
|
|
5
|
+
* author: Kouji Matsui (@kekyo@mi.kekyo.net)
|
|
6
|
+
* license: MIT
|
|
7
|
+
* repository.url: https://github.com/kekyo/maplibre-gl-layers.git
|
|
8
|
+
* git.commit.hash: e8e2cd81aeec4b10f2898c0ede5880ac56bf748d
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { Map as MapLibreMap } from 'maplibre-gl';
|
|
12
|
+
import { InternalSpriteCurrentState, InternalSpriteImageState, RegisteredImage, ProjectionHost, PreparedDrawSpriteImageParams, RenderCalculationHost, PrepareDrawSpriteImageParamsBefore, PrepareDrawSpriteImageParamsAfter } from './internalTypes';
|
|
13
|
+
import { SpritePoint } from './types';
|
|
14
|
+
import { ProjectionHostParams } from './projectionHost';
|
|
15
|
+
/**
|
|
16
|
+
* Cache entry storing anchor-adjusted and raw centers for a sprite image.
|
|
17
|
+
*/
|
|
18
|
+
interface ImageCenterCacheEntry {
|
|
19
|
+
readonly anchorApplied?: SpritePoint;
|
|
20
|
+
readonly anchorless?: SpritePoint;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Nested cache keyed by sprite ID and image key to avoid recomputing centers each frame.
|
|
24
|
+
*/
|
|
25
|
+
type ImageCenterCache = Map<string, Map<string, ImageCenterCacheEntry>>;
|
|
26
|
+
/**
|
|
27
|
+
* Resolves the image entry that a sprite should use as its origin reference when
|
|
28
|
+
* another image in the same render bucket needs to inherit that origin.
|
|
29
|
+
* The resolver is always invoked with the current sprite/image pair and can
|
|
30
|
+
* return `null` when the origin is not available (e.g., the reference was
|
|
31
|
+
* culled or stored in another bucket).
|
|
32
|
+
*/
|
|
33
|
+
type OriginImageResolver<T> = (sprite: Readonly<InternalSpriteCurrentState<T>>, image: Readonly<InternalSpriteImageState>) => InternalSpriteImageState | null;
|
|
34
|
+
interface DepthSortedItem<T> {
|
|
35
|
+
readonly sprite: InternalSpriteCurrentState<T>;
|
|
36
|
+
readonly image: InternalSpriteImageState;
|
|
37
|
+
readonly resource: Readonly<RegisteredImage>;
|
|
38
|
+
readonly depthKey: number;
|
|
39
|
+
readonly resolveOrigin: OriginImageResolver<T>;
|
|
40
|
+
}
|
|
41
|
+
export declare const collectDepthSortedItemsInternal: <T>(projectionHost: ProjectionHost, zoom: number, zoomScaleFactor: number, originCenterCache: ImageCenterCache, { bucket, bucketBuffers, imageResources, clipContext, baseMetersPerPixel, spriteMinPixel, spriteMaxPixel, drawingBufferWidth, drawingBufferHeight, pixelRatio, }: PrepareDrawSpriteImageParamsBefore<T>) => DepthSortedItem<T>[];
|
|
42
|
+
/**
|
|
43
|
+
* Prepares quad data for a single sprite image before issuing the draw call.
|
|
44
|
+
*/
|
|
45
|
+
export declare const prepareDrawSpriteImageInternal: <TTag>(projectionHost: ProjectionHost, item: DepthSortedItem<TTag>, zoom: number, zoomScaleFactor: number, originCenterCache: ImageCenterCache, { imageResources, baseMetersPerPixel, spriteMinPixel, spriteMaxPixel, drawingBufferWidth, drawingBufferHeight, pixelRatio, clipContext, identityScaleX, identityScaleY, identityOffsetX, identityOffsetY, screenToClipScaleX, screenToClipScaleY, screenToClipOffsetX, screenToClipOffsetY, }: PrepareDrawSpriteImageParamsAfter) => PreparedDrawSpriteImageParams<TTag> | null;
|
|
46
|
+
/**
|
|
47
|
+
* Create calculation host that binding MapLibre.
|
|
48
|
+
* @param TTag Tag type.
|
|
49
|
+
* @param map MapLibre Map.
|
|
50
|
+
* @returns Calculation host.
|
|
51
|
+
*/
|
|
52
|
+
export declare const createMapLibreCalculationHost: <TTag>(map: MapLibreMap) => RenderCalculationHost<TTag>;
|
|
53
|
+
/**
|
|
54
|
+
* Create calculation host that pure implementation.
|
|
55
|
+
* @param TTag Tag type.
|
|
56
|
+
* @param params Projection host PrepareDrawSpriteImageInputsparams.
|
|
57
|
+
* @returns Calculation host.
|
|
58
|
+
*/
|
|
59
|
+
export declare const createCalculationHost: <TTag>(params: ProjectionHostParams) => RenderCalculationHost<TTag>;
|
|
60
|
+
export declare const __wasmProjectionCalculationTestInternals: {
|
|
61
|
+
__createWasmProjectionCalculationTestHost: <TTag>(params: ProjectionHostParams) => RenderCalculationHost<TTag>;
|
|
62
|
+
};
|
|
63
|
+
export {};
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* name: maplibre-gl-layers
|
|
3
|
+
* version: 0.12.0
|
|
4
|
+
* description: MapLibre's layer extension library enabling the display, movement, and modification of large numbers of dynamic sprite images
|
|
5
|
+
* author: Kouji Matsui (@kekyo@mi.kekyo.net)
|
|
6
|
+
* license: MIT
|
|
7
|
+
* repository.url: https://github.com/kekyo/maplibre-gl-layers.git
|
|
8
|
+
* git.commit.hash: e8e2cd81aeec4b10f2898c0ede5880ac56bf748d
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/** Debug flag */
|
|
12
|
+
export declare const SL_DEBUG = false;
|
|
13
|
+
/** Enables the upcoming shader-based billboard corner computation when true. */
|
|
14
|
+
export declare const USE_SHADER_BILLBOARD_GEOMETRY = true;
|
|
15
|
+
/** Enables the upcoming shader-based surface corner computation when true. */
|
|
16
|
+
export declare const USE_SHADER_SURFACE_GEOMETRY = true;
|
|
17
|
+
/** Whether to enable the NDC bias for surface rendering (disabled by default). */
|
|
18
|
+
export declare const ENABLE_NDC_BIAS_SURFACE = true;
|
package/dist/const.d.ts
CHANGED
|
@@ -1,29 +1,67 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* name: maplibre-gl-layers
|
|
3
|
-
* version: 0.
|
|
3
|
+
* version: 0.12.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: e8e2cd81aeec4b10f2898c0ede5880ac56bf748d
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { Rect } from './looseQuadTree';
|
|
12
|
+
import { SpriteAnchor, SpriteImageOffset, SpriteTextGlyphHorizontalAlign } from './types';
|
|
13
|
+
/** Default sprite anchor centered at the image origin. */
|
|
14
|
+
export declare const DEFAULT_ANCHOR: Readonly<SpriteAnchor>;
|
|
15
|
+
/** Default image offset applied when none is provided. */
|
|
16
|
+
export declare const DEFAULT_IMAGE_OFFSET: Readonly<SpriteImageOffset>;
|
|
17
|
+
export declare const DEFAULT_TEXT_GLYPH_FONT_FAMILY = "sans-serif";
|
|
18
|
+
export declare const DEFAULT_TEXT_GLYPH_FONT_STYLE: 'normal' | 'italic';
|
|
19
|
+
export declare const DEFAULT_TEXT_GLYPH_FONT_WEIGHT = "normal";
|
|
20
|
+
export declare const DEFAULT_TEXT_GLYPH_COLOR = "#000000";
|
|
21
|
+
export declare const DEFAULT_TEXT_GLYPH_ALIGN: SpriteTextGlyphHorizontalAlign;
|
|
22
|
+
export declare const DEFAULT_TEXT_GLYPH_FONT_SIZE = 32;
|
|
23
|
+
export declare const DEFAULT_TEXT_GLYPH_RENDER_PIXEL_RATIO = 1;
|
|
12
24
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
25
|
+
* WGS84-compatible Earth radius in meters.
|
|
26
|
+
* Used to convert one radian of longitude into meters when scaling sprites.
|
|
27
|
+
* @constant
|
|
15
28
|
*/
|
|
16
|
-
export declare const
|
|
29
|
+
export declare const EARTH_RADIUS_METERS = 6378137;
|
|
17
30
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
31
|
+
* Multiplier for converting degrees to radians.
|
|
32
|
+
* @constant
|
|
20
33
|
*/
|
|
21
|
-
export declare const
|
|
34
|
+
export declare const DEG2RAD: number;
|
|
22
35
|
/**
|
|
23
|
-
*
|
|
36
|
+
* Multiplier for converting radians to degrees.
|
|
37
|
+
* @constant
|
|
24
38
|
*/
|
|
25
|
-
export declare const
|
|
39
|
+
export declare const RAD2DEG: number;
|
|
26
40
|
/**
|
|
27
|
-
*
|
|
41
|
+
* Default MapLibre tile size used for Web Mercator calculations.
|
|
42
|
+
* @constant
|
|
28
43
|
*/
|
|
29
|
-
export declare const
|
|
44
|
+
export declare const TILE_SIZE = 512;
|
|
45
|
+
export declare const MIN_CLIP_Z_EPSILON = 1e-7;
|
|
46
|
+
/** Small depth bias applied in NDC space. */
|
|
47
|
+
export declare const EPS_NDC = 0.000001;
|
|
48
|
+
/** Maximum number of order slots available within a sub-layer (0..ORDER_MAX-1). */
|
|
49
|
+
export declare const ORDER_MAX = 16;
|
|
50
|
+
/** Bucket width used to encode sub-layer and order into a single number. */
|
|
51
|
+
export declare const ORDER_BUCKET = 16;
|
|
52
|
+
export declare const MIN_CLIP_W = 0.000001;
|
|
53
|
+
export declare const HIT_TEST_WORLD_BOUNDS: Rect;
|
|
54
|
+
/** Small tolerance used to handle floating-point error during hit testing. */
|
|
55
|
+
export declare const HIT_TEST_EPSILON = 0.001;
|
|
56
|
+
export declare const MAX_TEXT_GLYPH_RENDER_PIXEL_RATIO = 4;
|
|
57
|
+
export declare const MIN_TEXT_GLYPH_FONT_SIZE = 4;
|
|
58
|
+
/**
|
|
59
|
+
* Index order used to decompose a quad into two triangles.
|
|
60
|
+
* @constant
|
|
61
|
+
*/
|
|
62
|
+
export declare const TRIANGLE_INDICES: readonly [0, 1, 2, 2, 1, 3];
|
|
63
|
+
/**
|
|
64
|
+
* UV coordinates for each corner of a quad following the index order in {@link TRIANGLE_INDICES}.
|
|
65
|
+
* @constant
|
|
66
|
+
*/
|
|
67
|
+
export declare const UV_CORNERS: ReadonlyArray<readonly [number, number]>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* name: maplibre-gl-layers
|
|
3
|
+
* version: 0.12.0
|
|
4
|
+
* description: MapLibre's layer extension library enabling the display, movement, and modification of large numbers of dynamic sprite images
|
|
5
|
+
* author: Kouji Matsui (@kekyo@mi.kekyo.net)
|
|
6
|
+
* license: MIT
|
|
7
|
+
* repository.url: https://github.com/kekyo/maplibre-gl-layers.git
|
|
8
|
+
* git.commit.hash: e8e2cd81aeec4b10f2898c0ede5880ac56bf748d
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { SpriteScalingOptions, SpriteTextureFilteringOptions } from './types';
|
|
12
|
+
/**
|
|
13
|
+
* Unlimited (default) values that fill in missing {@link SpriteScalingOptions} fields supplied by callers.
|
|
14
|
+
* metersPerPixel is 1.
|
|
15
|
+
*/
|
|
16
|
+
export declare const UNLIMITED_SPRITE_SCALING_OPTIONS: SpriteScalingOptions;
|
|
17
|
+
/**
|
|
18
|
+
* Standard values that fill in missing {@link SpriteScalingOptions} fields supplied by callers.
|
|
19
|
+
* metersPerPixel is 1.
|
|
20
|
+
*/
|
|
21
|
+
export declare const STANDARD_SPRITE_SCALING_OPTIONS: SpriteScalingOptions;
|
|
22
|
+
/**
|
|
23
|
+
* Defaulted text filtering options.
|
|
24
|
+
*/
|
|
25
|
+
export declare const DEFAULT_TEXTURE_FILTERING_OPTIONS: SpriteTextureFilteringOptions;
|
|
26
|
+
/**
|
|
27
|
+
* Better text filtering options than default options.
|
|
28
|
+
*/
|
|
29
|
+
export declare const BETTER_TEXTURE_FILTERING_OPTIONS: SpriteTextureFilteringOptions;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* name: maplibre-gl-layers
|
|
3
|
-
* version: 0.
|
|
3
|
+
* version: 0.12.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: e8e2cd81aeec4b10f2898c0ede5880ac56bf748d
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import { SpriteInterpolationOptions } from './types';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* name: maplibre-gl-layers
|
|
3
|
-
* version: 0.
|
|
3
|
+
* version: 0.12.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: e8e2cd81aeec4b10f2898c0ede5880ac56bf748d
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import { SpriteInterpolationOptions } from './types';
|
package/dist/easing.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* name: maplibre-gl-layers
|
|
3
|
-
* version: 0.
|
|
3
|
+
* version: 0.12.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: e8e2cd81aeec4b10f2898c0ede5880ac56bf748d
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import { EasingFunction } from './types';
|
package/dist/image.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* name: maplibre-gl-layers
|
|
3
|
+
* version: 0.12.0
|
|
4
|
+
* description: MapLibre's layer extension library enabling the display, movement, and modification of large numbers of dynamic sprite images
|
|
5
|
+
* author: Kouji Matsui (@kekyo@mi.kekyo.net)
|
|
6
|
+
* license: MIT
|
|
7
|
+
* repository.url: https://github.com/kekyo/maplibre-gl-layers.git
|
|
8
|
+
* git.commit.hash: e8e2cd81aeec4b10f2898c0ede5880ac56bf748d
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { SpriteImageRegisterOptions } from './types';
|
|
12
|
+
export type SvgSizeResolutionErrorCode = 'size-missing' | 'viewbox-disabled' | 'invalid-dimensions';
|
|
13
|
+
export declare class SvgSizeResolutionError extends Error implements Error {
|
|
14
|
+
readonly code: SvgSizeResolutionErrorCode;
|
|
15
|
+
constructor(message: string, code: SvgSizeResolutionErrorCode);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Helper that read an ImageBitmap from a blob.
|
|
19
|
+
* @param blob Target blob.
|
|
20
|
+
* @param options Optional reading options.
|
|
21
|
+
* @returns Promise resolving to the ImageBitmap.
|
|
22
|
+
* @remarks This function helps reading SVG with better manner.
|
|
23
|
+
*/
|
|
24
|
+
export declare const readImageBitmap: (blob: Blob, options?: SpriteImageRegisterOptions) => Promise<ImageBitmap>;
|
|
25
|
+
/**
|
|
26
|
+
* Helper that loads an ImageBitmap from a URL.
|
|
27
|
+
* @param url Target image URL.
|
|
28
|
+
* @param options Optional loading options.
|
|
29
|
+
* @returns Promise resolving to the ImageBitmap.
|
|
30
|
+
* @remarks This function helps loading SVG with better manner.
|
|
31
|
+
*/
|
|
32
|
+
export declare const loadImageBitmap: (url: string, options?: SpriteImageRegisterOptions) => Promise<ImageBitmap>;
|