@rive-app/canvas-lite
Advanced tools
Comparing version 2.22.0 to 2.23.0
{ | ||
"name": "@rive-app/canvas-lite", | ||
"version": "2.22.0", | ||
"version": "2.23.0", | ||
"description": "A lite version of Rive's canvas based web api.", | ||
@@ -5,0 +5,0 @@ "main": "rive.js", |
@@ -360,2 +360,4 @@ import * as rc from "./rive_advanced.mjs"; | ||
private _volume; | ||
private _artboardWidth; | ||
private _artboardHeight; | ||
private _devicePixelRatioUsed; | ||
@@ -388,2 +390,3 @@ private _hasZeroSize; | ||
private initializeAudio; | ||
private initArtboardSize; | ||
private initData; | ||
@@ -484,3 +487,8 @@ private initArtboard; | ||
* and resize the layout to match the new drawing surface afterwards. | ||
* Useful function for consumers to include in a window resize listener | ||
* Useful function for consumers to include in a window resize listener. | ||
* | ||
* This method will set the {@link devicePixelRatioUsed} property. | ||
* | ||
* Optionally, you can provide a {@link customDevicePixelRatio} to provide a | ||
* custom value. | ||
*/ | ||
@@ -653,6 +661,42 @@ resizeDrawingSurfaceToCanvas(customDevicePixelRatio?: number): void; | ||
/** | ||
* getter and setter for the volume of the artboard | ||
* Getter / Setter for the volume of the artboard | ||
*/ | ||
get volume(): number; | ||
set volume(value: number); | ||
/** | ||
* The width of the artboard. | ||
* | ||
* This will return undefined if the artboard is not loaded yet and a custom | ||
* width has not been set. | ||
* | ||
* Do not set this value manually when using {@link resizeDrawingSurfaceToCanvas} | ||
* with a {@link Layout.fit} of {@link Fit.Layout}, as the artboard width is | ||
* automatically set. | ||
*/ | ||
get artboardWidth(): number | undefined; | ||
set artboardWidth(value: number); | ||
/** | ||
* The height of the artboard. | ||
* | ||
* This will return undefined if the artboard is not loaded yet and a custom | ||
* height has not been set. | ||
* | ||
* Do not set this value manually when using {@link resizeDrawingSurfaceToCanvas} | ||
* with a {@link Layout.fit} of {@link Fit.Layout}, as the artboard height is | ||
* automatically set. | ||
*/ | ||
get artboardHeight(): number | undefined; | ||
set artboardHeight(value: number); | ||
/** | ||
* Reset the artboard size to its original values. | ||
*/ | ||
resetArtboardSize(): void; | ||
/** | ||
* The device pixel ratio used in rendering and canvas/artboard resizing. | ||
* | ||
* This value will be overidden by the device pixel ratio used in | ||
* {@link resizeDrawingSurfaceToCanvas}. If you use that method, do not set this value. | ||
*/ | ||
get devicePixelRatioUsed(): number; | ||
set devicePixelRatioUsed(value: number); | ||
} | ||
@@ -659,0 +703,0 @@ /** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
1476362
6988