@rive-app/canvas-advanced-single 2.51.0 → 2.53.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/canvas_advanced_single.mjs +1 -1
- package/package.json +1 -1
- package/rive_advanced.mjs.d.ts +23 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rive-app/canvas-advanced-single",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.53.0",
|
|
4
4
|
"description": "Rive web runtime, low-level API, canvas renderer, bundled as a single JS file. Rive is an agent-native 2D and 3D engine for games, apps, and interactive UI.",
|
|
5
5
|
"main": "canvas_advanced_single.mjs",
|
|
6
6
|
"homepage": "https://rive.app",
|
package/rive_advanced.mjs.d.ts
CHANGED
|
@@ -187,6 +187,11 @@ export interface RiveCanvas {
|
|
|
187
187
|
* @param requestID - ID of the requestAnimationFrame request to cancel
|
|
188
188
|
*/
|
|
189
189
|
cancelAnimationFrame(requestID: number): void;
|
|
190
|
+
/**
|
|
191
|
+
* Called by the runtime whenever an asset's contents change after load (an
|
|
192
|
+
* image finished decoding, or an image, font or audio source was swapped).
|
|
193
|
+
*/
|
|
194
|
+
onAssetChange?: () => void;
|
|
190
195
|
/**
|
|
191
196
|
* A Rive-specific function to "flush" queued up draw calls from using the renderer.
|
|
192
197
|
* It also ends the frame for scripts, which collect their memory then.
|
|
@@ -1136,8 +1141,11 @@ export declare class StateMachineInstance {
|
|
|
1136
1141
|
*
|
|
1137
1142
|
* @param x - X coordinate
|
|
1138
1143
|
* @param y - Y coordinate
|
|
1144
|
+
* @param id - Pointer id
|
|
1145
|
+
* @param button - Pointer button, as numbered by PointerButton: 0 primary
|
|
1146
|
+
* (default), 1 secondary, 2 middle
|
|
1139
1147
|
*/
|
|
1140
|
-
pointerDown(x: number, y: number, id: number): void;
|
|
1148
|
+
pointerDown(x: number, y: number, id: number, button?: number): void;
|
|
1141
1149
|
/**
|
|
1142
1150
|
* Notifies the state machine that the pointer has moved to the given coordinate in
|
|
1143
1151
|
* Artboard space. Internally, Rive may advance a state machine if the listener coordinate is of
|
|
@@ -1153,8 +1161,11 @@ export declare class StateMachineInstance {
|
|
|
1153
1161
|
* interest at a given moment.
|
|
1154
1162
|
* @param x - X coordinate
|
|
1155
1163
|
* @param y - Y coordinate
|
|
1164
|
+
* @param id - Pointer id
|
|
1165
|
+
* @param button - Pointer button, as numbered by PointerButton: 0 primary
|
|
1166
|
+
* (default), 1 secondary, 2 middle
|
|
1156
1167
|
*/
|
|
1157
|
-
pointerUp(x: number, y: number, id: number): void;
|
|
1168
|
+
pointerUp(x: number, y: number, id: number, button?: number): void;
|
|
1158
1169
|
/**
|
|
1159
1170
|
* Notifies the state machine that the pointer has exited the detectable area of the canvas surface
|
|
1160
1171
|
*
|
|
@@ -1217,6 +1228,16 @@ export declare class StateMachineInstance {
|
|
|
1217
1228
|
* @param y - Y coordinate
|
|
1218
1229
|
*/
|
|
1219
1230
|
hasScrollTargetAt(x: number, y: number): boolean;
|
|
1231
|
+
/**
|
|
1232
|
+
* Returns true if a listener under the given Artboard coordinate responds to presses of
|
|
1233
|
+
* button, looking through nested artboards.
|
|
1234
|
+
*
|
|
1235
|
+
* @param x - X coordinate
|
|
1236
|
+
* @param y - Y coordinate
|
|
1237
|
+
* @param button - Pointer button, as numbered by PointerButton: 0 primary, 1 secondary,
|
|
1238
|
+
* 2 middle
|
|
1239
|
+
*/
|
|
1240
|
+
listensToButtonAt(x: number, y: number, button: number): boolean;
|
|
1220
1241
|
/**
|
|
1221
1242
|
* Returns true while a scroll gesture is latched to a scroll view in this state machine or a
|
|
1222
1243
|
* nested one.
|