@rive-app/webgl2-threads 2.49.1 → 2.49.2
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 +1 -0
- package/rive.js +343 -199
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +5 -0
- package/rive_fallback.wasm +0 -0
- package/rive_threads.wasm +0 -0
- package/utils/index.d.ts +1 -0
- package/utils/replayPacer.d.ts +24 -0
package/rive.wasm
CHANGED
|
Binary file
|
package/rive_advanced.mjs.d.ts
CHANGED
|
@@ -319,6 +319,11 @@ export declare class RendererWrapper {
|
|
|
319
319
|
* is as many frames behind as it queues. Skip the frame rather than record it.
|
|
320
320
|
*/
|
|
321
321
|
acceptsFrame?(): boolean;
|
|
322
|
+
/**
|
|
323
|
+
* @experimental How long the replay worker's recent frames took to finish,
|
|
324
|
+
* in milliseconds, or 0 before its first.
|
|
325
|
+
*/
|
|
326
|
+
replayMs?(): number;
|
|
322
327
|
/**
|
|
323
328
|
* @experimental True once the replay worker's context was lost and restored.
|
|
324
329
|
* What it held is gone, so the renderer and the file's session must be
|
package/rive_fallback.wasm
CHANGED
|
Binary file
|
package/rive_threads.wasm
CHANGED
|
Binary file
|
package/utils/index.d.ts
CHANGED
|
@@ -5,3 +5,4 @@ export { GamepadInteractions } from "./gamepadInteractions";
|
|
|
5
5
|
export { BLANK_URL, sanitizeUrl } from "./sanitizeUrl";
|
|
6
6
|
export { Finalizable, ImageWrapper, AudioWrapper, FontWrapper, FileAssetWrapper, ImageAssetWrapper, AudioAssetWrapper, FontAssetWrapper, finalizationRegistry, CustomFileAssetLoaderWrapper, AssetLoadCallbackWrapper, FileFinalizer, createFinalization, } from "./finalizationRegistry";
|
|
7
7
|
export { RiveFont } from "./riveFont";
|
|
8
|
+
export { ReplayPacer } from "./replayPacer";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Paces recording to a replay worker slower than the display. Recording as
|
|
3
|
+
* soon as its queue frees sends frames in bursts, so instead they go out every
|
|
4
|
+
* N refreshes, with N following the worker's recent replay time.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ReplayPacer {
|
|
7
|
+
private lastTime;
|
|
8
|
+
private lastRecord;
|
|
9
|
+
private intervals;
|
|
10
|
+
private divisor;
|
|
11
|
+
private settle;
|
|
12
|
+
private nextProbe;
|
|
13
|
+
private probing;
|
|
14
|
+
private probeAfter;
|
|
15
|
+
private backedUp;
|
|
16
|
+
private recentBackups;
|
|
17
|
+
/**
|
|
18
|
+
* Called on every animation frame. Returns whether this one should record,
|
|
19
|
+
* given the worker's replay time and whether its queue has room.
|
|
20
|
+
*/
|
|
21
|
+
shouldRecord(time: number, replayMs: number, accepts: boolean): boolean;
|
|
22
|
+
private adapt;
|
|
23
|
+
private setDivisor;
|
|
24
|
+
}
|