@rive-app/canvas-advanced 2.24.1 → 2.25.1

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.
@@ -725,7 +725,7 @@ function Ya(a, b) {
725
725
  return Xa(c, a, b);
726
726
  }));
727
727
  }
728
- var Za, $a, db = {445196:(a, b, c, d, e) => {
728
+ var Za, $a, db = {445436:(a, b, c, d, e) => {
729
729
  if ("undefined" === typeof window || void 0 === (window.AudioContext || window.webkitAudioContext)) {
730
730
  return 0;
731
731
  }
@@ -788,9 +788,9 @@ var Za, $a, db = {445196:(a, b, c, d, e) => {
788
788
  }
789
789
  window.h.Aa += 1;
790
790
  return 1;
791
- }, 447374:() => {
791
+ }, 447614:() => {
792
792
  "undefined" !== typeof window.h && (--window.h.Aa, 0 === window.h.Aa && delete window.h);
793
- }, 447538:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 447642:() => {
793
+ }, 447778:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 447882:() => {
794
794
  try {
795
795
  var a = new (window.AudioContext || window.webkitAudioContext)(), b = a.sampleRate;
796
796
  a.close();
@@ -798,7 +798,7 @@ var Za, $a, db = {445196:(a, b, c, d, e) => {
798
798
  } catch (c) {
799
799
  return 0;
800
800
  }
801
- }, 447813:(a, b, c, d, e, f) => {
801
+ }, 448053:(a, b, c, d, e, f) => {
802
802
  if ("undefined" === typeof window.h) {
803
803
  return -1;
804
804
  }
@@ -844,7 +844,7 @@ var Za, $a, db = {445196:(a, b, c, d, e) => {
844
844
  a == window.h.I.ya && g.Z.connect(g.J.destination);
845
845
  g.pb = f;
846
846
  return window.h.yc(g);
847
- }, 450690:a => window.h.ra(a).J.sampleRate, 450763:a => {
847
+ }, 450930:a => window.h.ra(a).J.sampleRate, 451003:a => {
848
848
  a = window.h.ra(a);
849
849
  void 0 !== a.Z && (a.Z.onaudioprocess = function() {
850
850
  }, a.Z.disconnect(), a.Z = void 0);
@@ -852,13 +852,13 @@ var Za, $a, db = {445196:(a, b, c, d, e) => {
852
852
  a.J.close();
853
853
  a.J = void 0;
854
854
  a.pb = void 0;
855
- }, 451163:a => {
855
+ }, 451403:a => {
856
856
  window.h.Cb(a);
857
- }, 451213:a => {
857
+ }, 451453:a => {
858
858
  a = window.h.ra(a);
859
859
  a.J.resume();
860
860
  a.state = window.h.ga.xb;
861
- }, 451352:a => {
861
+ }, 451592:a => {
862
862
  a = window.h.ra(a);
863
863
  a.J.suspend();
864
864
  a.state = window.h.ga.stopped;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rive-app/canvas-advanced",
3
- "version": "2.24.1",
3
+ "version": "2.25.1",
4
4
  "description": "Rive's lightweight low-level canvas based web api.",
5
5
  "main": "canvas_advanced.mjs",
6
6
  "homepage": "https://rive.app",
package/rive.wasm CHANGED
Binary file
@@ -730,6 +730,12 @@ export declare class StateMachineInstance {
730
730
  * @param sec - Scrub the state machine instance by a number of seconds
731
731
  */
732
732
  advance(sec: number): boolean;
733
+ /**
734
+ * Advances/scrubs the StateMachineInstance by the set amount of seconds. Note that this will
735
+ * apply changes to the properties of objects in the Artboard.
736
+ * @param sec - Scrub the state machine instance by a number of seconds
737
+ */
738
+ advanceAndApply(sec: number): boolean;
733
739
  /**
734
740
  * Returns the number of states changed while the state machine played
735
741
  * @returns Number of states changed in the duration of the state machine played
Binary file