@rive-app/webgl-single 2.14.3 → 2.15.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.d.ts +10 -3
- package/rive.js +65 -46
- package/rive.js.map +1 -1
- package/rive_advanced.mjs.d.ts +26 -4
package/rive_advanced.mjs.d.ts
CHANGED
|
@@ -29,7 +29,8 @@ export interface RiveCanvas {
|
|
|
29
29
|
RenderPaintStyle: typeof RenderPaintStyle;
|
|
30
30
|
StrokeCap: typeof StrokeCap;
|
|
31
31
|
StrokeJoin: typeof StrokeJoin;
|
|
32
|
-
|
|
32
|
+
decodeAudio: DecodeAudio;
|
|
33
|
+
decodeImage: DecodeImage;
|
|
33
34
|
decodeFont: DecodeFont;
|
|
34
35
|
|
|
35
36
|
/**
|
|
@@ -92,7 +93,7 @@ export interface RiveCanvas {
|
|
|
92
93
|
cancelAnimationFrame(requestID: number): void;
|
|
93
94
|
/**
|
|
94
95
|
* A Rive-specific function to "flush" queued up draw calls from using the renderer.
|
|
95
|
-
*
|
|
96
|
+
*
|
|
96
97
|
* This should only be invoked once at the end of a loop in a regular JS
|
|
97
98
|
* requestAnimationFrame loop, and should not be used with the Rive-wrapped
|
|
98
99
|
* requestAnimationFrame (aka, the requestAnimationFrame() API on this object) as that
|
|
@@ -269,6 +270,15 @@ export interface CanvasRenderFactory {
|
|
|
269
270
|
makeRenderPath(): CanvasRenderPath;
|
|
270
271
|
}
|
|
271
272
|
|
|
273
|
+
export class Audio {
|
|
274
|
+
unref(): void;
|
|
275
|
+
}
|
|
276
|
+
export interface AudioCallback {
|
|
277
|
+
(audio: Audio): void;
|
|
278
|
+
}
|
|
279
|
+
export interface DecodeAudio {
|
|
280
|
+
(bytes: Uint8Array, callback: AudioCallback): void;
|
|
281
|
+
}
|
|
272
282
|
export class Image {
|
|
273
283
|
unref(): void;
|
|
274
284
|
}
|
|
@@ -896,13 +906,25 @@ export declare class Vec2D {
|
|
|
896
906
|
export declare class FileAsset {
|
|
897
907
|
name: string;
|
|
898
908
|
fileExtension: string;
|
|
909
|
+
uniqueFilename: string;
|
|
910
|
+
isAudio: boolean;
|
|
899
911
|
isImage: boolean;
|
|
900
912
|
isFont: boolean;
|
|
901
913
|
cdnUuid: string;
|
|
914
|
+
|
|
915
|
+
decode(bytes: Uint8Array): void;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* Rive class extending the FileAsset that exposes a `setAudioSource()` API with a
|
|
920
|
+
* decoded Audio (via the `decodeAudio()` API) to set a new Audio on the Rive FileAsset
|
|
921
|
+
*/
|
|
922
|
+
export declare class AudioAsset extends FileAsset {
|
|
923
|
+
setAudioSource(audio: Audio): void;
|
|
902
924
|
}
|
|
903
925
|
|
|
904
926
|
/**
|
|
905
|
-
* Rive class extending the FileAsset that exposes a `setRenderImage()` API with a
|
|
927
|
+
* Rive class extending the FileAsset that exposes a `setRenderImage()` API with a
|
|
906
928
|
* decoded Image (via the `decodeImage()` API) to set a new Image on the Rive FileAsset
|
|
907
929
|
*/
|
|
908
930
|
export declare class ImageAsset extends FileAsset {
|
|
@@ -910,7 +932,7 @@ export declare class ImageAsset extends FileAsset {
|
|
|
910
932
|
}
|
|
911
933
|
|
|
912
934
|
/**
|
|
913
|
-
* Rive class extending the FileAsset that exposes a `setFont()` API with a
|
|
935
|
+
* Rive class extending the FileAsset that exposes a `setFont()` API with a
|
|
914
936
|
* decoded Font (via the `decodeFont()` API) to set a new Font on the Rive FileAsset
|
|
915
937
|
*/
|
|
916
938
|
export declare class FontAsset extends FileAsset {
|