@rive-app/canvas 2.21.6 → 2.22.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/canvas",
3
- "version": "2.21.6",
3
+ "version": "2.22.0",
4
4
  "description": "Rive's canvas based web api.",
5
5
  "main": "rive.js",
6
6
  "homepage": "https://rive.app",
package/rive.d.ts CHANGED
@@ -19,7 +19,8 @@ export declare enum Fit {
19
19
  FitWidth = "fitWidth",
20
20
  FitHeight = "fitHeight",
21
21
  None = "none",
22
- ScaleDown = "scaleDown"
22
+ ScaleDown = "scaleDown",
23
+ Layout = "layout"
23
24
  }
24
25
  export declare enum Alignment {
25
26
  Center = "center",
@@ -35,6 +36,7 @@ export declare enum Alignment {
35
36
  export interface LayoutParameters {
36
37
  fit?: Fit;
37
38
  alignment?: Alignment;
39
+ layoutScaleFactor?: number;
38
40
  minX?: number;
39
41
  minY?: number;
40
42
  maxX?: number;
@@ -45,6 +47,7 @@ export declare class Layout {
45
47
  private cachedRuntimeAlignment;
46
48
  readonly fit: Fit;
47
49
  readonly alignment: Alignment;
50
+ readonly layoutScaleFactor: number;
48
51
  readonly minX: number;
49
52
  readonly minY: number;
50
53
  readonly maxX: number;
@@ -54,7 +57,7 @@ export declare class Layout {
54
57
  /**
55
58
  * Makes a copy of the layout, replacing any specified parameters
56
59
  */
57
- copyWith({ fit, alignment, minX, minY, maxX, maxY, }: LayoutParameters): Layout;
60
+ copyWith({ fit, alignment, layoutScaleFactor, minX, minY, maxX, maxY, }: LayoutParameters): Layout;
58
61
  runtimeFit(rive: rc.RiveCanvas): rc.Fit;
59
62
  runtimeAlignment(rive: rc.RiveCanvas): rc.Alignment;
60
63
  }
@@ -354,6 +357,7 @@ export declare class Rive {
354
357
  private automaticallyHandleEvents;
355
358
  private enableRiveAssetCDN;
356
359
  private _volume;
360
+ private _devicePixelRatioUsed;
357
361
  private _hasZeroSize;
358
362
  durations: number[];
359
363
  frameTimes: number[];