@rive-app/webgl2-advanced 2.31.5 → 2.32.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rive-app/webgl2-advanced",
3
- "version": "2.31.5",
3
+ "version": "2.32.0",
4
4
  "description": "Rive's webgl2 low-level canvas based web api.",
5
5
  "main": "webgl2_advanced.mjs",
6
6
  "homepage": "https://rive.app",
package/rive.wasm CHANGED
Binary file
@@ -376,6 +376,29 @@ export declare class File {
376
376
  enums(): DataEnum[];
377
377
 
378
378
  unref(): void;
379
+
380
+ /**
381
+ * Returns a reference to a bindable artboard from this file by name
382
+ * @returns BindableArtboard
383
+ */
384
+ bindableArtboardByName(name: string): BindableArtboard;
385
+
386
+ /**
387
+ * Returns a reference to the default bindable artboard
388
+ * @returns BindableArtboard
389
+ */
390
+ bindableArtboardDefault(): BindableArtboard;
391
+
392
+ /**
393
+ * Returns a reference to a bindable artboard. FOR INTERNAL USE ONLY
394
+ * @param artboard - Name of the Artboard to create an instance for
395
+ * @returns BindableArtboard
396
+ */
397
+ internalBindableArtboardFromArtboard(artboard: Artboard): BindableArtboard;
398
+ /**
399
+ * Returns a new Artboard instance for the Artboard at the given index in the Rive file
400
+ * @param index - Index of the Artboard in the file to create an Artboard instance for
401
+ */
379
402
  }
380
403
 
381
404
  /**
@@ -555,6 +578,10 @@ export declare class Artboard {
555
578
  bindViewModelInstance(instance: ViewModelInstance): void;
556
579
  }
557
580
 
581
+ export declare class BindableArtboard {
582
+ unref(): void;
583
+ }
584
+
558
585
  export declare class Bone extends TransformComponent {
559
586
  /**
560
587
  * Length of the bone
@@ -816,7 +843,7 @@ export declare class StateMachineInstance {
816
843
  * @param x - X coordinate
817
844
  * @param y - Y coordinate
818
845
  */
819
- pointerDown(x: number, y: number): void;
846
+ pointerDown(x: number, y: number, id: number): void;
820
847
  /**
821
848
  * Notifies the state machine that the pointer has moved to the given coordinate in
822
849
  * Artboard space. Internally, Rive may advance a state machine if the listener coordinate is of
@@ -825,7 +852,7 @@ export declare class StateMachineInstance {
825
852
  * @param x - X coordinate
826
853
  * @param y - Y coordinate
827
854
  */
828
- pointerMove(x: number, y: number): void;
855
+ pointerMove(x: number, y: number, id: number): void;
829
856
  /**
830
857
  * Notifies the state machine that the pointer has released at the given coordinate in
831
858
  * Artboard space. Internally, Rive may advance a state machine if the listener coordinate is of
@@ -833,7 +860,14 @@ export declare class StateMachineInstance {
833
860
  * @param x - X coordinate
834
861
  * @param y - Y coordinate
835
862
  */
836
- pointerUp(x: number, y: number): void;
863
+ pointerUp(x: number, y: number, id: number): void;
864
+ /**
865
+ * Notifies the state machine that the pointer has exited the detectable area of the canvas surface
866
+ *
867
+ * @param x - X coordinate
868
+ * @param y - Y coordinate
869
+ */
870
+ pointerExit(x: number, y: number, id: number): void;
837
871
 
838
872
  /**
839
873
  * Deletes the underlying instance created via the WASM. It's important to clean up this instance
@@ -935,7 +969,7 @@ export declare class ViewModelInstanceAssetImage extends ViewModelInstanceValue
935
969
  value(image: ImageInternal | null): void;
936
970
  }
937
971
  export declare class ViewModelInstanceArtboard extends ViewModelInstanceValue {
938
- value(artboard: Artboard): void;
972
+ value(artboard: BindableArtboard | Artboard): void;
939
973
  }
940
974
 
941
975
  export declare class ViewModelInstance {
@@ -954,6 +988,7 @@ export declare class ViewModelInstance {
954
988
  incrementReferenceCount(): void;
955
989
  decrementReferenceCount(): void;
956
990
  delete(): void;
991
+ unref(): void;
957
992
  getProperties(): ViewModelProperty[];
958
993
  }
959
994