@rive-app/webgl-single 1.0.85 → 1.0.87
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 +11 -2
- package/rive.js +29 -11
- package/rive.js.map +1 -1
- package/rive_advanced.mjs.d.ts +14 -5
package/rive_advanced.mjs.d.ts
CHANGED
|
@@ -91,6 +91,12 @@ export interface RiveCanvas {
|
|
|
91
91
|
* Debugging tool to remove the FPS counter that displays from enableFPSCounter
|
|
92
92
|
*/
|
|
93
93
|
disableFPSCounter(): void;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Cleans up any WASM-generate objects that need to be destroyed manually.
|
|
97
|
+
* This should be called when you wish to remove a rive animation from view.
|
|
98
|
+
*/
|
|
99
|
+
cleanup(): void;
|
|
94
100
|
}
|
|
95
101
|
|
|
96
102
|
//////////////
|
|
@@ -126,6 +132,7 @@ export declare class RendererWrapper {
|
|
|
126
132
|
* https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/clearRect
|
|
127
133
|
*/
|
|
128
134
|
clear(): void;
|
|
135
|
+
delete(): void;
|
|
129
136
|
flush(): void;
|
|
130
137
|
translate(x: number, y: number): void;
|
|
131
138
|
rotate(angle: number): void;
|
|
@@ -231,6 +238,8 @@ export declare class File {
|
|
|
231
238
|
* @returns Number of artboards in the Rive file
|
|
232
239
|
*/
|
|
233
240
|
artboardCount(): number;
|
|
241
|
+
|
|
242
|
+
delete(): void;
|
|
234
243
|
}
|
|
235
244
|
|
|
236
245
|
/**
|
|
@@ -308,7 +317,7 @@ export declare class Artboard {
|
|
|
308
317
|
/**
|
|
309
318
|
* Returns a reference for a Bone object of a given name.
|
|
310
319
|
* Learn more: https://help.rive.app/editor/manipulating-shapes/bones
|
|
311
|
-
*
|
|
320
|
+
*
|
|
312
321
|
* @param name - Name of the Bone to grab a reference to
|
|
313
322
|
*/
|
|
314
323
|
bone(name: string): Bone;
|
|
@@ -415,7 +424,7 @@ export declare class LinearAnimationInstance {
|
|
|
415
424
|
/**
|
|
416
425
|
* Apply a mixing value on the animation instance. This is useful if you are looking to blend
|
|
417
426
|
* multiple animations together and want to dictate a strength for each of the animations played
|
|
418
|
-
* back. This also applies new values to properties of objects on the Artboard according to the
|
|
427
|
+
* back. This also applies new values to properties of objects on the Artboard according to the
|
|
419
428
|
* keys of the animation.
|
|
420
429
|
* This must be called after the `advance()` method of `LinearAnimationInstance`
|
|
421
430
|
*
|
|
@@ -482,7 +491,7 @@ export declare class StateMachineInstance {
|
|
|
482
491
|
* Notifies the state machine that the pointer has pressed down at the given coordinate in
|
|
483
492
|
* Artboard space. Internally, Rive may advance a state machine if the listener coordinate is of
|
|
484
493
|
* interest at a given moment.
|
|
485
|
-
*
|
|
494
|
+
*
|
|
486
495
|
* @param x - X coordinate
|
|
487
496
|
* @param y - Y coordinate
|
|
488
497
|
*/
|
|
@@ -491,7 +500,7 @@ export declare class StateMachineInstance {
|
|
|
491
500
|
* Notifies the state machine that the pointer has moved to the given coordinate in
|
|
492
501
|
* Artboard space. Internally, Rive may advance a state machine if the listener coordinate is of
|
|
493
502
|
* interest at a given moment.
|
|
494
|
-
*
|
|
503
|
+
*
|
|
495
504
|
* @param x - X coordinate
|
|
496
505
|
* @param y - Y coordinate
|
|
497
506
|
*/
|
|
@@ -647,7 +656,7 @@ export declare class Mat2D {
|
|
|
647
656
|
/**
|
|
648
657
|
* Returns whether or not a matrix could be inverted, and if yes, sets the resulting Mat2D into
|
|
649
658
|
* the passed-in `mat` parameter
|
|
650
|
-
*
|
|
659
|
+
*
|
|
651
660
|
* @param mat - Reference Mat2D to store the newly inverted matrix into if successful
|
|
652
661
|
* @returns True if the matrix could be inverted
|
|
653
662
|
*/
|