@rive-app/webgl 1.0.34 → 1.0.37

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/rive.wasm CHANGED
Binary file
@@ -22,6 +22,8 @@ interface RiveOptions {
22
22
 
23
23
  load(buffer: Uint8Array): File;
24
24
  makeRenderer(canvas: HTMLCanvasElement | OffscreenCanvas, useOffscreenRenderer: boolean) : CanvasRenderer;
25
+ requestAnimationFrame(cb: (timestamp: DOMHighResTimeStamp) => void): number;
26
+ cancelAnimationFrame(requestID: number): void;
25
27
  }
26
28
 
27
29
  //////////////
@@ -157,14 +159,13 @@ interface RiveOptions {
157
159
  /** Time of the animation in seconds */
158
160
  time: number;
159
161
  didLoop: boolean;
160
- constructor(animation: LinearAnimation);
162
+ constructor(animation: LinearAnimation, artboard: Artboard);
161
163
  advance(sec: number): any;
162
164
  /**
163
165
  * Apply animation on the artboard
164
- * @param artboard the Artboard on which apply the frame.
165
166
  * @param mix 0-1 the strength of the animation in the animations mix.
166
167
  */
167
- apply(artboard: Artboard, mix: number): any;
168
+ apply(mix: number): any;
168
169
  // Deletes the backing Wasm animation instance
169
170
  delete(): void;
170
171
  }
@@ -174,10 +175,10 @@ interface RiveOptions {
174
175
  }
175
176
 
176
177
  export declare class StateMachineInstance {
177
- constructor(stateMachine: StateMachine);
178
+ constructor(stateMachine: StateMachine, artboard: Artboard);
178
179
  inputCount(): number;
179
180
  input(i: number): SMIInput;
180
- advance(artboard: Artboard, sec: number): any;
181
+ advance(sec: number): any;
181
182
  stateChangedCount(): number;
182
183
  stateChangedNameByIndex(i: number): string;
183
184
  // Deletes the backing Wasm state machine instance
@@ -301,4 +302,4 @@ interface RiveOptions {
301
302
  tx: number;
302
303
  ty: number;
303
304
  }
304
-
305
+