@rive-app/webgl2-threads 2.49.0 → 2.49.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/rive.wasm CHANGED
Binary file
@@ -85,6 +85,14 @@ export interface RiveCanvas {
85
85
  */
86
86
  enableReplayWorker?(): boolean;
87
87
 
88
+ /**
89
+ * @internal Settles once the replay worker's device caps reach the page, so
90
+ * scripts read truthful features before any canvas reaches the worker.
91
+ *
92
+ * @returns undefined when nothing replays on the worker
93
+ */
94
+ awaitReplayCaps?(): Promise<void> | undefined;
95
+
88
96
  /**
89
97
  * Loads a Rive file for the runtime and returns a Rive-specific File class
90
98
  *
Binary file
package/rive_threads.wasm CHANGED
Binary file
@@ -12,6 +12,8 @@ export declare class RuntimeLoader {
12
12
  private static triedThreads;
13
13
  private static parallelParts;
14
14
  private static replayWorker;
15
+ private static replayCapsArrived;
16
+ private static readonly replayCapsTimeoutMs;
15
17
  private static errorCallbackQueue;
16
18
  private constructor();
17
19
  /**
@@ -25,6 +27,12 @@ export declare class RuntimeLoader {
25
27
  private static loadUnthreaded;
26
28
  static getInstance(callback: RuntimeCallback, onError?: (error: Error) => void): void;
27
29
  static awaitInstance(): Promise<rc.RiveCanvas>;
30
+ /**
31
+ * @internal Resolves once the replay worker's device caps reach the page,
32
+ * so scripts init against them. Null when there is nothing left to wait
33
+ * for, which keeps every later instance's load synchronous.
34
+ */
35
+ static awaitReplayCaps(): Promise<void> | null;
28
36
  static setWasmUrl(url: string): void;
29
37
  static getWasmUrl(): string;
30
38
  /**