maplibre-gl-layers 0.19.0 → 1.1.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.
Files changed (41) hide show
  1. package/README.md +1 -1
  2. package/dist/index.cjs +8646 -6335
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.ts +1353 -7
  5. package/dist/index.mjs +8645 -6334
  6. package/dist/index.mjs.map +1 -1
  7. package/dist/wasm/offloads-nosimd.wasm +0 -0
  8. package/dist/wasm/offloads-simd-mt.wasm +0 -0
  9. package/dist/wasm/offloads-simd.wasm +0 -0
  10. package/package.json +10 -9
  11. package/dist/SpriteLayer.d.ts +0 -41
  12. package/dist/config.d.ts +0 -26
  13. package/dist/const.d.ts +0 -98
  14. package/dist/default.d.ts +0 -29
  15. package/dist/gl/atlas.d.ts +0 -64
  16. package/dist/gl/hitTest.d.ts +0 -54
  17. package/dist/gl/mouseEvents.d.ts +0 -36
  18. package/dist/gl/shader.d.ts +0 -114
  19. package/dist/gl/text.d.ts +0 -17
  20. package/dist/gl/tracking.d.ts +0 -36
  21. package/dist/host/calculationHost.d.ts +0 -87
  22. package/dist/host/mapLibreProjectionHost.d.ts +0 -18
  23. package/dist/host/projectionHost.d.ts +0 -62
  24. package/dist/host/runtime.d.ts +0 -38
  25. package/dist/host/wasmCalculationHost.d.ts +0 -72
  26. package/dist/host/wasmHost.d.ts +0 -133
  27. package/dist/host/wasmProjectionHost.d.ts +0 -19
  28. package/dist/internalTypes.d.ts +0 -582
  29. package/dist/interpolation/degreeInterpolation.d.ts +0 -48
  30. package/dist/interpolation/distanceInterpolation.d.ts +0 -31
  31. package/dist/interpolation/easing.d.ts +0 -26
  32. package/dist/interpolation/interpolationChannels.d.ts +0 -59
  33. package/dist/interpolation/locationInterpolation.d.ts +0 -30
  34. package/dist/interpolation/rotationInterpolation.d.ts +0 -40
  35. package/dist/types.d.ts +0 -944
  36. package/dist/utils/color.d.ts +0 -20
  37. package/dist/utils/image.d.ts +0 -32
  38. package/dist/utils/looseQuadTree.d.ts +0 -34
  39. package/dist/utils/math.d.ts +0 -451
  40. package/dist/utils/utils.d.ts +0 -37
  41. package/dist/wasm/config.json.d.ts +0 -16
@@ -1,59 +0,0 @@
1
- /*!
2
- * name: maplibre-gl-layers
3
- * version: 0.19.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: 7bc93c11d7855dedb8d60f140af4e413252c32a7
9
- */
10
-
11
- import { SpriteInterpolationOptions } from '../types';
12
- import { InternalSpriteImageState, MutableSpriteInterpolation } from '../internalTypes';
13
- export interface SpriteInterpolationChannelDescriptor {
14
- readonly resolveInterpolation: (image: InternalSpriteImageState) => MutableSpriteInterpolation<number>;
15
- readonly normalize?: (value: number) => number;
16
- readonly applyValue: (image: InternalSpriteImageState, value: number) => void;
17
- readonly applyFinalValue?: (image: InternalSpriteImageState, value: number) => void;
18
- }
19
- /**
20
- * Ensures the rotation channel reflects the latest targets, optionally overriding interpolation.
21
- */
22
- export declare const syncImageRotationChannel: (image: InternalSpriteImageState, spriteAutoRotationDeg: number, optionsOverride?: SpriteInterpolationOptions | null) => void;
23
- /**
24
- * Clears any running offset angle interpolation.
25
- */
26
- export declare const clearOffsetDegInterpolation: (image: InternalSpriteImageState) => void;
27
- type OffsetUpdate = {
28
- offsetMeters: number;
29
- offsetDeg: number;
30
- };
31
- /**
32
- * Clears any running offset distance interpolation in meters.
33
- */
34
- export declare const clearOffsetMetersInterpolation: (image: InternalSpriteImageState) => void;
35
- /**
36
- * Clears any running opacity interpolation.
37
- */
38
- export declare const clearOpacityInterpolation: (image: InternalSpriteImageState) => void;
39
- export declare const applyOpacityUpdate: (image: InternalSpriteImageState, nextOpacity: number, interpolationOptions?: SpriteInterpolationOptions | null, spriteOpacityMultiplier?: number) => void;
40
- export declare const applyResolvedOpacityTarget: (image: InternalSpriteImageState, resolvedTarget: number, interpolationOptions?: SpriteInterpolationOptions | null) => void;
41
- export type ImageInterpolationStepperId = 'rotation' | 'offsetDeg' | 'offsetMeters' | 'opacity';
42
- /**
43
- * Executes all interpolation steppers for an image and reports whether any remain active.
44
- */
45
- export interface StepSpriteImageInterpolationOptions {
46
- readonly skipChannels?: Partial<Record<ImageInterpolationStepperId, boolean>>;
47
- readonly autoRotationDeg?: number;
48
- }
49
- export declare const stepSpriteImageInterpolations: (image: InternalSpriteImageState, timestamp: number, options?: StepSpriteImageInterpolationOptions) => boolean;
50
- export declare const hasActiveImageInterpolations: (image: InternalSpriteImageState) => boolean;
51
- export interface ApplyOffsetUpdateOptions {
52
- readonly deg?: SpriteInterpolationOptions | null;
53
- readonly meters?: SpriteInterpolationOptions | null;
54
- }
55
- /**
56
- * Applies offset updates across both angular and radial channels.
57
- */
58
- export declare const applyOffsetUpdate: (image: InternalSpriteImageState, nextOffset: OffsetUpdate, options?: ApplyOffsetUpdateOptions) => void;
59
- export {};
@@ -1,30 +0,0 @@
1
- /*!
2
- * name: maplibre-gl-layers
3
- * version: 0.19.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: 7bc93c11d7855dedb8d60f140af4e413252c32a7
9
- */
10
-
11
- import { SpriteInterpolationOptions, SpriteLocation } from '../types';
12
- import { InternalSpriteCurrentState, SpriteInterpolationEvaluationResult, SpriteInterpolationState } from '../internalTypes';
13
- export interface CreateLocationInterpolationStateParams {
14
- currentLocation: SpriteLocation;
15
- lastCommandLocation?: SpriteLocation;
16
- nextCommandLocation: SpriteLocation;
17
- options: SpriteInterpolationOptions;
18
- }
19
- export interface CreateLocationInterpolationStateResult {
20
- readonly state: SpriteInterpolationState<SpriteLocation>;
21
- readonly requiresInterpolation: boolean;
22
- }
23
- export declare const createLocationInterpolationState: (params: CreateLocationInterpolationStateParams) => CreateLocationInterpolationStateResult;
24
- export declare const evaluateLocationInterpolation: (state: SpriteInterpolationState<SpriteLocation>, timestamp: number) => SpriteInterpolationEvaluationResult<SpriteLocation>;
25
- export declare const evaluateLocationInterpolationsBatch: (states: readonly SpriteInterpolationState<SpriteLocation>[], timestamp: number) => SpriteInterpolationEvaluationResult<SpriteLocation>[];
26
- export interface LocationInterpolationWorkItem<TTag> extends SpriteInterpolationState<SpriteLocation> {
27
- readonly sprite: InternalSpriteCurrentState<TTag>;
28
- }
29
- export declare const collectLocationInterpolationWorkItems: <TTag>(sprite: InternalSpriteCurrentState<TTag>, workItems: LocationInterpolationWorkItem<TTag>[]) => void;
30
- export declare const applyLocationInterpolationEvaluations: <TTag>(workItems: readonly LocationInterpolationWorkItem<TTag>[], evaluations: readonly SpriteInterpolationEvaluationResult<SpriteLocation>[], timestamp: number) => boolean;
@@ -1,40 +0,0 @@
1
- /*!
2
- * name: maplibre-gl-layers
3
- * version: 0.19.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: 7bc93c11d7855dedb8d60f140af4e413252c32a7
9
- */
10
-
11
- import { SpriteInterpolationOptions } from '../types';
12
- import { SpriteInterpolationState } from '../internalTypes';
13
- /**
14
- * Parameters describing the rotation update request.
15
- */
16
- export interface ResolveRotationTargetParams {
17
- /** Current angle already applied to the sprite in degrees. */
18
- currentAngleDeg: number;
19
- /** Desired angle in degrees that should be reached. */
20
- targetAngleDeg: number;
21
- /** Previous commanded angle for feed-forward prediction. */
22
- previousCommandAngleDeg?: number;
23
- /** Optional interpolation configuration. */
24
- options?: SpriteInterpolationOptions | null;
25
- }
26
- /**
27
- * Result produced by {@link resolveRotationTarget} when determining the next rotation step.
28
- */
29
- export interface ResolveRotationTargetResult {
30
- /** Angle that should be applied immediately. */
31
- readonly nextAngleDeg: number;
32
- /** Optional state for animating toward the target. */
33
- readonly interpolationState: SpriteInterpolationState<number> | null;
34
- }
35
- /**
36
- * Determines whether a rotation change requires interpolation and, if so, produces the state to drive it.
37
- * @param {ResolveRotationTargetParams} params - Inputs including current angle, target angle, and options.
38
- * @returns {ResolveRotationTargetResult} Immediate angle plus optional interpolation state.
39
- */
40
- export declare const resolveRotationTarget: (params: ResolveRotationTargetParams) => ResolveRotationTargetResult;