maplibre-gl-layers 0.13.0 → 0.15.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 (40) hide show
  1. package/README.md +3 -3
  2. package/dist/SpriteLayer.d.ts +3 -27
  3. package/dist/config.d.ts +10 -2
  4. package/dist/const.d.ts +3 -3
  5. package/dist/default.d.ts +2 -2
  6. package/dist/gl/atlas.d.ts +64 -0
  7. package/dist/gl/hitTest.d.ts +54 -0
  8. package/dist/{shader.d.ts → gl/shader.d.ts} +22 -4
  9. package/dist/gl/text.d.ts +17 -0
  10. package/dist/{calculationHost.d.ts → host/calculationHost.d.ts} +26 -4
  11. package/dist/{mapLibreProjectionHost.d.ts → host/mapLibreProjectionHost.d.ts} +3 -3
  12. package/dist/{projectionHost.d.ts → host/projectionHost.d.ts} +5 -4
  13. package/dist/host/runtime.d.ts +38 -0
  14. package/dist/{wasmCalculationHost.d.ts → host/wasmCalculationHost.d.ts} +14 -14
  15. package/dist/{wasmHost.d.ts → host/wasmHost.d.ts} +14 -8
  16. package/dist/{wasmProjectionHost.d.ts → host/wasmProjectionHost.d.ts} +3 -3
  17. package/dist/index.cjs +7117 -4673
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.ts +4 -3
  20. package/dist/index.mjs +7117 -4673
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/internalTypes.d.ts +109 -15
  23. package/dist/{degreeInterpolation.d.ts → interpolation/degreeInterpolation.d.ts} +19 -4
  24. package/dist/interpolation/distanceInterpolation.d.ts +46 -0
  25. package/dist/{easing.d.ts → interpolation/easing.d.ts} +9 -4
  26. package/dist/{interpolation.d.ts → interpolation/interpolation.d.ts} +5 -27
  27. package/dist/{interpolationChannels.d.ts → interpolation/interpolationChannels.d.ts} +16 -7
  28. package/dist/{rotationInterpolation.d.ts → interpolation/rotationInterpolation.d.ts} +5 -10
  29. package/dist/types.d.ts +75 -26
  30. package/dist/{image.d.ts → utils/image.d.ts} +3 -3
  31. package/dist/{looseQuadTree.d.ts → utils/looseQuadTree.d.ts} +2 -2
  32. package/dist/{math.d.ts → utils/math.d.ts} +15 -4
  33. package/dist/{utils.d.ts → utils/utils.d.ts} +3 -3
  34. package/dist/wasm/config.json.d.ts +16 -0
  35. package/dist/wasm/offloads-nosimd.wasm +0 -0
  36. package/dist/wasm/offloads-simd-mt.js +2 -0
  37. package/dist/wasm/offloads-simd-mt.wasm +0 -0
  38. package/dist/wasm/offloads-simd.wasm +0 -0
  39. package/package.json +7 -9
  40. package/dist/distanceInterpolation.d.ts +0 -33
package/dist/types.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * name: maplibre-gl-layers
3
- * version: 0.13.0
3
+ * version: 0.15.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: 4934aa7f4fed93594ece419184b32b5b972bbb88
8
+ * git.commit.hash: d850b7e9c713f54f0630248dc4ea370721b6965b
9
9
  */
10
10
 
11
11
  import { CustomLayerInterface } from 'maplibre-gl';
@@ -75,14 +75,16 @@ export interface SpriteImageOriginLocation {
75
75
  export type SpriteInterpolationMode = 'feedback' | 'feedforward';
76
76
  /** Easing function signature used to map interpolation progress. */
77
77
  export type EasingFunction = (progress: number) => number;
78
+ export type SpriteEasingPresetName = 'linear';
79
+ export type SpriteInterpolationEasing = EasingFunction | SpriteEasingPresetName;
78
80
  /** Options for interpolating values. */
79
81
  export interface SpriteInterpolationOptions {
80
82
  /** Interpolation mode; defaults to feedback. */
81
83
  mode?: SpriteInterpolationMode;
82
84
  /** Duration in milliseconds. */
83
85
  durationMs: number;
84
- /** Easing function mapping interpolation progress. Defaults to linear. */
85
- easing?: EasingFunction;
86
+ /** Easing mapping applied to progress values. Accepts preset names or custom functions. Defaults to linear. */
87
+ easing?: SpriteInterpolationEasing;
86
88
  }
87
89
  /** Interpolation configuration for rotateDeg and offsetDeg. */
88
90
  export interface SpriteImageInterpolationOptions {
@@ -92,6 +94,8 @@ export interface SpriteImageInterpolationOptions {
92
94
  offsetDeg?: SpriteInterpolationOptions | null;
93
95
  /** Interpolation settings for offset.offsetMeters; null disables interpolation. */
94
96
  offsetMeters?: SpriteInterpolationOptions | null;
97
+ /** Interpolation settings for opacity; null disables interpolation. */
98
+ opacity?: SpriteInterpolationOptions | null;
95
99
  }
96
100
  /**
97
101
  * Initial attributes that define a sprite image.
@@ -180,6 +184,11 @@ export interface SpriteInit<TTag> {
180
184
  isEnabled?: boolean;
181
185
  /** Initial location. */
182
186
  location: SpriteLocation;
187
+ /**
188
+ * Pseudo LOD threshold for the sprite. When the camera distance exceeds this value,
189
+ * all images attached to the sprite become invisible.
190
+ */
191
+ visibilityDistanceMeters?: number;
183
192
  /** Array of zero or more images. */
184
193
  images: SpriteImageDefinitionInitEntry[];
185
194
  /** Optional tag value; null or omission means no tag. */
@@ -200,6 +209,27 @@ export interface SpriteInitEntry<TTag> extends SpriteInit<TTag> {
200
209
  * @template TTag Tag type.
201
210
  */
202
211
  export type SpriteInitCollection<TTag> = Record<string, SpriteInit<TTag>> | readonly SpriteInitEntry<TTag>[];
212
+ /**
213
+ * Interpolated values.
214
+ * @param T - Value type.
215
+ */
216
+ export interface InterpolatedValues<T> {
217
+ /** Current time value. */
218
+ readonly current: T;
219
+ /** Requested value. */
220
+ readonly from: T | undefined;
221
+ /** Will be reached value. */
222
+ readonly to: T | undefined;
223
+ }
224
+ /**
225
+ * Offset with interpolation metadata for both distance and heading.
226
+ */
227
+ export interface SpriteImageInterpolatedOffset {
228
+ /** Distance from the anchor in meters. */
229
+ readonly offsetMeters: InterpolatedValues<number>;
230
+ /** Heading describing the offset direction in degrees. */
231
+ readonly offsetDeg: InterpolatedValues<number>;
232
+ }
203
233
  /**
204
234
  * Sprite image state evaluated at runtime.
205
235
  *
@@ -207,11 +237,11 @@ export type SpriteInitCollection<TTag> = Record<string, SpriteInit<TTag>> | read
207
237
  * @property {number} order - Ordering slot within the sub-layer.
208
238
  * @property {string} imageId - Identifier of the registered image or glyph.
209
239
  * @property {SpriteMode} mode - Rendering mode applied to the image.
210
- * @property {number} opacity - Opacity multiplier applied when rendering.
240
+ * @property {InterpolatedValues<number>} opacity - Opacity multiplier applied when rendering, with interpolation metadata.
211
241
  * @property {number} scale - Scale factor converting pixels to meters.
212
242
  * @property {Readonly<SpriteAnchor>} anchor - Anchor coordinates resolved for the image.
213
- * @property {Readonly<SpriteImageOffset>} offset - Offset applied relative to the anchor point.
214
- * @property {number} rotateDeg - Additional rotation in degrees.
243
+ * @property {Readonly<SpriteImageInterpolatedOffset>} offset - Offset applied relative to the anchor point, with interpolation metadata.
244
+ * @property {InterpolatedValues<number>} rotateDeg - Additional rotation in degrees plus interpolation metadata.
215
245
  * @property {boolean} autoRotation - Indicates whether auto-rotation is active.
216
246
  * @property {number} autoRotationMinDistanceMeters - Minimum travel distance before auto-rotation updates.
217
247
  * @property {number} resolvedBaseRotateDeg - Internal base rotation resolved for the current frame.
@@ -227,16 +257,19 @@ export interface SpriteImageState {
227
257
  readonly imageId: string;
228
258
  /** Rendering mode applied to the image. */
229
259
  readonly mode: SpriteMode;
230
- /** Opacity multiplier applied when rendering. */
231
- readonly opacity: number;
232
260
  /** Scale factor converting pixels to meters. */
233
261
  readonly scale: number;
234
262
  /** Anchor coordinates resolved for the image. */
235
263
  readonly anchor: Readonly<SpriteAnchor>;
264
+ /** Opacity multiplier applied when rendering. */
265
+ readonly opacity: InterpolatedValues<number>;
236
266
  /** Offset applied relative to the anchor point. */
237
- readonly offset: Readonly<SpriteImageOffset>;
238
- /** Additional rotation in degrees. */
239
- readonly rotateDeg: number;
267
+ readonly offset: Readonly<SpriteImageInterpolatedOffset>;
268
+ /**
269
+ * Additional rotation in degrees with interpolation metadata.
270
+ * `from`/`to` are `undefined` when no rotation animation is running.
271
+ */
272
+ readonly rotateDeg: InterpolatedValues<number>;
240
273
  /** Indicates whether auto-rotation is active. */
241
274
  readonly autoRotation: boolean;
242
275
  /** Minimum travel distance before auto-rotation updates. */
@@ -258,20 +291,16 @@ export interface SpriteCurrentState<TTag> {
258
291
  readonly spriteId: string;
259
292
  /** Indicates whether the sprite is enabled. */
260
293
  readonly isEnabled: boolean;
261
- /** Current (possibly interpolated) location. */
262
- readonly currentLocation: Readonly<SpriteLocation>;
263
294
  /**
264
- * Source location during interpolation; undefined when not interpolating.
265
- * Feedback mode: previous commanded location.
266
- * Feed-forward mode: current commanded location.
295
+ * Pseudo LOD threshold for the sprite. When the camera distance exceeds this value,
296
+ * the sprite's images become invisible.
267
297
  */
268
- readonly fromLocation?: Readonly<SpriteLocation>;
298
+ readonly visibilityDistanceMeters: number | undefined;
269
299
  /**
270
- * Destination location during interpolation; undefined when not interpolating.
271
- * Feedback mode: current commanded location.
272
- * Feed-forward mode: predicted location.
300
+ * Location information including current, source, and destination coordinates.
301
+ * `from`/`to` are `undefined` when interpolation is inactive.
273
302
  */
274
- readonly toLocation?: Readonly<SpriteLocation>;
303
+ readonly location: InterpolatedValues<Readonly<SpriteLocation>>;
275
304
  /** Current image states, grouped by sub-layer and order. */
276
305
  readonly images: ReadonlyMap<number, ReadonlyMap<number, SpriteImageState>>;
277
306
  /** Optional tag value; null indicates no tag. */
@@ -295,6 +324,11 @@ export interface SpriteUpdateEntryBase<TTag> {
295
324
  interpolation?: SpriteInterpolationOptions | null;
296
325
  /** Optional tag value to replace the current one; `null` clears the tag. */
297
326
  tag?: TTag | null;
327
+ /**
328
+ * Pseudo LOD threshold for the sprite. Specify a positive finite value to enable the check,
329
+ * `null` to clear the current threshold, or leave `undefined` to keep the existing value.
330
+ */
331
+ visibilityDistanceMeters?: number | null;
298
332
  }
299
333
  /**
300
334
  * Update entry describing a sprite image modification.
@@ -512,10 +546,6 @@ export interface SpriteTextureFilteringOptions {
512
546
  generateMipmaps?: boolean;
513
547
  maxAnisotropy?: number;
514
548
  }
515
- /**
516
- * Calculation variant. It is internal calculation methods.
517
- */
518
- export type SpriteLayerCalculationVariant = 'simd' | 'nosimd' | 'disabled';
519
549
  /**
520
550
  * Options accepted when creating a SpriteLayer.
521
551
  *
@@ -800,3 +830,22 @@ export interface SpriteLayerInterface<TTag = any> extends CustomLayerInterface {
800
830
  */
801
831
  readonly off: <K extends keyof SpriteLayerEventMap<TTag>>(type: K, listener: SpriteLayerEventListener<TTag, K>) => void;
802
832
  }
833
+ /**
834
+ * Calculation variant. It is internal calculation methods.
835
+ */
836
+ export type SpriteLayerCalculationVariant = 'simd-mt' | 'simd' | 'nosimd' | 'disabled';
837
+ /**
838
+ * SpriteLayer host options.
839
+ */
840
+ export interface SpriteLayerHostOptions {
841
+ /**
842
+ * Calculation variant. Default is `simd`.
843
+ * Use `simd-mt` to enable pthread/SIMD wasm when `SharedArrayBuffer` is available
844
+ * (i.e. cross-origin isolated contexts) and fall back to the other variants otherwise.
845
+ */
846
+ readonly variant?: SpriteLayerCalculationVariant;
847
+ /**
848
+ * Wasm runtime module base URL path. Default is `/wasm`
849
+ */
850
+ readonly wasmBaseUrl?: string;
851
+ }
@@ -1,14 +1,14 @@
1
1
  /*!
2
2
  * name: maplibre-gl-layers
3
- * version: 0.13.0
3
+ * version: 0.15.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: 4934aa7f4fed93594ece419184b32b5b972bbb88
8
+ * git.commit.hash: d850b7e9c713f54f0630248dc4ea370721b6965b
9
9
  */
10
10
 
11
- import { SpriteImageRegisterOptions } from './types';
11
+ import { SpriteImageRegisterOptions } from '../types';
12
12
  export type SvgSizeResolutionErrorCode = 'size-missing' | 'viewbox-disabled' | 'invalid-dimensions';
13
13
  export declare class SvgSizeResolutionError extends Error implements Error {
14
14
  readonly code: SvgSizeResolutionErrorCode;
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * name: maplibre-gl-layers
3
- * version: 0.13.0
3
+ * version: 0.15.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: 4934aa7f4fed93594ece419184b32b5b972bbb88
8
+ * git.commit.hash: d850b7e9c713f54f0630248dc4ea370721b6965b
9
9
  */
10
10
 
11
11
  export interface Rect {
@@ -1,15 +1,15 @@
1
1
  /*!
2
2
  * name: maplibre-gl-layers
3
- * version: 0.13.0
3
+ * version: 0.15.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: 4934aa7f4fed93594ece419184b32b5b972bbb88
8
+ * git.commit.hash: d850b7e9c713f54f0630248dc4ea370721b6965b
9
9
  */
10
10
 
11
- import { SpriteAnchor, SpriteImageOffset, SpriteLocation, SpritePoint, SpriteScalingOptions, SpriteScreenPoint } from './types';
12
- import { InternalSpriteCurrentState, MatrixInput, ProjectionHost, SpriteMercatorCoordinate } from './internalTypes';
11
+ import { SpriteAnchor, SpriteImageOffset, SpriteLocation, SpritePoint, SpriteScalingOptions, SpriteScreenPoint } from '../types';
12
+ import { InternalSpriteCurrentState, MatrixInput, ProjectionHost, SpriteMercatorCoordinate } from '../internalTypes';
13
13
  /**
14
14
  * Produces a deep copy so later updates do not mutate the original object.
15
15
  */
@@ -23,6 +23,11 @@ export declare const lerpSpriteLocation: (from: SpriteLocation, to: SpriteLocati
23
23
  * Compares two locations. Treats altitude as equal when either side is undefined.
24
24
  */
25
25
  export declare const spriteLocationsEqual: (a: SpriteLocation, b: SpriteLocation) => boolean;
26
+ export declare const calculateCartesianDistanceMeters: (a: Readonly<SpriteLocation>, b: Readonly<SpriteLocation>) => number;
27
+ /**
28
+ * Normalizes an angle in degrees to the [0, 360) range.
29
+ */
30
+ export declare const normalizeAngleDeg: (angle: number) => number;
26
31
  /**
27
32
  * Multiplies a 4x4 matrix with a 4-component vector using row-major indexing.
28
33
  * @param {MatrixInput} matrix - Matrix to multiply.
@@ -464,3 +469,9 @@ export declare const calculateSurfaceCornerDisplacements: (params: SurfaceCorner
464
469
  * @returns {SpriteMercatorCoordinate} Cached Mercator coordinate representing the current location.
465
470
  */
466
471
  export declare const resolveSpriteMercator: <T>(projectionHost: ProjectionHost, sprite: InternalSpriteCurrentState<T>) => SpriteMercatorCoordinate;
472
+ /**
473
+ * Clamp opacity value.
474
+ * @param value Value
475
+ * @returns Clamped value
476
+ */
477
+ export declare const clampOpacity: (value: number) => number;
@@ -1,14 +1,14 @@
1
1
  /*!
2
2
  * name: maplibre-gl-layers
3
- * version: 0.13.0
3
+ * version: 0.15.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: 4934aa7f4fed93594ece419184b32b5b972bbb88
8
+ * git.commit.hash: d850b7e9c713f54f0630248dc4ea370721b6965b
9
9
  */
10
10
 
11
- import { ImageHandleBufferController, IdHandler, RenderTargetBucketBuffers, RenderTargetEntryLike, SpriteOriginReference } from './internalTypes';
11
+ import { ImageHandleBufferController, IdHandler, RenderTargetBucketBuffers, RenderTargetEntryLike, SpriteOriginReference } from '../internalTypes';
12
12
  /**
13
13
  * Create id handler object.
14
14
  * @param T Identified instance type
@@ -0,0 +1,16 @@
1
+ /*!
2
+ * name: maplibre-gl-layers
3
+ * version: 0.15.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: d850b7e9c713f54f0630248dc4ea370721b6965b
9
+ */
10
+
11
+ declare const _default: {
12
+ "pthreadPoolSize": 4
13
+ }
14
+ ;
15
+
16
+ export default _default;
Binary file
@@ -0,0 +1,2 @@
1
+ async function Module(moduleArg={}){var moduleRtn;var Module=moduleArg;var ENVIRONMENT_IS_WEB=!!globalThis.window;var ENVIRONMENT_IS_WORKER=!!globalThis.WorkerGlobalScope;var ENVIRONMENT_IS_NODE=globalThis.process?.versions?.node&&globalThis.process?.type!="renderer";var ENVIRONMENT_IS_PTHREAD=ENVIRONMENT_IS_WORKER&&self.name?.startsWith("em-pthread");if(ENVIRONMENT_IS_NODE){const{createRequire}=await import("module");var require=createRequire(import.meta.url);var worker_threads=require("worker_threads");global.Worker=worker_threads.Worker;ENVIRONMENT_IS_WORKER=!worker_threads.isMainThread;ENVIRONMENT_IS_PTHREAD=ENVIRONMENT_IS_WORKER&&worker_threads["workerData"]=="em-pthread"}var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var _scriptName=import.meta.url;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("fs");if(_scriptName.startsWith("file:")){scriptDirectory=require("path").dirname(require("url").fileURLToPath(_scriptName))+"/"}readBinary=filename=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename);return ret};readAsync=async(filename,binary=true)=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename,binary?undefined:"utf8");return ret};if(process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{scriptDirectory=new URL(".",_scriptName).href}catch{}if(!ENVIRONMENT_IS_NODE){if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=async url=>{if(isFileURI(url)){return new Promise((resolve,reject)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){resolve(xhr.response);return}reject(xhr.status)};xhr.onerror=reject;xhr.send(null)})}var response=await fetch(url,{credentials:"same-origin"});if(response.ok){return response.arrayBuffer()}throw new Error(response.status+" : "+response.url)}}}else{}var defaultPrint=console.log.bind(console);var defaultPrintErr=console.error.bind(console);if(ENVIRONMENT_IS_NODE){var utils=require("util");var stringify=a=>typeof a=="object"?utils.inspect(a):a;defaultPrint=(...args)=>fs.writeSync(1,args.map(stringify).join(" ")+"\n");defaultPrintErr=(...args)=>fs.writeSync(2,args.map(stringify).join(" ")+"\n")}var out=defaultPrint;var err=defaultPrintErr;var wasmBinary;var wasmModule;var ABORT=false;var EXITSTATUS;var isFileURI=filename=>filename.startsWith("file://");var readyPromiseResolve,readyPromiseReject;if(ENVIRONMENT_IS_NODE&&ENVIRONMENT_IS_PTHREAD){var parentPort=worker_threads["parentPort"];parentPort.on("message",msg=>global.onmessage?.({data:msg}));Object.assign(globalThis,{self:global,postMessage:msg=>parentPort["postMessage"](msg)});process.on("uncaughtException",err=>{postMessage({cmd:"uncaughtException",error:err});process.exit(1)})}var startWorker;if(ENVIRONMENT_IS_PTHREAD){var initializedJS=false;self.onunhandledrejection=e=>{throw e.reason||e};function handleMessage(e){try{var msgData=e["data"];var cmd=msgData.cmd;if(cmd==="load"){let messageQueue=[];self.onmessage=e=>messageQueue.push(e);startWorker=()=>{postMessage({cmd:"loaded"});for(let msg of messageQueue){handleMessage(msg)}self.onmessage=handleMessage};for(const handler of msgData.handlers){if(!Module[handler]||Module[handler].proxy){Module[handler]=(...args)=>{postMessage({cmd:"callHandler",handler,args})};if(handler=="print")out=Module[handler];if(handler=="printErr")err=Module[handler]}}wasmMemory=msgData.wasmMemory;updateMemoryViews();wasmModule=msgData.wasmModule;createWasm();run()}else if(cmd==="run"){establishStackSpace(msgData.pthread_ptr);__emscripten_thread_init(msgData.pthread_ptr,0,0,1,0,0);PThread.threadInitTLS();__emscripten_thread_mailbox_await(msgData.pthread_ptr);if(!initializedJS){initializedJS=true}try{invokeEntryPoint(msgData.start_routine,msgData.arg)}catch(ex){if(ex!="unwind"){throw ex}}}else if(msgData.target==="setimmediate"){}else if(cmd==="checkMailbox"){if(initializedJS){checkMailbox()}}else if(cmd){err(`worker: received unknown command ${cmd}`);err(msgData)}}catch(ex){__emscripten_thread_crashed();throw ex}}self.onmessage=handleMessage}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;var HEAP64,HEAPU64;var runtimeInitialized=false;function updateMemoryViews(){var b=wasmMemory.buffer;HEAP8=new Int8Array(b);HEAP16=new Int16Array(b);HEAPU8=new Uint8Array(b);HEAPU16=new Uint16Array(b);HEAP32=new Int32Array(b);HEAPU32=new Uint32Array(b);HEAPF32=new Float32Array(b);HEAPF64=new Float64Array(b);HEAP64=new BigInt64Array(b);HEAPU64=new BigUint64Array(b)}function initMemory(){if(ENVIRONMENT_IS_PTHREAD){return}if(Module["wasmMemory"]){wasmMemory=Module["wasmMemory"]}else{var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||536870912;wasmMemory=new WebAssembly.Memory({initial:INITIAL_MEMORY/65536,maximum:INITIAL_MEMORY/65536,shared:true})}updateMemoryViews()}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(onPreRuns)}function initRuntime(){runtimeInitialized=true;if(ENVIRONMENT_IS_PTHREAD)return startWorker();wasmExports["s"]()}function postRun(){if(ENVIRONMENT_IS_PTHREAD){return}if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(onPostRuns)}function abort(what){Module["onAbort"]?.(what);what="Aborted("+what+")";err(what);ABORT=true;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject?.(e);throw e}var wasmBinaryFile;function findWasmBinary(){if(Module["locateFile"]){return locateFile("offloads-simd-mt.wasm")}return new URL("offloads-simd-mt.wasm",import.meta.url).href}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}async function getWasmBinary(binaryFile){if(!wasmBinary){try{var response=await readAsync(binaryFile);return new Uint8Array(response)}catch{}}return getBinarySync(binaryFile)}async function instantiateArrayBuffer(binaryFile,imports){try{var binary=await getWasmBinary(binaryFile);var instance=await WebAssembly.instantiate(binary,imports);return instance}catch(reason){err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)}}async function instantiateAsync(binary,binaryFile,imports){if(!binary&&!isFileURI(binaryFile)&&!ENVIRONMENT_IS_NODE){try{var response=fetch(binaryFile,{credentials:"same-origin"});var instantiationResult=await WebAssembly.instantiateStreaming(response,imports);return instantiationResult}catch(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation")}}return instantiateArrayBuffer(binaryFile,imports)}function getWasmImports(){assignWasmImports();var imports={a:wasmImports};return imports}async function createWasm(){function receiveInstance(instance,module){wasmExports=instance.exports;registerTLSInit(wasmExports["H"]);assignWasmExports(wasmExports);wasmModule=module;return wasmExports}function receiveInstantiationResult(result){return receiveInstance(result["instance"],result["module"])}var info=getWasmImports();if(Module["instantiateWasm"]){return new Promise((resolve,reject)=>{Module["instantiateWasm"](info,(inst,mod)=>{resolve(receiveInstance(inst,mod))})})}if(ENVIRONMENT_IS_PTHREAD){var instance=new WebAssembly.Instance(wasmModule,getWasmImports());return receiveInstance(instance,wasmModule)}wasmBinaryFile??=findWasmBinary();var result=await instantiateAsync(wasmBinary,wasmBinaryFile,info);var exports=receiveInstantiationResult(result);return exports}class ExitStatus{name="ExitStatus";constructor(status){this.message=`Program terminated with exit(${status})`;this.status=status}}var terminateWorker=worker=>{worker.terminate();worker.onmessage=e=>{}};var cleanupThread=pthread_ptr=>{var worker=PThread.pthreads[pthread_ptr];PThread.returnWorkerToPool(worker)};var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var onPreRuns=[];var addOnPreRun=cb=>onPreRuns.push(cb);var runDependencies=0;var dependenciesFulfilled=null;var removeRunDependency=id=>{runDependencies--;Module["monitorRunDependencies"]?.(runDependencies);if(runDependencies==0){if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}};var addRunDependency=id=>{runDependencies++;Module["monitorRunDependencies"]?.(runDependencies)};var spawnThread=threadParams=>{var worker=PThread.getNewWorker();if(!worker){return 6}PThread.runningWorkers.push(worker);PThread.pthreads[threadParams.pthread_ptr]=worker;worker.pthread_ptr=threadParams.pthread_ptr;var msg={cmd:"run",start_routine:threadParams.startRoutine,arg:threadParams.arg,pthread_ptr:threadParams.pthread_ptr};if(ENVIRONMENT_IS_NODE){worker.unref()}worker.postMessage(msg,threadParams.transferList);return 0};var runtimeKeepaliveCounter=0;var keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0;var stackSave=()=>_emscripten_stack_get_current();var stackRestore=val=>__emscripten_stack_restore(val);var stackAlloc=sz=>__emscripten_stack_alloc(sz);var proxyToMainThread=(funcIndex,emAsmAddr,sync,...callArgs)=>{var serializedNumCallArgs=callArgs.length*2;var sp=stackSave();var args=stackAlloc(serializedNumCallArgs*8);var b=args>>3;for(var i=0;i<callArgs.length;i++){var arg=callArgs[i];if(typeof arg=="bigint"){HEAP64[b+2*i]=1n;HEAP64[b+2*i+1]=arg}else{HEAP64[b+2*i]=0n;HEAPF64[b+2*i+1]=arg}}var rtn=__emscripten_run_js_on_main_thread(funcIndex,emAsmAddr,serializedNumCallArgs,args,sync);stackRestore(sp);return rtn};function _proc_exit(code){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(0,0,1,code);EXITSTATUS=code;if(!keepRuntimeAlive()){PThread.terminateAllThreads();Module["onExit"]?.(code);ABORT=true}quit_(code,new ExitStatus(code))}function exitOnMainThread(returnCode){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(1,0,0,returnCode);_exit(returnCode)}var exitJS=(status,implicit)=>{EXITSTATUS=status;if(ENVIRONMENT_IS_PTHREAD){exitOnMainThread(status);throw"unwind"}_proc_exit(status)};var _exit=exitJS;var PThread={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init(){if(!ENVIRONMENT_IS_PTHREAD){PThread.initMainThread()}},initMainThread(){var pthreadPoolSize=4;while(pthreadPoolSize--){PThread.allocateUnusedWorker()}addOnPreRun(async()=>{var pthreadPoolReady=PThread.loadWasmModuleToAllWorkers();addRunDependency("loading-workers");await pthreadPoolReady;removeRunDependency("loading-workers")})},terminateAllThreads:()=>{for(var worker of PThread.runningWorkers){terminateWorker(worker)}for(var worker of PThread.unusedWorkers){terminateWorker(worker)}PThread.unusedWorkers=[];PThread.runningWorkers=[];PThread.pthreads={}},returnWorkerToPool:worker=>{var pthread_ptr=worker.pthread_ptr;delete PThread.pthreads[pthread_ptr];PThread.unusedWorkers.push(worker);PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker),1);worker.pthread_ptr=0;__emscripten_thread_free_data(pthread_ptr)},threadInitTLS(){PThread.tlsInitFunctions.forEach(f=>f())},loadWasmModuleToWorker:worker=>new Promise(onFinishedLoading=>{worker.onmessage=e=>{var d=e["data"];var cmd=d.cmd;if(d.targetThread&&d.targetThread!=_pthread_self()){var targetWorker=PThread.pthreads[d.targetThread];if(targetWorker){targetWorker.postMessage(d,d.transferList)}else{err(`Internal error! Worker sent a message "${cmd}" to target pthread ${d.targetThread}, but that thread no longer exists!`)}return}if(cmd==="checkMailbox"){checkMailbox()}else if(cmd==="spawnThread"){spawnThread(d)}else if(cmd==="cleanupThread"){callUserCallback(()=>cleanupThread(d.thread))}else if(cmd==="loaded"){worker.loaded=true;if(ENVIRONMENT_IS_NODE&&!worker.pthread_ptr){worker.unref()}onFinishedLoading(worker)}else if(d.target==="setimmediate"){worker.postMessage(d)}else if(cmd==="uncaughtException"){worker.onerror(d.error)}else if(cmd==="callHandler"){Module[d.handler](...d.args)}else if(cmd){err(`worker sent an unknown command ${cmd}`)}};worker.onerror=e=>{var message="worker sent an error!";err(`${message} ${e.filename}:${e.lineno}: ${e.message}`);throw e};if(ENVIRONMENT_IS_NODE){worker.on("message",data=>worker.onmessage({data}));worker.on("error",e=>worker.onerror(e))}var handlers=[];var knownHandlers=["onExit","onAbort","print","printErr"];for(var handler of knownHandlers){if(Module.propertyIsEnumerable(handler)){handlers.push(handler)}}worker.postMessage({cmd:"load",handlers,wasmMemory,wasmModule})}),async loadWasmModuleToAllWorkers(){if(ENVIRONMENT_IS_PTHREAD){return}let pthreadPoolReady=Promise.all(PThread.unusedWorkers.map(PThread.loadWasmModuleToWorker));return pthreadPoolReady},allocateUnusedWorker(){var worker;if(Module["mainScriptUrlOrBlob"]){var pthreadMainJs=Module["mainScriptUrlOrBlob"];if(typeof pthreadMainJs!="string"){pthreadMainJs=URL.createObjectURL(pthreadMainJs)}worker=new Worker(pthreadMainJs,{type:"module",workerData:"em-pthread",name:"em-pthread"})}else worker=new Worker(new URL("offloads-simd-mt.js",import.meta.url),{type:"module",workerData:"em-pthread",name:"em-pthread"});PThread.unusedWorkers.push(worker)},getNewWorker(){if(PThread.unusedWorkers.length==0){PThread.allocateUnusedWorker();PThread.loadWasmModuleToWorker(PThread.unusedWorkers[0])}return PThread.unusedWorkers.pop()}};var onPostRuns=[];var addOnPostRun=cb=>onPostRuns.push(cb);function establishStackSpace(pthread_ptr){var stackHigh=HEAPU32[pthread_ptr+52>>2];var stackSize=HEAPU32[pthread_ptr+56>>2];var stackLow=stackHigh-stackSize;_emscripten_stack_set_limits(stackHigh,stackLow);stackRestore(stackHigh)}var wasmTableMirror=[];var getWasmTableEntry=funcPtr=>{var func=wasmTableMirror[funcPtr];if(!func){wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func};var invokeEntryPoint=(ptr,arg)=>{runtimeKeepaliveCounter=0;noExitRuntime=0;var result=getWasmTableEntry(ptr)(arg);function finish(result){if(keepRuntimeAlive()){EXITSTATUS=result;return}__emscripten_thread_exit(result)}finish(result)};var noExitRuntime=true;var registerTLSInit=tlsInitFunc=>PThread.tlsInitFunctions.push(tlsInitFunc);var wasmMemory;class ExceptionInfo{constructor(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24}set_type(type){HEAPU32[this.ptr+4>>2]=type}get_type(){return HEAPU32[this.ptr+4>>2]}set_destructor(destructor){HEAPU32[this.ptr+8>>2]=destructor}get_destructor(){return HEAPU32[this.ptr+8>>2]}set_caught(caught){caught=caught?1:0;HEAP8[this.ptr+12]=caught}get_caught(){return HEAP8[this.ptr+12]!=0}set_rethrown(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13]=rethrown}get_rethrown(){return HEAP8[this.ptr+13]!=0}init(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor)}set_adjusted_ptr(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr}get_adjusted_ptr(){return HEAPU32[this.ptr+16>>2]}}var exceptionLast=0;var uncaughtExceptionCount=0;var ___cxa_throw=(ptr,type,destructor)=>{var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw exceptionLast};function pthreadCreateProxied(pthread_ptr,attr,startRoutine,arg){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(2,0,1,pthread_ptr,attr,startRoutine,arg);return ___pthread_create_js(pthread_ptr,attr,startRoutine,arg)}var _emscripten_has_threading_support=()=>!!globalThis.SharedArrayBuffer;var ___pthread_create_js=(pthread_ptr,attr,startRoutine,arg)=>{if(!_emscripten_has_threading_support()){return 6}var transferList=[];var error=0;if(ENVIRONMENT_IS_PTHREAD&&(transferList.length===0||error)){return pthreadCreateProxied(pthread_ptr,attr,startRoutine,arg)}if(error)return error;var threadParams={startRoutine,pthread_ptr,arg,transferList};if(ENVIRONMENT_IS_PTHREAD){threadParams.cmd="spawnThread";postMessage(threadParams,transferList);return 0}return spawnThread(threadParams)};var __abort_js=()=>abort("");var __emscripten_init_main_thread_js=tb=>{__emscripten_thread_init(tb,!ENVIRONMENT_IS_WORKER,1,!ENVIRONMENT_IS_WEB,65536,false);PThread.threadInitTLS()};var handleException=e=>{if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}quit_(1,e)};var maybeExit=()=>{if(!keepRuntimeAlive()){try{if(ENVIRONMENT_IS_PTHREAD){if(_pthread_self())__emscripten_thread_exit(EXITSTATUS);return}_exit(EXITSTATUS)}catch(e){handleException(e)}}};var callUserCallback=func=>{if(ABORT){return}try{func();maybeExit()}catch(e){handleException(e)}};var __emscripten_thread_mailbox_await=pthread_ptr=>{if(Atomics.waitAsync){var wait=Atomics.waitAsync(HEAP32,pthread_ptr>>2,pthread_ptr);wait.value.then(checkMailbox);var waitingAsync=pthread_ptr+128;Atomics.store(HEAP32,waitingAsync>>2,1)}};var checkMailbox=()=>callUserCallback(()=>{var pthread_ptr=_pthread_self();if(pthread_ptr){__emscripten_thread_mailbox_await(pthread_ptr);__emscripten_check_mailbox()}});var __emscripten_notify_mailbox_postmessage=(targetThread,currThreadId)=>{if(targetThread==currThreadId){setTimeout(checkMailbox)}else if(ENVIRONMENT_IS_PTHREAD){postMessage({targetThread,cmd:"checkMailbox"})}else{var worker=PThread.pthreads[targetThread];if(!worker){return}worker.postMessage({cmd:"checkMailbox"})}};var proxiedJSCallArgs=[];var __emscripten_receive_on_main_thread_js=(funcIndex,emAsmAddr,callingThread,numCallArgs,args)=>{numCallArgs/=2;proxiedJSCallArgs.length=numCallArgs;var b=args>>3;for(var i=0;i<numCallArgs;i++){if(HEAP64[b+2*i]){proxiedJSCallArgs[i]=HEAP64[b+2*i+1]}else{proxiedJSCallArgs[i]=HEAPF64[b+2*i+1]}}var func=proxiedFunctionTable[funcIndex];PThread.currentProxiedOperationCallerThread=callingThread;var rtn=func(...proxiedJSCallArgs);PThread.currentProxiedOperationCallerThread=0;return rtn};var __emscripten_thread_cleanup=thread=>{if(!ENVIRONMENT_IS_PTHREAD)cleanupThread(thread);else postMessage({cmd:"cleanupThread",thread})};var __emscripten_thread_set_strongref=thread=>{if(ENVIRONMENT_IS_NODE){PThread.pthreads[thread].ref()}};var _emscripten_get_now=()=>performance.timeOrigin+performance.now();var _emscripten_check_blocking_allowed=()=>{};var runtimeKeepalivePush=()=>{runtimeKeepaliveCounter+=1};var _emscripten_exit_with_live_runtime=()=>{runtimeKeepalivePush();throw"unwind"};var getHeapMax=()=>HEAPU8.length;var _emscripten_get_heap_max=()=>getHeapMax();var _emscripten_num_logical_cores=()=>ENVIRONMENT_IS_NODE?require("os").cpus().length:navigator["hardwareConcurrency"];var abortOnCannotGrowMemory=requestedSize=>{abort("OOM")};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;abortOnCannotGrowMemory(requestedSize)};var printCharBuffers=[null,[],[]];var UTF8Decoder=globalThis.TextDecoder&&new TextDecoder;var findStringEnd=(heapOrArray,idx,maxBytesToRead,ignoreNul)=>{var maxIdx=idx+maxBytesToRead;if(ignoreNul)return maxIdx;while(heapOrArray[idx]&&!(idx>=maxIdx))++idx;return idx};var UTF8ArrayToString=(heapOrArray,idx=0,maxBytesToRead,ignoreNul)=>{var endPtr=findStringEnd(heapOrArray,idx,maxBytesToRead,ignoreNul);if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.buffer instanceof ArrayBuffer?heapOrArray.subarray(idx,endPtr):heapOrArray.slice(idx,endPtr))}var str="";while(idx<endPtr){var u0=heapOrArray[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heapOrArray[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heapOrArray[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u0=(u0&7)<<18|u1<<12|u2<<6|heapOrArray[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}return str};var printChar=(stream,curr)=>{var buffer=printCharBuffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer));buffer.length=0}else{buffer.push(curr)}};function _fd_write(fd,iov,iovcnt,pnum){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(3,0,1,fd,iov,iovcnt,pnum);var num=0;for(var i=0;i<iovcnt;i++){var ptr=HEAPU32[iov>>2];var len=HEAPU32[iov+4>>2];iov+=8;for(var j=0;j<len;j++){printChar(fd,HEAPU8[ptr+j])}num+=len}HEAPU32[pnum>>2]=num;return 0}PThread.init();{initMemory();if(Module["noExitRuntime"])noExitRuntime=Module["noExitRuntime"];if(Module["print"])out=Module["print"];if(Module["printErr"])err=Module["printErr"];if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].shift()()}}}Module["wasmMemory"]=wasmMemory;var proxiedFunctionTable=[_proc_exit,exitOnMainThread,pthreadCreateProxied,_fd_write];var _fromLngLat,_project,_unproject,_calculatePerspectiveRatio,_setThreadPoolSize,_projectLngLatToClipSpace,_calculateBillboardDepthKey,_calculateSurfaceDepthKey,_prepareDrawSpriteImages,_evaluateDistanceInterpolations,_evaluateDegreeInterpolations,_evaluateSpriteInterpolations,_processInterpolations,__emscripten_tls_init,_pthread_self,__emscripten_thread_init,__emscripten_thread_crashed,__emscripten_run_js_on_main_thread,__emscripten_thread_free_data,__emscripten_thread_exit,_malloc,_free,__emscripten_check_mailbox,_emscripten_stack_set_limits,__emscripten_stack_restore,__emscripten_stack_alloc,_emscripten_stack_get_current,__indirect_function_table,wasmTable;function assignWasmExports(wasmExports){_fromLngLat=Module["_fromLngLat"]=wasmExports["t"];_project=Module["_project"]=wasmExports["u"];_unproject=Module["_unproject"]=wasmExports["v"];_calculatePerspectiveRatio=Module["_calculatePerspectiveRatio"]=wasmExports["w"];_setThreadPoolSize=Module["_setThreadPoolSize"]=wasmExports["y"];_projectLngLatToClipSpace=Module["_projectLngLatToClipSpace"]=wasmExports["z"];_calculateBillboardDepthKey=Module["_calculateBillboardDepthKey"]=wasmExports["A"];_calculateSurfaceDepthKey=Module["_calculateSurfaceDepthKey"]=wasmExports["B"];_prepareDrawSpriteImages=Module["_prepareDrawSpriteImages"]=wasmExports["C"];_evaluateDistanceInterpolations=Module["_evaluateDistanceInterpolations"]=wasmExports["D"];_evaluateDegreeInterpolations=Module["_evaluateDegreeInterpolations"]=wasmExports["E"];_evaluateSpriteInterpolations=Module["_evaluateSpriteInterpolations"]=wasmExports["F"];_processInterpolations=Module["_processInterpolations"]=wasmExports["G"];__emscripten_tls_init=wasmExports["H"];_pthread_self=wasmExports["I"];__emscripten_thread_init=wasmExports["J"];__emscripten_thread_crashed=wasmExports["K"];__emscripten_run_js_on_main_thread=wasmExports["L"];__emscripten_thread_free_data=wasmExports["M"];__emscripten_thread_exit=wasmExports["N"];_malloc=Module["_malloc"]=wasmExports["O"];_free=Module["_free"]=wasmExports["P"];__emscripten_check_mailbox=wasmExports["Q"];_emscripten_stack_set_limits=wasmExports["R"];__emscripten_stack_restore=wasmExports["S"];__emscripten_stack_alloc=wasmExports["T"];_emscripten_stack_get_current=wasmExports["U"];__indirect_function_table=wasmTable=wasmExports["x"]}var wasmImports;function assignWasmImports(){wasmImports={f:___cxa_throw,g:___pthread_create_js,o:__abort_js,k:__emscripten_init_main_thread_js,q:__emscripten_notify_mailbox_postmessage,l:__emscripten_receive_on_main_thread_js,c:__emscripten_thread_cleanup,j:__emscripten_thread_mailbox_await,i:__emscripten_thread_set_strongref,d:_emscripten_check_blocking_allowed,h:_emscripten_exit_with_live_runtime,m:_emscripten_get_heap_max,b:_emscripten_get_now,n:_emscripten_num_logical_cores,p:_emscripten_resize_heap,r:_exit,e:_fd_write,a:wasmMemory}}function run(){if(runDependencies>0){dependenciesFulfilled=run;return}if(ENVIRONMENT_IS_PTHREAD){readyPromiseResolve?.(Module);initRuntime();return}preRun();if(runDependencies>0){dependenciesFulfilled=run;return}function doRun(){Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve?.(Module);Module["onRuntimeInitialized"]?.();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(()=>{setTimeout(()=>Module["setStatus"](""),1);doRun()},1)}else{doRun()}}var wasmExports;if(!ENVIRONMENT_IS_PTHREAD){wasmExports=await (createWasm());run()}if(runtimeInitialized){moduleRtn=Module}else{moduleRtn=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject})}
2
+ ;return moduleRtn}export default Module;var isPthread=globalThis.self?.name?.startsWith("em-pthread");var isNode=globalThis.process?.versions?.node&&globalThis.process?.type!="renderer";if(isNode)isPthread=(await import("worker_threads")).workerData==="em-pthread";isPthread&&Module();
Binary file
Binary file
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "git": {
3
3
  "tags": [
4
- "0.13.0"
4
+ "0.15.0"
5
5
  ],
6
6
  "branches": [
7
7
  "main"
8
8
  ],
9
- "version": "0.13.0",
9
+ "version": "0.15.0",
10
10
  "commit": {
11
- "hash": "4934aa7f4fed93594ece419184b32b5b972bbb88",
12
- "shortHash": "4934aa7",
13
- "date": "2025-11-10T23:20:51+09:00Z",
11
+ "hash": "d850b7e9c713f54f0630248dc4ea370721b6965b",
12
+ "shortHash": "d850b7e",
13
+ "date": "2025-11-15T21:29:11+09:00Z",
14
14
  "message": "Merge branch 'develop'"
15
15
  }
16
16
  },
17
- "version": "0.13.0",
17
+ "version": "0.15.0",
18
18
  "description": "MapLibre's layer extension library enabling the display, movement, and modification of large numbers of dynamic sprite images",
19
19
  "author": "Kouji Matsui (@kekyo@mi.kekyo.net)",
20
20
  "license": "MIT",
@@ -56,15 +56,13 @@
56
56
  "build": "node ./scripts/build-wasm.mjs && vite build",
57
57
  "dev": "npm run build",
58
58
  "test": "npm run build && vitest run",
59
- "test:e2e": "npm run build && playwright test",
60
59
  "pack": "npm run build && screw-up pack --pack-destination ../artifacts"
61
60
  },
62
61
  "dependencies": {
63
- "async-primitives": ">=1.4.0",
62
+ "async-primitives": ">=1.5.0",
64
63
  "maplibre-gl": ">=5.0.0"
65
64
  },
66
65
  "devDependencies": {
67
- "@playwright/test": ">=1.56.0",
68
66
  "@types/node": ">=24.9.0",
69
67
  "prettier-max": ">=1.11.0",
70
68
  "screw-up": ">=1.13.0",
@@ -1,33 +0,0 @@
1
- /*!
2
- * name: maplibre-gl-layers
3
- * version: 0.13.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: 4934aa7f4fed93594ece419184b32b5b972bbb88
9
- */
10
-
11
- import { SpriteInterpolationOptions } from './types';
12
- import { DistanceInterpolationState } from './internalTypes';
13
- export interface CreateDistanceInterpolationStateParams {
14
- currentValue: number;
15
- targetValue: number;
16
- previousCommandValue?: number;
17
- options: SpriteInterpolationOptions;
18
- }
19
- export interface CreateDistanceInterpolationStateResult {
20
- readonly state: DistanceInterpolationState;
21
- readonly requiresInterpolation: boolean;
22
- }
23
- export declare const createDistanceInterpolationState: (params: CreateDistanceInterpolationStateParams) => CreateDistanceInterpolationStateResult;
24
- export interface EvaluateDistanceInterpolationParams {
25
- state: DistanceInterpolationState;
26
- timestamp: number;
27
- }
28
- export interface EvaluateDistanceInterpolationResult {
29
- readonly value: number;
30
- readonly completed: boolean;
31
- readonly effectiveStartTimestamp: number;
32
- }
33
- export declare const evaluateDistanceInterpolation: (params: EvaluateDistanceInterpolationParams) => EvaluateDistanceInterpolationResult;