@rive-app/webgl-single 2.4.4 → 2.5.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 +1 -1
- package/rive.d.ts +11 -0
- package/rive.js +231 -128
- package/rive.js.map +1 -1
- package/rive_advanced.mjs.d.ts +48 -21
package/package.json
CHANGED
package/rive.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import * as rc from "./rive_advanced.mjs";
|
|
|
3
3
|
* Generic type for a parameterless void callback
|
|
4
4
|
*/
|
|
5
5
|
export type VoidCallback = () => void;
|
|
6
|
+
export type AssetLoadCallback = (asset: rc.FileAsset, bytes: Uint8Array) => Boolean;
|
|
6
7
|
/**
|
|
7
8
|
* Type for artboard bounds
|
|
8
9
|
*/
|
|
@@ -189,6 +190,11 @@ export interface RiveParameters {
|
|
|
189
190
|
layout?: Layout;
|
|
190
191
|
autoplay?: boolean;
|
|
191
192
|
useOffscreenRenderer?: boolean;
|
|
193
|
+
/**
|
|
194
|
+
* Allow the runtime to automatically load assets hosted in Rive's CDN.
|
|
195
|
+
* enabled by default.
|
|
196
|
+
*/
|
|
197
|
+
enableRiveAssetCDN?: boolean;
|
|
192
198
|
/**
|
|
193
199
|
* Turn off Rive Listeners. This means state machines that have Listeners
|
|
194
200
|
* will not be invoked, and also, no event listeners pertaining to Listeners
|
|
@@ -215,6 +221,7 @@ export interface RiveParameters {
|
|
|
215
221
|
onLoop?: EventCallback;
|
|
216
222
|
onStateChange?: EventCallback;
|
|
217
223
|
onAdvance?: EventCallback;
|
|
224
|
+
assetLoader?: AssetLoadCallback;
|
|
218
225
|
/**
|
|
219
226
|
* @deprecated Use `onLoad()` instead
|
|
220
227
|
*/
|
|
@@ -282,9 +289,11 @@ export declare class Rive {
|
|
|
282
289
|
private eventManager;
|
|
283
290
|
private taskQueue;
|
|
284
291
|
private animator;
|
|
292
|
+
private assetLoader;
|
|
285
293
|
private static readonly missingErrorMessage;
|
|
286
294
|
private shouldDisableRiveListeners;
|
|
287
295
|
private automaticallyHandleEvents;
|
|
296
|
+
private enableRiveAssetCDN;
|
|
288
297
|
durations: number[];
|
|
289
298
|
frameTimes: number[];
|
|
290
299
|
frameCount: number;
|
|
@@ -524,4 +533,6 @@ export declare const Testing: {
|
|
|
524
533
|
EventManager: typeof EventManager;
|
|
525
534
|
TaskQueueManager: typeof TaskQueueManager;
|
|
526
535
|
};
|
|
536
|
+
export declare const decodeImage: (bytes: Uint8Array) => Promise<any>;
|
|
537
|
+
export declare const decodeFont: (bytes: Uint8Array) => Promise<any>;
|
|
527
538
|
export {};
|