@rive-app/canvas-single 2.53.0 → 2.54.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 +2 -2
- package/rive.js +66 -24
- package/rive.js.map +1 -1
- package/runtimeLoader.d.ts +14 -0
package/runtimeLoader.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import * as rc from "./rive_advanced.mjs";
|
|
2
2
|
export type RuntimeCallback = (rive: rc.RiveCanvas) => void;
|
|
3
|
+
/**
|
|
4
|
+
* @experimental Why {@link RuntimeLoader.threadsRefusal} says no threads.
|
|
5
|
+
* `notIsolated`: the browser could isolate this context but didn't (headers,
|
|
6
|
+
* framing or policy). `isolationUnsupported`: the browser can't isolate any.
|
|
7
|
+
*/
|
|
8
|
+
export type ThreadsRefusal = "noThreadedBuild" | "threadsOff" | "wasmBinary" | "notIsolated" | "isolationUnsupported" | "noSharedMemory" | "noWasmThreads" | "loadFailed";
|
|
3
9
|
/**
|
|
4
10
|
* @experimental Options for {@link RuntimeLoader.setScriptFetch}. Requests
|
|
5
11
|
* sent from this page, or through the reference proxy page, never carry
|
|
@@ -42,6 +48,7 @@ export declare class RuntimeLoader {
|
|
|
42
48
|
private static wasmBinary;
|
|
43
49
|
private static wasmThreadsURL;
|
|
44
50
|
private static triedThreads;
|
|
51
|
+
private static threadsOutcome;
|
|
45
52
|
private static parallelParts;
|
|
46
53
|
private static replayWorker;
|
|
47
54
|
private static replayCapsArrived;
|
|
@@ -62,6 +69,7 @@ export declare class RuntimeLoader {
|
|
|
62
69
|
private static applySystemLanguages;
|
|
63
70
|
private static loaded;
|
|
64
71
|
private static loadRuntime;
|
|
72
|
+
private static decideThreads;
|
|
65
73
|
private static loadUnthreaded;
|
|
66
74
|
static getInstance(callback: RuntimeCallback, onError?: (error: Error) => void): void;
|
|
67
75
|
static awaitInstance(): Promise<rc.RiveCanvas>;
|
|
@@ -91,6 +99,12 @@ export declare class RuntimeLoader {
|
|
|
91
99
|
*/
|
|
92
100
|
static setWasmThreadsUrl(url: string | null): void;
|
|
93
101
|
static getWasmThreadsUrl(): string | null;
|
|
102
|
+
/**
|
|
103
|
+
* @experimental Why this page doesn't run the threaded build, or null when
|
|
104
|
+
* it does. Before load, what the loader would do with the current settings;
|
|
105
|
+
* after, what it did. Never loads or logs.
|
|
106
|
+
*/
|
|
107
|
+
static threadsRefusal(): ThreadsRefusal | null;
|
|
94
108
|
/**
|
|
95
109
|
* Sets how many parts a script's parallel call gets on a page that runs
|
|
96
110
|
* the threaded build, the page's thread and one worker thread for each
|