@rive-app/webgl-single 2.36.0 → 2.37.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rive-app/webgl-single",
3
- "version": "2.36.0",
3
+ "version": "2.37.0",
4
4
  "description": "Rive's webgl based web api with bundled wasm.",
5
5
  "main": "rive.js",
6
6
  "homepage": "https://rive.app",
package/rive.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  import * as rc from "./rive_advanced.mjs";
2
+ import { RuntimeLoader, type RuntimeCallback } from "./runtimeLoader";
3
+ import { ImageWrapper, AudioWrapper, FontWrapper, RiveFont as RiveFontClassUtil } from "./utils";
2
4
  export type AssetLoadCallback = (asset: rc.FileAsset, bytes: Uint8Array) => Boolean;
5
+ export { RiveFontClassUtil as RiveFont };
3
6
  export type { FileAsset, AudioAsset, FontAsset, ImageAsset, } from "./rive_advanced.mjs";
4
7
  /**
5
8
  * Generic type for a parameterless void callback
@@ -65,25 +68,7 @@ export declare class Layout {
65
68
  runtimeFit(rive: rc.RiveCanvas): rc.Fit;
66
69
  runtimeAlignment(rive: rc.RiveCanvas): rc.Alignment;
67
70
  }
68
- export type RuntimeCallback = (rive: rc.RiveCanvas) => void;
69
- export declare class RuntimeLoader {
70
- private static runtime;
71
- private static isLoading;
72
- private static callBackQueue;
73
- private static rive;
74
- private static wasmURL;
75
- private constructor();
76
- /**
77
- * When true, performance.mark / performance.measure entries are emitted for
78
- * WASM initialization.
79
- */
80
- static enablePerfMarks: boolean;
81
- private static loadRuntime;
82
- static getInstance(callback: RuntimeCallback): void;
83
- static awaitInstance(): Promise<rc.RiveCanvas>;
84
- static setWasmUrl(url: string): void;
85
- static getWasmUrl(): string;
86
- }
71
+ export { RuntimeLoader, type RuntimeCallback };
87
72
  export declare enum StateMachineInputType {
88
73
  Number = 56,
89
74
  Trigger = 58,
@@ -1062,18 +1047,18 @@ export declare const Testing: {
1062
1047
  * Be sure to call `.unref()` on the audio once it is no longer needed. This
1063
1048
  * allows the engine to clean it up when it is not used by any more animations.
1064
1049
  */
1065
- export declare const decodeAudio: (bytes: Uint8Array) => Promise<rc.Audio>;
1050
+ export declare const decodeAudio: (bytes: Uint8Array) => Promise<AudioWrapper>;
1066
1051
  /**
1067
1052
  * Decodes bytes into an image.
1068
1053
  *
1069
1054
  * Be sure to call `.unref()` on the image once it is no longer needed. This
1070
1055
  * allows the engine to clean it up when it is not used by any more animations.
1071
1056
  */
1072
- export declare const decodeImage: (bytes: Uint8Array) => Promise<rc.Image>;
1057
+ export declare const decodeImage: (bytes: Uint8Array) => Promise<ImageWrapper>;
1073
1058
  /**
1074
1059
  * Decodes bytes into a font.
1075
1060
  *
1076
1061
  * Be sure to call `.unref()` on the font once it is no longer needed. This
1077
1062
  * allows the engine to clean it up when it is not used by any more animations.
1078
1063
  */
1079
- export declare const decodeFont: (bytes: Uint8Array) => Promise<rc.Font>;
1064
+ export declare const decodeFont: (bytes: Uint8Array) => Promise<FontWrapper>;