@lottiefiles/dotlottie-web
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -93,8 +93,2 @@ import { EventType, EventListener } from './event-manager.js'; | ||
/** | ||
* Initializes the renderer. | ||
* | ||
* @returns A promise that resolves when the renderer is initialized. | ||
*/ | ||
private _initRenderer; | ||
/** | ||
* Loads and initializes the animation from a given URL. | ||
@@ -171,4 +165,9 @@ * | ||
removeEventListener<T extends EventType>(type: T, listener?: EventListener<T>): void; | ||
/** | ||
* Sets the source URL of the WASM file to load. | ||
* @param url - The URL of the WASM file to load. | ||
*/ | ||
static setWasmUrl(url: string): void; | ||
} | ||
export { DotLottie, Options }; |
@@ -1,2 +0,2 @@ | ||
export { a as DotLottie } from './chunk-D6WZHSLE.js'; | ||
export { b as DotLottie } from './chunk-B33PKDLW.js'; | ||
import './chunk-VRCJABVO.js'; | ||
@@ -3,0 +3,0 @@ import './chunk-6PRCY2FC.js'; |
export { DotLottie, Options } from './dotlottie.js'; | ||
export { BaseEvent, CompleteEvent, Event, EventListener, EventManager, EventType, FrameEvent, LoadErrorEvent, LoadEvent, LoopEvent, PauseEvent, PlayEvent, StopEvent } from './event-manager.js'; | ||
export { getAnimationJSONFromDotLottie, loadAnimationJSONFromURL } from './utils.js'; | ||
/** | ||
* Copyright 2023 Design Barn Inc. | ||
*/ | ||
interface Renderer { | ||
duration(): number; | ||
error(): string; | ||
frame(no: number): boolean; | ||
load(data: string, width: number, height: number): boolean; | ||
render(): Uint8Array; | ||
resize(width: number, height: number): void; | ||
size(): Float32Array; | ||
totalFrames(): number; | ||
update(): boolean; | ||
} | ||
declare class WasmLoader { | ||
private static _renderer; | ||
private static _isLoading; | ||
private static _wasmURL; | ||
private constructor(); | ||
static loadRenderer(): void; | ||
static getInstance(callback: (renderer: Renderer) => void): void; | ||
static awaitInstance(): Promise<Renderer>; | ||
static setWasmUrl(url: string): void; | ||
} | ||
export { Renderer, WasmLoader }; |
@@ -1,2 +0,2 @@ | ||
export { a as DotLottie } from './chunk-D6WZHSLE.js'; | ||
export { b as DotLottie, a as WasmLoader } from './chunk-B33PKDLW.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.2.0", | ||
"version": "0.3.0", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "Lottie and DotLottie player for the web", |
@@ -27,2 +27,3 @@ # @lottiefiles/dotlottie-web | ||
* [Methods](#methods) | ||
* [Static Methods](#static-methods) | ||
* [Events](#events) | ||
@@ -146,2 +147,8 @@ * [Development](#development) | ||
### Static Methods | ||
| Method | Description | | ||
| ------------------------- | ----------------------------------------- | | ||
| `setWasmUrl(url: string)` | Sets the URL to the renderer.wasm binary. | | ||
### Events | ||
@@ -148,0 +155,0 @@ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
987568
552
202
6
11
65