@rive-app/canvas-single
Advanced tools
Comparing version 2.21.7 to 2.22.0
{ | ||
"name": "@rive-app/canvas-single", | ||
"version": "2.21.7", | ||
"version": "2.22.0", | ||
"description": "Rive's high-level canvas based web api all in one js file.", | ||
@@ -5,0 +5,0 @@ "main": "rive.js", |
@@ -72,2 +72,3 @@ interface RiveOptions { | ||
* (i.e an artboard's size) | ||
* @param scaleFactor - Scale factor of the artboard when using `Fit.layout` | ||
* @returns Mat2D - A Mat2D view matrix | ||
@@ -80,3 +81,5 @@ */ | ||
content: AABB, | ||
scaleFactor?: number, | ||
): Mat2D; | ||
mapXY(matrix: Mat2D, canvasPoints: Vec2D): Vec2D; | ||
@@ -210,4 +213,11 @@ /** | ||
* @param content - Bounds of the Rive content | ||
* @param _scaleFactor - Scale factor of the artboard when using `Fit.layout` | ||
*/ | ||
align(fit: Fit, alignment: Alignment, frame: AABB, content: AABB): void; | ||
align( | ||
fit: Fit, | ||
alignment: Alignment, | ||
frame: AABB, | ||
content: AABB, | ||
scaleFactor?: number, | ||
): void; | ||
} | ||
@@ -468,2 +478,16 @@ | ||
textByPath(name: string, path: string): TextValueRun; | ||
/** | ||
* Getter and setter for the artboard width | ||
*/ | ||
get width(): number; | ||
set width(val: number); | ||
/** | ||
* Getter and setter for the artboard height | ||
*/ | ||
get height(): number; | ||
set height(val: number); | ||
/** | ||
* Reset the artboard size to the original value | ||
*/ | ||
resetArtboardSize(): void; | ||
} | ||
@@ -798,2 +822,3 @@ | ||
scaleDown, | ||
layout, | ||
} | ||
@@ -800,0 +825,0 @@ |
@@ -22,3 +22,4 @@ import * as rc from "./rive_advanced.mjs"; | ||
None = "none", | ||
ScaleDown = "scaleDown" | ||
ScaleDown = "scaleDown", | ||
Layout = "layout" | ||
} | ||
@@ -39,2 +40,3 @@ export declare enum Alignment { | ||
alignment?: Alignment; | ||
layoutScaleFactor?: number; | ||
minX?: number; | ||
@@ -50,2 +52,3 @@ minY?: number; | ||
readonly alignment: Alignment; | ||
readonly layoutScaleFactor: number; | ||
readonly minX: number; | ||
@@ -60,3 +63,3 @@ readonly minY: number; | ||
*/ | ||
copyWith({ fit, alignment, minX, minY, maxX, maxY, }: LayoutParameters): Layout; | ||
copyWith({ fit, alignment, layoutScaleFactor, minX, minY, maxX, maxY, }: LayoutParameters): Layout; | ||
runtimeFit(rive: rc.RiveCanvas): rc.Fit; | ||
@@ -361,2 +364,3 @@ runtimeAlignment(rive: rc.RiveCanvas): rc.Alignment; | ||
private _volume; | ||
private _devicePixelRatioUsed; | ||
private _hasZeroSize; | ||
@@ -363,0 +367,0 @@ durations: number[]; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3764310
14178