@rive-app/canvas-single 2.32.2 → 2.33.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rive-app/canvas-single",
3
- "version": "2.32.2",
3
+ "version": "2.33.1",
4
4
  "description": "Rive's high-level canvas based web api all in one js file.",
5
5
  "main": "rive.js",
6
6
  "homepage": "https://rive.app",
package/rive.d.ts CHANGED
@@ -33,6 +33,10 @@ export declare enum Alignment {
33
33
  BottomCenter = "bottomCenter",
34
34
  BottomRight = "bottomRight"
35
35
  }
36
+ export declare enum DrawOptimizationOptions {
37
+ AlwaysDraw = "alwaysDraw",
38
+ DrawOnChanged = "drawOnChanged"
39
+ }
36
40
  export interface LayoutParameters {
37
41
  fit?: Fit;
38
42
  alignment?: Alignment;
@@ -260,6 +264,10 @@ export interface RiveParameters {
260
264
  * Enables multi touch support
261
265
  */
262
266
  enableMultiTouch?: boolean;
267
+ /**
268
+ * Enum with drawing options for optimizations
269
+ */
270
+ drawingOptions?: DrawOptimizationOptions;
263
271
  onLoad?: EventCallback;
264
272
  onLoadError?: EventCallback;
265
273
  onPlay?: EventCallback;
@@ -421,6 +429,7 @@ export declare class Rive {
421
429
  private _boundDraw;
422
430
  private _viewModelInstance;
423
431
  private _dataEnums;
432
+ private drawOptimization;
424
433
  durations: number[];
425
434
  frameTimes: number[];
426
435
  frameCount: number;
@@ -700,6 +709,7 @@ export declare class Rive {
700
709
  * renderer is already active, then this will have zero effect.
701
710
  */
702
711
  startRendering(): void;
712
+ private scheduleRendering;
703
713
  /**
704
714
  * Enables frames-per-second (FPS) reporting for the runtime
705
715
  * If no callback is provided, Rive will append a fixed-position div at the top-right corner of