@rive-app/canvas-advanced
Advanced tools
Comparing version 2.21.7 to 2.22.0
{ | ||
"name": "@rive-app/canvas-advanced", | ||
"version": "2.21.7", | ||
"version": "2.22.0", | ||
"description": "Rive's lightweight low-level canvas based web api.", | ||
@@ -5,0 +5,0 @@ "main": "canvas_advanced.mjs", |
@@ -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 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2525509
4255