@rive-app/canvas-lite 2.37.1 → 2.37.3

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/rive.wasm CHANGED
Binary file
@@ -1,5 +1,6 @@
1
1
  interface RiveOptions {
2
2
  locateFile(file: string): string;
3
+ wasmBinary?: ArrayBuffer;
3
4
  }
4
5
 
5
6
  declare function Rive(options?: RiveOptions): Promise<RiveCanvas>;
Binary file
@@ -6,6 +6,8 @@ export declare class RuntimeLoader {
6
6
  private static callBackQueue;
7
7
  private static rive;
8
8
  private static wasmURL;
9
+ private static wasmFallbackURL;
10
+ private static wasmBinary;
9
11
  private constructor();
10
12
  /**
11
13
  * When true, performance.mark / performance.measure entries are emitted for
@@ -17,4 +19,14 @@ export declare class RuntimeLoader {
17
19
  static awaitInstance(): Promise<rc.RiveCanvas>;
18
20
  static setWasmUrl(url: string): void;
19
21
  static getWasmUrl(): string;
22
+ /**
23
+ * Sets the URL used as a fallback when the primary WASM URL fails to load.
24
+ * Pass `null` to disable the fallback entirely.
25
+ *
26
+ * Defaults to pulling from the jsdelivr CDN.
27
+ */
28
+ static setWasmFallbackUrl(url: string | null): void;
29
+ static getWasmFallbackUrl(): string | null;
30
+ static setWasmBinary(value: ArrayBuffer | null): void;
31
+ static getWasmBinary(): ArrayBuffer | null;
20
32
  }