@rive-app/webgl-single 1.2.1 → 1.2.3
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 +18 -1
- package/rive.js +40 -5
- package/rive.js.map +1 -1
package/package.json
CHANGED
package/rive.d.ts
CHANGED
|
@@ -106,11 +106,12 @@ export declare enum EventType {
|
|
|
106
106
|
Stop = "stop",
|
|
107
107
|
Loop = "loop",
|
|
108
108
|
Draw = "draw",
|
|
109
|
+
Advance = "advance",
|
|
109
110
|
StateChange = "statechange"
|
|
110
111
|
}
|
|
111
112
|
export interface Event {
|
|
112
113
|
type: EventType;
|
|
113
|
-
data?: string | string[] | LoopEvent;
|
|
114
|
+
data?: string | string[] | LoopEvent | number;
|
|
114
115
|
}
|
|
115
116
|
/**
|
|
116
117
|
* Looping types: one-shot, loop, and ping-pong
|
|
@@ -195,6 +196,7 @@ export interface RiveParameters {
|
|
|
195
196
|
onStop?: EventCallback;
|
|
196
197
|
onLoop?: EventCallback;
|
|
197
198
|
onStateChange?: EventCallback;
|
|
199
|
+
onAdvance?: EventCallback;
|
|
198
200
|
/**
|
|
199
201
|
* @deprecated Use `onLoad()` instead
|
|
200
202
|
*/
|
|
@@ -392,12 +394,27 @@ export declare class Rive {
|
|
|
392
394
|
on(type: EventType, callback: EventCallback): void;
|
|
393
395
|
/**
|
|
394
396
|
* Unsubscribes from a Rive-generated event
|
|
397
|
+
* @param type the type of event to unsubscribe from
|
|
398
|
+
* @param callback the callback to unsubscribe
|
|
399
|
+
*/
|
|
400
|
+
off(type: EventType, callback: EventCallback): void;
|
|
401
|
+
/**
|
|
402
|
+
* Unsubscribes from a Rive-generated event
|
|
403
|
+
* @deprecated
|
|
395
404
|
* @param callback the callback to unsubscribe from
|
|
396
405
|
*/
|
|
397
406
|
unsubscribe(type: EventType, callback: EventCallback): void;
|
|
407
|
+
/**
|
|
408
|
+
* Unsubscribes all Rive listeners from an event type, or everything if no type is
|
|
409
|
+
* given
|
|
410
|
+
* @param type the type of event to unsubscribe from, or all types if
|
|
411
|
+
* undefined
|
|
412
|
+
*/
|
|
413
|
+
removeAllRiveEventListeners(type?: EventType): void;
|
|
398
414
|
/**
|
|
399
415
|
* Unsubscribes all listeners from an event type, or everything if no type is
|
|
400
416
|
* given
|
|
417
|
+
* @deprecated
|
|
401
418
|
* @param type the type of event to unsubscribe from, or all types if
|
|
402
419
|
* undefined
|
|
403
420
|
*/
|