@rive-app/webgl2 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
|
@@ -3562,7 +3562,7 @@ ae();
|
|
|
3562
3562
|
/* 2 */
|
|
3563
3563
|
/***/ ((module) => {
|
|
3564
3564
|
|
|
3565
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl2","version":"2.27.
|
|
3565
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl2","version":"2.27.5","description":"Rive\'s webgl2 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)","Chris Dalton <chris@rive.app> (https://rive.app)"],"license":"MIT","files":["rive.js","rive.wasm","rive.js.map","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
3566
3566
|
|
|
3567
3567
|
/***/ }),
|
|
3568
3568
|
/* 3 */
|
|
@@ -4168,8 +4168,8 @@ var FileAssetWrapper = /** @class */ (function () {
|
|
|
4168
4168
|
*/
|
|
4169
4169
|
var ImageAssetWrapper = /** @class */ (function (_super) {
|
|
4170
4170
|
__extends(ImageAssetWrapper, _super);
|
|
4171
|
-
function ImageAssetWrapper(
|
|
4172
|
-
return _super.
|
|
4171
|
+
function ImageAssetWrapper() {
|
|
4172
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4173
4173
|
}
|
|
4174
4174
|
ImageAssetWrapper.prototype.setRenderImage = function (image) {
|
|
4175
4175
|
this._nativeFileAsset.setRenderImage(image.nativeImage);
|
|
@@ -4182,8 +4182,8 @@ var ImageAssetWrapper = /** @class */ (function (_super) {
|
|
|
4182
4182
|
*/
|
|
4183
4183
|
var AudioAssetWrapper = /** @class */ (function (_super) {
|
|
4184
4184
|
__extends(AudioAssetWrapper, _super);
|
|
4185
|
-
function AudioAssetWrapper(
|
|
4186
|
-
return _super.
|
|
4185
|
+
function AudioAssetWrapper() {
|
|
4186
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4187
4187
|
}
|
|
4188
4188
|
AudioAssetWrapper.prototype.setAudioSource = function (audio) {
|
|
4189
4189
|
this._nativeFileAsset.setAudioSource(audio.nativeAudio);
|
|
@@ -5921,7 +5921,7 @@ var Rive = /** @class */ (function () {
|
|
|
5921
5921
|
this._artboardHeight = this.artboard.height =
|
|
5922
5922
|
this._artboardHeight || this.artboard.height;
|
|
5923
5923
|
};
|
|
5924
|
-
// Initializes runtime with Rive data and preps for playing.
|
|
5924
|
+
// Initializes runtime with Rive data and preps for playing.
|
|
5925
5925
|
// Returns true for successful initialization.
|
|
5926
5926
|
Rive.prototype.initData = function (artboardName, animationNames, stateMachineNames, autoplay, autoBind) {
|
|
5927
5927
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -7814,8 +7814,7 @@ var ViewModelInstanceAssetImage = /** @class */ (function (_super) {
|
|
|
7814
7814
|
}
|
|
7815
7815
|
Object.defineProperty(ViewModelInstanceAssetImage.prototype, "value", {
|
|
7816
7816
|
set: function (image) {
|
|
7817
|
-
this._viewModelInstanceValue.value
|
|
7818
|
-
image.nativeImage;
|
|
7817
|
+
this._viewModelInstanceValue.value(image.nativeImage);
|
|
7819
7818
|
},
|
|
7820
7819
|
enumerable: false,
|
|
7821
7820
|
configurable: true
|