@rive-app/canvas
Advanced tools
Comparing version 2.6.1 to 2.7.0
{ | ||
"name": "@rive-app/canvas", | ||
"version": "2.6.1", | ||
"version": "2.7.0", | ||
"description": "Rive's canvas based web api.", | ||
@@ -5,0 +5,0 @@ "main": "rive.js", |
@@ -32,4 +32,4 @@ interface RiveOptions { | ||
StrokeJoin: typeof StrokeJoin; | ||
decodeImage: Function; | ||
decodeFont: Function; | ||
decodeImage: DecodeFont; | ||
decodeFont: DecodeFont; | ||
@@ -264,2 +264,21 @@ /** | ||
export class Image { | ||
unref(): void; | ||
} | ||
export interface ImageCallback { | ||
(image: Image): void; | ||
} | ||
export interface DecodeImage { | ||
(bytes: Uint8Array, callback: ImageCallback): void; | ||
} | ||
export class Font { | ||
unref(): void; | ||
} | ||
export interface FontCallback { | ||
(font: Font): void; | ||
} | ||
export interface DecodeFont { | ||
(bytes: Uint8Array, callback: FontCallback): void; | ||
} | ||
////////// | ||
@@ -869,8 +888,7 @@ // File // | ||
export declare class FileAssetLoader { | ||
} | ||
export declare class FileAssetLoader {} | ||
export declare class CustomFileAssetLoader extends FileAssetLoader { | ||
constructor({loadContents}: {loadContents:Function}); | ||
loadContents(asset: FileAsset, bytes:any): boolean; | ||
constructor({ loadContents }: { loadContents: Function }); | ||
loadContents(asset: FileAsset, bytes: any): boolean; | ||
} |
@@ -536,4 +536,16 @@ import * as rc from "./rive_advanced.mjs"; | ||
}; | ||
export declare const decodeImage: (bytes: Uint8Array) => Promise<any>; | ||
export declare const decodeFont: (bytes: Uint8Array) => Promise<any>; | ||
/** | ||
* Decodes bytes into an image. | ||
* | ||
* Be sure to call `.dispose()` on the image once it is no longer needed. This | ||
* allows the engine to clean it up when it is not used by any more animations. | ||
*/ | ||
export declare const decodeImage: (bytes: Uint8Array) => Promise<rc.Image>; | ||
/** | ||
* Decodes bytes into a font. | ||
* | ||
* Be sure to call `.dispose()` on the font once it is no longer needed. This | ||
* allows the engine to clean it up when it is not used by any more animations. | ||
*/ | ||
export declare const decodeFont: (bytes: Uint8Array) => Promise<rc.Font>; | ||
export {}; |
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
1139491
3837