@rive-app/webgl2 2.50.0 → 2.51.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 +24 -0
- package/rive.js +471 -300
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +18 -7
- package/rive_fallback.wasm +0 -0
- package/runtimeLoader.d.ts +4 -6
- package/utils/riveFont.d.ts +10 -1
- package/utils/wheelMomentum.d.ts +15 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rive-app/webgl2",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.51.0",
|
|
4
4
|
"description": "Rive web runtime with the WebGL2 renderer. Rive is an agent-native 2D and 3D engine for games, apps, and interactive UI.",
|
|
5
5
|
"main": "rive.js",
|
|
6
6
|
"homepage": "https://rive.app",
|
package/rive.d.ts
CHANGED
|
@@ -370,6 +370,13 @@ export interface RiveParameters {
|
|
|
370
370
|
* enabled by default.
|
|
371
371
|
*/
|
|
372
372
|
enableRiveAssetCDN?: boolean;
|
|
373
|
+
/**
|
|
374
|
+
* Decode parts of the file the first time they're used instead of at import.
|
|
375
|
+
* Only applies when this instance loads its own file (`src`/`buffer`), where it
|
|
376
|
+
* is forwarded to that file as {@link RiveFileParameters.deferDecoding}. With a
|
|
377
|
+
* supplied `riveFile` the file's own flag wins. False by default.
|
|
378
|
+
*/
|
|
379
|
+
deferDecoding?: boolean;
|
|
373
380
|
/**
|
|
374
381
|
* @experimental This API is early and may encounter breaking behavior change without a major version bump
|
|
375
382
|
*
|
|
@@ -580,6 +587,21 @@ export interface RiveFileParameters {
|
|
|
580
587
|
buffer?: ArrayBuffer;
|
|
581
588
|
assetLoader?: AssetLoadCallback;
|
|
582
589
|
enableRiveAssetCDN?: boolean;
|
|
590
|
+
/**
|
|
591
|
+
* Decode parts of the file the first time they're used instead of at import,
|
|
592
|
+
* keeping a copy of their bytes until then. Speeds up loading files with many
|
|
593
|
+
* artboards, animations or view model instances when only some of them are used:
|
|
594
|
+
*
|
|
595
|
+
* - Animations decode the first time they're played.
|
|
596
|
+
* - Artboards decode the first time they're instanced. The default artboard
|
|
597
|
+
* (the first) still decodes at import.
|
|
598
|
+
* - View model instances decode the first time they're handed out. Their names
|
|
599
|
+
* and counts are read without decoding.
|
|
600
|
+
*
|
|
601
|
+
* Listing a file's {@link Rive.contents} decodes every artboard. Fixed at import.
|
|
602
|
+
* False by default.
|
|
603
|
+
*/
|
|
604
|
+
deferDecoding?: boolean;
|
|
583
605
|
onLoad?: EventCallback;
|
|
584
606
|
onLoadError?: EventCallback;
|
|
585
607
|
/**
|
|
@@ -610,6 +632,7 @@ export declare class RiveFile implements rc.FinalizableTarget {
|
|
|
610
632
|
private file;
|
|
611
633
|
private assetLoader;
|
|
612
634
|
private enableRiveAssetCDN;
|
|
635
|
+
private deferDecoding;
|
|
613
636
|
private enablePerfMarks;
|
|
614
637
|
private eventManager;
|
|
615
638
|
private referenceCount;
|
|
@@ -760,6 +783,7 @@ export declare class Rive {
|
|
|
760
783
|
private dispatchPointerExit;
|
|
761
784
|
private enableMultiTouch;
|
|
762
785
|
private enableRiveAssetCDN;
|
|
786
|
+
private deferDecoding;
|
|
763
787
|
private semanticsMode;
|
|
764
788
|
private semanticsOptions;
|
|
765
789
|
/** True when this instance may drain semantics and render the overlay. */
|