@rive-app/webgl2-advanced 2.49.3 → 2.50.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/README.md ADDED
@@ -0,0 +1,21 @@
1
+ ![npm](https://img.shields.io/npm/v/@rive-app/webgl2-advanced)
2
+ # Rive
3
+ Low-level Rive API using WebGL2 and the Rive Renderer. Please see https://github.com/rive-app/rive-wasm for a list of all the available web runtimes and their details.
4
+
5
+ [Rive](https://rive.app) is an agent-native 2D and 3D engine for games, apps, and interactive UI. Use it as your whole engine, or add it to the products you already have. Build with your coding agent through the [Rive CLI](https://rive.app/agents), or draw, rig, and animate by hand with the professional design and animation tools in the [Rive Editor](https://rive.app/editor). Both work on the same files. Open-source runtimes, no royalties or runtime fees. Rive files (`.riv`) play natively on web, mobile, desktop, game engines, consoles, smart TVs, and cars.
6
+
7
+ ```
8
+ npm install @rive-app/webgl2-advanced
9
+ ```
10
+
11
+ [Getting Started](https://github.com/rive-app/rive-wasm#getting-started)
12
+
13
+ ## Build with your agent
14
+
15
+ Paste this into Claude Code, Codex, Cursor, or any agent that runs commands on your computer:
16
+
17
+ ```text
18
+ Install the Rive CLI from rive.app/cli. Build an interactive hero for my website as a Rive file and add it to the page with the Rive web runtime.
19
+ ```
20
+
21
+ Your agent installs the [Rive CLI](https://rive.app/agents), writes the scene, and opens a preview window that rebuilds every time it saves. Keep giving it notes, or open the same file in the [Rive Editor](https://editor.rive.app/) and shape it by hand. Trying it needs no account. Writing the `.riv` that ships on your site needs a free Rive account. Free exports play a short Rive splash screen; [paid plans](https://rive.app/pricing) export without it. See [Getting started with the Rive CLI](https://rive.app/docs/cli/getting-started).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rive-app/webgl2-advanced",
3
- "version": "2.49.3",
4
- "description": "Rive's webgl2 low-level canvas based web api.",
3
+ "version": "2.50.0",
4
+ "description": "Rive web runtime, low-level API, WebGL2 renderer. Rive is an agent-native 2D and 3D engine for games, apps, and interactive UI.",
5
5
  "main": "webgl2_advanced.mjs",
6
6
  "homepage": "https://rive.app",
7
7
  "repository": {
@@ -10,7 +10,11 @@
10
10
  },
11
11
  "keywords": [
12
12
  "rive",
13
- "animation"
13
+ "animation",
14
+ "interactive",
15
+ "ui",
16
+ "game-engine",
17
+ "graphics"
14
18
  ],
15
19
  "author": "Rive",
16
20
  "contributors": [
package/rive.wasm CHANGED
Binary file
@@ -22,6 +22,16 @@ interface RiveOptions {
22
22
  declare function Rive(options?: RiveOptions): Promise<RiveCanvas>;
23
23
  export default Rive;
24
24
 
25
+ /** Resolved script fetch options; see RuntimeLoader.setScriptFetch. */
26
+ export interface ScriptFetchConfig {
27
+ proxyUrl: string | null;
28
+ allowedHosts: string[] | null;
29
+ /** 0 is no limit. */
30
+ maxRequestsPerMinute: number;
31
+ /** 0 keeps the runtime's default. */
32
+ maxResponseBytes: number;
33
+ }
34
+
25
35
  /**
26
36
  * RiveCanvas is the main export object that contains references to different Rive classes to help
27
37
  * build the Rive render loop for low-level API usage. In addition, this contains multiple methods
@@ -93,6 +103,13 @@ export interface RiveCanvas {
93
103
  */
94
104
  awaitReplayCaps?(): Promise<void> | undefined;
95
105
 
106
+ /**
107
+ * @experimental Enables scripts' fetch() for every file, or disables it
108
+ * with null. Only in builds with script networking (the threaded webgl2
109
+ * build), so always feature-detect it. Use RuntimeLoader.setScriptFetch.
110
+ */
111
+ configureScriptFetch?(options: ScriptFetchConfig | null): void;
112
+
96
113
  /**
97
114
  * Loads a Rive file for the runtime and returns a Rive-specific File class
98
115
  *
@@ -1009,6 +1026,8 @@ export interface FocusState {
1009
1026
  hasFocus: boolean;
1010
1027
  /** True if the focused element accepts keyboard input (e.g. a TextInput node). */
1011
1028
  expectsKeyboardInput: boolean;
1029
+ /** True if the focused element or an ancestor takes typed text: show a virtual keyboard. */
1030
+ expectsTextInput: boolean;
1012
1031
  }
1013
1032
 
1014
1033
  export declare class LinearAnimation {
Binary file