@rive-app/canvas-single 2.37.7 → 2.37.8
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 +16 -0
- package/rive.js +195 -35
- package/rive.js.map +1 -1
- package/rive_advanced.mjs.d.ts +17 -0
- package/utils/index.d.ts +2 -0
- package/utils/registerKeyboardInteractions.d.ts +22 -0
package/package.json
CHANGED
package/rive.d.ts
CHANGED
|
@@ -215,6 +215,10 @@ export interface RiveParameters {
|
|
|
215
215
|
layout?: Layout;
|
|
216
216
|
autoplay?: boolean;
|
|
217
217
|
useOffscreenRenderer?: boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Optional tab index to set for the canvas element if there are any Focus nodes within the graphic
|
|
220
|
+
*/
|
|
221
|
+
tabIndex?: number;
|
|
218
222
|
/**
|
|
219
223
|
* Allow the runtime to automatically load assets hosted in Rive's CDN.
|
|
220
224
|
* enabled by default.
|
|
@@ -316,6 +320,7 @@ export interface RiveLoadParameters {
|
|
|
316
320
|
stateMachines?: string | string[];
|
|
317
321
|
useOffscreenRenderer?: boolean;
|
|
318
322
|
shouldDisableRiveListeners?: boolean;
|
|
323
|
+
tabIndex?: number;
|
|
319
324
|
}
|
|
320
325
|
export interface RiveResetParameters {
|
|
321
326
|
artboard?: string;
|
|
@@ -415,6 +420,7 @@ export declare class Rive {
|
|
|
415
420
|
private runtime;
|
|
416
421
|
private artboard;
|
|
417
422
|
private eventCleanup;
|
|
423
|
+
private keyboardEventCleanup;
|
|
418
424
|
private file;
|
|
419
425
|
private riveFile;
|
|
420
426
|
private eventManager;
|
|
@@ -438,8 +444,11 @@ export declare class Rive {
|
|
|
438
444
|
private _currentCanvasHeight;
|
|
439
445
|
private _audioEventListener;
|
|
440
446
|
private _boundDraw;
|
|
447
|
+
private _pageVisibilityHandler;
|
|
448
|
+
private _explicitlyStoppedRendering;
|
|
441
449
|
private _viewModelInstance;
|
|
442
450
|
private _dataEnums;
|
|
451
|
+
private _tabIndex;
|
|
443
452
|
private drawOptimization;
|
|
444
453
|
private enablePerfMarks;
|
|
445
454
|
durations: number[];
|
|
@@ -723,6 +732,13 @@ export declare class Rive {
|
|
|
723
732
|
*/
|
|
724
733
|
startRendering(): void;
|
|
725
734
|
private scheduleRendering;
|
|
735
|
+
/**
|
|
736
|
+
* Called when document.visibilitychange fires (tab change, window minimize, etc.).
|
|
737
|
+
* Cancels the rAF loop on hide and resets the time reference so that no accumulated time is
|
|
738
|
+
* applied to state machines when the tab becomes visible again. This prevents state machine
|
|
739
|
+
* advances with large time deltas when rAF starts up again.
|
|
740
|
+
*/
|
|
741
|
+
private _onPageVisibilityChange;
|
|
726
742
|
/**
|
|
727
743
|
* Enables frames-per-second (FPS) reporting for the runtime
|
|
728
744
|
* If no callback is provided, Rive will append a fixed-position div at the top-right corner of
|