@rive-app/webgl-single 1.0.42 → 1.0.45
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 +14 -0
- package/rive.js +41 -26
- package/rive.js.map +1 -1
- package/rive_advanced.mjs.d.ts +2 -0
package/package.json
CHANGED
package/rive.d.ts
CHANGED
|
@@ -139,6 +139,10 @@ export interface EventListener {
|
|
|
139
139
|
type: EventType;
|
|
140
140
|
callback: EventCallback;
|
|
141
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* FPS Reporting through callbacks sent to the WASM runtime
|
|
144
|
+
*/
|
|
145
|
+
export declare type FPSCallback = (fps: number) => void;
|
|
142
146
|
declare class EventManager {
|
|
143
147
|
private listeners;
|
|
144
148
|
constructor(listeners?: EventListener[]);
|
|
@@ -399,6 +403,16 @@ export declare class Rive {
|
|
|
399
403
|
* renderer is already active, then this will have zero effect.
|
|
400
404
|
*/
|
|
401
405
|
startRendering(): void;
|
|
406
|
+
/**
|
|
407
|
+
* Enables frames-per-second (FPS) reporting for the runtime
|
|
408
|
+
* If no callback is provided, Rive will append a fixed-position div at the top-right corner of the page with the FPS reading
|
|
409
|
+
* @param fpsCallback - Callback from the runtime during the RAF loop that supplies the FPS value
|
|
410
|
+
*/
|
|
411
|
+
enableFPSCounter(fpsCallback?: FPSCallback): void;
|
|
412
|
+
/**
|
|
413
|
+
* Disables frames-per-second (FPS) reporting for the runtime
|
|
414
|
+
*/
|
|
415
|
+
disableFPSCounter(): void;
|
|
402
416
|
/**
|
|
403
417
|
* Returns the contents of a Rive file: the artboards, animations, and state machines
|
|
404
418
|
*/
|