@rive-app/webgl-advanced 2.21.7 → 2.23.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 +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +26 -1
- package/rive_fallback.wasm +0 -0
- package/webgl_advanced.mjs +1316 -1308
package/package.json
CHANGED
package/rive.wasm
CHANGED
|
Binary file
|
package/rive_advanced.mjs.d.ts
CHANGED
|
@@ -69,6 +69,7 @@ export interface RiveCanvas {
|
|
|
69
69
|
* @param frame - AABB object representing the bounds of the canvas frame
|
|
70
70
|
* @param content - AABB object representing the bounds of what to draw the Rive onto
|
|
71
71
|
* (i.e an artboard's size)
|
|
72
|
+
* @param scaleFactor - Scale factor of the artboard when using `Fit.layout`
|
|
72
73
|
* @returns Mat2D - A Mat2D view matrix
|
|
73
74
|
*/
|
|
74
75
|
computeAlignment(
|
|
@@ -76,7 +77,9 @@ export interface RiveCanvas {
|
|
|
76
77
|
alignment: Alignment,
|
|
77
78
|
frame: AABB,
|
|
78
79
|
content: AABB,
|
|
80
|
+
scaleFactor?: number,
|
|
79
81
|
): Mat2D;
|
|
82
|
+
|
|
80
83
|
mapXY(matrix: Mat2D, canvasPoints: Vec2D): Vec2D;
|
|
81
84
|
/**
|
|
82
85
|
* A Rive-specific requestAnimationFrame function; this must be used instead of the global
|
|
@@ -205,8 +208,15 @@ export declare class Renderer extends RendererWrapper {
|
|
|
205
208
|
* @param alignment - Alignment enum value
|
|
206
209
|
* @param frame - Bounds of the canvas space
|
|
207
210
|
* @param content - Bounds of the Rive content
|
|
211
|
+
* @param _scaleFactor - Scale factor of the artboard when using `Fit.layout`
|
|
208
212
|
*/
|
|
209
|
-
align(
|
|
213
|
+
align(
|
|
214
|
+
fit: Fit,
|
|
215
|
+
alignment: Alignment,
|
|
216
|
+
frame: AABB,
|
|
217
|
+
content: AABB,
|
|
218
|
+
scaleFactor?: number,
|
|
219
|
+
): void;
|
|
210
220
|
}
|
|
211
221
|
|
|
212
222
|
export declare class CommandPath {}
|
|
@@ -462,6 +472,20 @@ export declare class Artboard {
|
|
|
462
472
|
* @param path - Path of where the text exists at an artboard level
|
|
463
473
|
*/
|
|
464
474
|
textByPath(name: string, path: string): TextValueRun;
|
|
475
|
+
/**
|
|
476
|
+
* Getter and setter for the artboard width
|
|
477
|
+
*/
|
|
478
|
+
get width(): number;
|
|
479
|
+
set width(val: number);
|
|
480
|
+
/**
|
|
481
|
+
* Getter and setter for the artboard height
|
|
482
|
+
*/
|
|
483
|
+
get height(): number;
|
|
484
|
+
set height(val: number);
|
|
485
|
+
/**
|
|
486
|
+
* Reset the artboard size to the original value
|
|
487
|
+
*/
|
|
488
|
+
resetArtboardSize(): void;
|
|
465
489
|
}
|
|
466
490
|
|
|
467
491
|
export declare class Bone extends TransformComponent {
|
|
@@ -791,6 +815,7 @@ export enum Fit {
|
|
|
791
815
|
fitHeight,
|
|
792
816
|
none,
|
|
793
817
|
scaleDown,
|
|
818
|
+
layout,
|
|
794
819
|
}
|
|
795
820
|
|
|
796
821
|
export enum RenderPaintStyle {
|
package/rive_fallback.wasm
CHANGED
|
Binary file
|