@rive-app/webgl 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
|
@@ -4065,7 +4065,7 @@ Je();
|
|
|
4065
4065
|
/* 2 */
|
|
4066
4066
|
/***/ ((module) => {
|
|
4067
4067
|
|
|
4068
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl","version":"2.27.
|
|
4068
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl","version":"2.27.5","description":"Rive\'s webgl 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.wasm","rive_fallback.wasm","rive.js.map","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
4069
4069
|
|
|
4070
4070
|
/***/ }),
|
|
4071
4071
|
/* 3 */
|
|
@@ -4671,8 +4671,8 @@ var FileAssetWrapper = /** @class */ (function () {
|
|
|
4671
4671
|
*/
|
|
4672
4672
|
var ImageAssetWrapper = /** @class */ (function (_super) {
|
|
4673
4673
|
__extends(ImageAssetWrapper, _super);
|
|
4674
|
-
function ImageAssetWrapper(
|
|
4675
|
-
return _super.
|
|
4674
|
+
function ImageAssetWrapper() {
|
|
4675
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4676
4676
|
}
|
|
4677
4677
|
ImageAssetWrapper.prototype.setRenderImage = function (image) {
|
|
4678
4678
|
this._nativeFileAsset.setRenderImage(image.nativeImage);
|
|
@@ -4685,8 +4685,8 @@ var ImageAssetWrapper = /** @class */ (function (_super) {
|
|
|
4685
4685
|
*/
|
|
4686
4686
|
var AudioAssetWrapper = /** @class */ (function (_super) {
|
|
4687
4687
|
__extends(AudioAssetWrapper, _super);
|
|
4688
|
-
function AudioAssetWrapper(
|
|
4689
|
-
return _super.
|
|
4688
|
+
function AudioAssetWrapper() {
|
|
4689
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4690
4690
|
}
|
|
4691
4691
|
AudioAssetWrapper.prototype.setAudioSource = function (audio) {
|
|
4692
4692
|
this._nativeFileAsset.setAudioSource(audio.nativeAudio);
|
|
@@ -6424,7 +6424,7 @@ var Rive = /** @class */ (function () {
|
|
|
6424
6424
|
this._artboardHeight = this.artboard.height =
|
|
6425
6425
|
this._artboardHeight || this.artboard.height;
|
|
6426
6426
|
};
|
|
6427
|
-
// Initializes runtime with Rive data and preps for playing.
|
|
6427
|
+
// Initializes runtime with Rive data and preps for playing.
|
|
6428
6428
|
// Returns true for successful initialization.
|
|
6429
6429
|
Rive.prototype.initData = function (artboardName, animationNames, stateMachineNames, autoplay, autoBind) {
|
|
6430
6430
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -8317,8 +8317,7 @@ var ViewModelInstanceAssetImage = /** @class */ (function (_super) {
|
|
|
8317
8317
|
}
|
|
8318
8318
|
Object.defineProperty(ViewModelInstanceAssetImage.prototype, "value", {
|
|
8319
8319
|
set: function (image) {
|
|
8320
|
-
this._viewModelInstanceValue.value
|
|
8321
|
-
image.nativeImage;
|
|
8320
|
+
this._viewModelInstanceValue.value(image.nativeImage);
|
|
8322
8321
|
},
|
|
8323
8322
|
enumerable: false,
|
|
8324
8323
|
configurable: true
|