@rive-app/webgl-single 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
|
@@ -4054,7 +4054,7 @@ Ge();
|
|
|
4054
4054
|
/* 2 */
|
|
4055
4055
|
/***/ ((module) => {
|
|
4056
4056
|
|
|
4057
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl-single","version":"2.27.
|
|
4057
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl-single","version":"2.27.5","description":"Rive\'s webgl based web api with bundled wasm.","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.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
4058
4058
|
|
|
4059
4059
|
/***/ }),
|
|
4060
4060
|
/* 3 */
|
|
@@ -4660,8 +4660,8 @@ var FileAssetWrapper = /** @class */ (function () {
|
|
|
4660
4660
|
*/
|
|
4661
4661
|
var ImageAssetWrapper = /** @class */ (function (_super) {
|
|
4662
4662
|
__extends(ImageAssetWrapper, _super);
|
|
4663
|
-
function ImageAssetWrapper(
|
|
4664
|
-
return _super.
|
|
4663
|
+
function ImageAssetWrapper() {
|
|
4664
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4665
4665
|
}
|
|
4666
4666
|
ImageAssetWrapper.prototype.setRenderImage = function (image) {
|
|
4667
4667
|
this._nativeFileAsset.setRenderImage(image.nativeImage);
|
|
@@ -4674,8 +4674,8 @@ var ImageAssetWrapper = /** @class */ (function (_super) {
|
|
|
4674
4674
|
*/
|
|
4675
4675
|
var AudioAssetWrapper = /** @class */ (function (_super) {
|
|
4676
4676
|
__extends(AudioAssetWrapper, _super);
|
|
4677
|
-
function AudioAssetWrapper(
|
|
4678
|
-
return _super.
|
|
4677
|
+
function AudioAssetWrapper() {
|
|
4678
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4679
4679
|
}
|
|
4680
4680
|
AudioAssetWrapper.prototype.setAudioSource = function (audio) {
|
|
4681
4681
|
this._nativeFileAsset.setAudioSource(audio.nativeAudio);
|
|
@@ -6413,7 +6413,7 @@ var Rive = /** @class */ (function () {
|
|
|
6413
6413
|
this._artboardHeight = this.artboard.height =
|
|
6414
6414
|
this._artboardHeight || this.artboard.height;
|
|
6415
6415
|
};
|
|
6416
|
-
// Initializes runtime with Rive data and preps for playing.
|
|
6416
|
+
// Initializes runtime with Rive data and preps for playing.
|
|
6417
6417
|
// Returns true for successful initialization.
|
|
6418
6418
|
Rive.prototype.initData = function (artboardName, animationNames, stateMachineNames, autoplay, autoBind) {
|
|
6419
6419
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -8306,8 +8306,7 @@ var ViewModelInstanceAssetImage = /** @class */ (function (_super) {
|
|
|
8306
8306
|
}
|
|
8307
8307
|
Object.defineProperty(ViewModelInstanceAssetImage.prototype, "value", {
|
|
8308
8308
|
set: function (image) {
|
|
8309
|
-
this._viewModelInstanceValue.value
|
|
8310
|
-
image.nativeImage;
|
|
8309
|
+
this._viewModelInstanceValue.value(image.nativeImage);
|
|
8311
8310
|
},
|
|
8312
8311
|
enumerable: false,
|
|
8313
8312
|
configurable: true
|