@rive-app/webgl-single 2.14.4 → 2.15.1
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 +18 -3
- package/rive.js +150 -56
- package/rive.js.map +1 -1
- package/rive_advanced.mjs.d.ts +27 -4
package/package.json
CHANGED
package/rive.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as rc from "./rive_advanced.mjs";
|
|
2
|
-
export type { FileAsset, FontAsset, ImageAsset } from "./rive_advanced.mjs";
|
|
2
|
+
export type { FileAsset, AudioAsset, FontAsset, ImageAsset, } from "./rive_advanced.mjs";
|
|
3
3
|
/**
|
|
4
4
|
* Generic type for a parameterless void callback
|
|
5
5
|
*/
|
|
@@ -285,6 +285,7 @@ export declare class Rive {
|
|
|
285
285
|
private _layout;
|
|
286
286
|
private renderer;
|
|
287
287
|
private loaded;
|
|
288
|
+
private _observed;
|
|
288
289
|
/**
|
|
289
290
|
* Tracks if a Rive file is loaded; we need this in addition to loaded as some
|
|
290
291
|
* commands (e.g. contents) can be called as soon as the file is loaded.
|
|
@@ -306,6 +307,7 @@ export declare class Rive {
|
|
|
306
307
|
private automaticallyHandleEvents;
|
|
307
308
|
private enableRiveAssetCDN;
|
|
308
309
|
private _volume;
|
|
310
|
+
private _hasZeroSize;
|
|
309
311
|
durations: number[];
|
|
310
312
|
frameTimes: number[];
|
|
311
313
|
frameCount: number;
|
|
@@ -313,6 +315,7 @@ export declare class Rive {
|
|
|
313
315
|
constructor(params: RiveParameters);
|
|
314
316
|
static new(params: RiveParameters): Rive;
|
|
315
317
|
private onSystemAudioChanged;
|
|
318
|
+
private onCanvasResize;
|
|
316
319
|
private init;
|
|
317
320
|
/**
|
|
318
321
|
* Setup Rive Listeners on the canvas
|
|
@@ -325,6 +328,11 @@ export declare class Rive {
|
|
|
325
328
|
* Remove Rive Listeners setup on the canvas
|
|
326
329
|
*/
|
|
327
330
|
removeRiveListeners(): void;
|
|
331
|
+
/**
|
|
332
|
+
* If the instance has audio and the system audio is not ready
|
|
333
|
+
* we hook the instance to the audio manager
|
|
334
|
+
*/
|
|
335
|
+
private initializeAudio;
|
|
328
336
|
private initData;
|
|
329
337
|
private initArtboard;
|
|
330
338
|
drawFrame(): void;
|
|
@@ -567,17 +575,24 @@ export declare const Testing: {
|
|
|
567
575
|
EventManager: typeof EventManager;
|
|
568
576
|
TaskQueueManager: typeof TaskQueueManager;
|
|
569
577
|
};
|
|
578
|
+
/**
|
|
579
|
+
* Decodes bytes into an audio asset.
|
|
580
|
+
*
|
|
581
|
+
* Be sure to call `.unref()` on the audio once it is no longer needed. This
|
|
582
|
+
* allows the engine to clean it up when it is not used by any more animations.
|
|
583
|
+
*/
|
|
584
|
+
export declare const decodeAudio: (bytes: Uint8Array) => Promise<rc.Audio>;
|
|
570
585
|
/**
|
|
571
586
|
* Decodes bytes into an image.
|
|
572
587
|
*
|
|
573
|
-
* Be sure to call `.
|
|
588
|
+
* Be sure to call `.unref()` on the image once it is no longer needed. This
|
|
574
589
|
* allows the engine to clean it up when it is not used by any more animations.
|
|
575
590
|
*/
|
|
576
591
|
export declare const decodeImage: (bytes: Uint8Array) => Promise<rc.Image>;
|
|
577
592
|
/**
|
|
578
593
|
* Decodes bytes into a font.
|
|
579
594
|
*
|
|
580
|
-
* Be sure to call `.
|
|
595
|
+
* Be sure to call `.unref()` on the font once it is no longer needed. This
|
|
581
596
|
* allows the engine to clean it up when it is not used by any more animations.
|
|
582
597
|
*/
|
|
583
598
|
export declare const decodeFont: (bytes: Uint8Array) => Promise<rc.Font>;
|