@lottiefiles/dotlottie-web
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -1,2 +0,2 @@ | ||
export { b as DotLottie } from './chunk-NPMXPAFK.js'; | ||
export { b as DotLottie } from './chunk-IPGUQKUM.js'; | ||
import './chunk-VRCJABVO.js'; | ||
@@ -3,0 +3,0 @@ import './chunk-6PRCY2FC.js'; |
@@ -19,9 +19,31 @@ export { DotLottie, Options } from './dotlottie.js'; | ||
} | ||
interface Module { | ||
Renderer: new () => Renderer; | ||
} | ||
/** | ||
* WasmLoader is a utility class for loading WebAssembly modules. | ||
* It provides methods to load modules with a primary URL and a backup URL. | ||
*/ | ||
declare class WasmLoader { | ||
private static _Renderer; | ||
private static _ModulePromise; | ||
private static _wasmURL; | ||
private constructor(); | ||
private static _tryLoad; | ||
/** | ||
* Tries to load the WASM module from the primary URL, falling back to a backup URL if necessary. | ||
* Throws an error if both URLs fail to load the module. | ||
* @returns Promise<Module> - A promise that resolves to the loaded module. | ||
*/ | ||
private static _loadWithBackup; | ||
static getInstance(): Promise<Renderer>; | ||
/** | ||
* Public method to load the WebAssembly module. | ||
* Utilizes a primary and backup URL for robustness. | ||
* @returns Promise<Module> - A promise that resolves to the loaded module. | ||
*/ | ||
static load(): Promise<Module>; | ||
/** | ||
* Sets a new URL for the WASM file and invalidates the current module promise. | ||
* | ||
* @param string - The new URL for the WASM file. | ||
*/ | ||
static setWasmUrl(url: string): void; | ||
@@ -28,0 +50,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export { b as DotLottie, a as WasmLoader } from './chunk-NPMXPAFK.js'; | ||
export { b as DotLottie, a as WasmLoader } from './chunk-IPGUQKUM.js'; | ||
export { a as EventManager } from './chunk-VRCJABVO.js'; | ||
@@ -3,0 +3,0 @@ export { a as getAnimationJSONFromDotLottie, b as loadAnimationJSONFromURL } from './chunk-6PRCY2FC.js'; |
{ | ||
"name": "@lottiefiles/dotlottie-web", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "Lottie and DotLottie player for the web", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
988847
573