@rive-app/canvas-lite 2.27.4 → 2.27.5
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 +6 -6
- package/rive.js +7 -8
- package/rive.js.map +1 -1
- package/rive_advanced.mjs.d.ts +41 -1
package/package.json
CHANGED
package/rive.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as rc from "./rive_advanced.mjs";
|
|
2
|
-
|
|
3
|
-
export type {
|
|
2
|
+
export type AssetLoadCallback = (asset: rc.FileAsset, bytes: Uint8Array) => Boolean;
|
|
3
|
+
export type { FileAsset, AudioAsset, FontAsset, ImageAsset, } from "./rive_advanced.mjs";
|
|
4
4
|
/**
|
|
5
5
|
* Generic type for a parameterless void callback
|
|
6
6
|
*/
|
|
@@ -245,7 +245,7 @@ export interface RiveParameters {
|
|
|
245
245
|
onLoop?: EventCallback;
|
|
246
246
|
onStateChange?: EventCallback;
|
|
247
247
|
onAdvance?: EventCallback;
|
|
248
|
-
assetLoader?:
|
|
248
|
+
assetLoader?: AssetLoadCallback;
|
|
249
249
|
/**
|
|
250
250
|
* @deprecated Use `onLoad()` instead
|
|
251
251
|
*/
|
|
@@ -297,7 +297,7 @@ export interface RiveResetParameters {
|
|
|
297
297
|
export interface RiveFileParameters {
|
|
298
298
|
src?: string;
|
|
299
299
|
buffer?: ArrayBuffer;
|
|
300
|
-
assetLoader?:
|
|
300
|
+
assetLoader?: AssetLoadCallback;
|
|
301
301
|
enableRiveAssetCDN?: boolean;
|
|
302
302
|
onLoad?: EventCallback;
|
|
303
303
|
onLoadError?: EventCallback;
|
|
@@ -897,7 +897,7 @@ export declare class ViewModelInstanceColor extends ViewModelInstanceValue {
|
|
|
897
897
|
}
|
|
898
898
|
export declare class ViewModelInstanceAssetImage extends ViewModelInstanceValue {
|
|
899
899
|
constructor(instance: rc.ViewModelInstanceAssetImage, root: ViewModelInstance);
|
|
900
|
-
set value(image:
|
|
900
|
+
set value(image: rc.Image);
|
|
901
901
|
internalHandleCallback(callback: Function): void;
|
|
902
902
|
}
|
|
903
903
|
/**
|
|
@@ -946,7 +946,7 @@ export declare const decodeAudio: (bytes: Uint8Array) => Promise<rc.Audio>;
|
|
|
946
946
|
* Be sure to call `.unref()` on the image once it is no longer needed. This
|
|
947
947
|
* allows the engine to clean it up when it is not used by any more animations.
|
|
948
948
|
*/
|
|
949
|
-
export declare const decodeImage: (bytes: Uint8Array) => Promise<
|
|
949
|
+
export declare const decodeImage: (bytes: Uint8Array) => Promise<rc.Image>;
|
|
950
950
|
/**
|
|
951
951
|
* Decodes bytes into a font.
|
|
952
952
|
*
|
package/rive.js
CHANGED
|
@@ -2271,7 +2271,7 @@ Qc();
|
|
|
2271
2271
|
/* 2 */
|
|
2272
2272
|
/***/ ((module) => {
|
|
2273
2273
|
|
|
2274
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.27.
|
|
2274
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.27.5","description":"A lite version of Rive\'s canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
2275
2275
|
|
|
2276
2276
|
/***/ }),
|
|
2277
2277
|
/* 3 */
|
|
@@ -2877,8 +2877,8 @@ var FileAssetWrapper = /** @class */ (function () {
|
|
|
2877
2877
|
*/
|
|
2878
2878
|
var ImageAssetWrapper = /** @class */ (function (_super) {
|
|
2879
2879
|
__extends(ImageAssetWrapper, _super);
|
|
2880
|
-
function ImageAssetWrapper(
|
|
2881
|
-
return _super.
|
|
2880
|
+
function ImageAssetWrapper() {
|
|
2881
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2882
2882
|
}
|
|
2883
2883
|
ImageAssetWrapper.prototype.setRenderImage = function (image) {
|
|
2884
2884
|
this._nativeFileAsset.setRenderImage(image.nativeImage);
|
|
@@ -2891,8 +2891,8 @@ var ImageAssetWrapper = /** @class */ (function (_super) {
|
|
|
2891
2891
|
*/
|
|
2892
2892
|
var AudioAssetWrapper = /** @class */ (function (_super) {
|
|
2893
2893
|
__extends(AudioAssetWrapper, _super);
|
|
2894
|
-
function AudioAssetWrapper(
|
|
2895
|
-
return _super.
|
|
2894
|
+
function AudioAssetWrapper() {
|
|
2895
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2896
2896
|
}
|
|
2897
2897
|
AudioAssetWrapper.prototype.setAudioSource = function (audio) {
|
|
2898
2898
|
this._nativeFileAsset.setAudioSource(audio.nativeAudio);
|
|
@@ -4630,7 +4630,7 @@ var Rive = /** @class */ (function () {
|
|
|
4630
4630
|
this._artboardHeight = this.artboard.height =
|
|
4631
4631
|
this._artboardHeight || this.artboard.height;
|
|
4632
4632
|
};
|
|
4633
|
-
// Initializes runtime with Rive data and preps for playing.
|
|
4633
|
+
// Initializes runtime with Rive data and preps for playing.
|
|
4634
4634
|
// Returns true for successful initialization.
|
|
4635
4635
|
Rive.prototype.initData = function (artboardName, animationNames, stateMachineNames, autoplay, autoBind) {
|
|
4636
4636
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -6523,8 +6523,7 @@ var ViewModelInstanceAssetImage = /** @class */ (function (_super) {
|
|
|
6523
6523
|
}
|
|
6524
6524
|
Object.defineProperty(ViewModelInstanceAssetImage.prototype, "value", {
|
|
6525
6525
|
set: function (image) {
|
|
6526
|
-
this._viewModelInstanceValue.value
|
|
6527
|
-
image.nativeImage;
|
|
6526
|
+
this._viewModelInstanceValue.value(image.nativeImage);
|
|
6528
6527
|
},
|
|
6529
6528
|
enumerable: false,
|
|
6530
6529
|
configurable: true
|