@rive-app/webgl 2.27.0 → 2.27.2
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 +15 -0
- package/rive.js +66 -10
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +9 -0
- package/rive_fallback.wasm +0 -0
package/package.json
CHANGED
package/rive.d.ts
CHANGED
|
@@ -799,6 +799,12 @@ export declare class ViewModelInstance {
|
|
|
799
799
|
* @param path - path to the enum property
|
|
800
800
|
*/
|
|
801
801
|
enum(path: string): ViewModelInstanceEnum | null;
|
|
802
|
+
/**
|
|
803
|
+
* method to access a property instance of type list belonging
|
|
804
|
+
* to the view model instance or to a nested view model instance
|
|
805
|
+
* @param path - path to the list property
|
|
806
|
+
*/
|
|
807
|
+
list(path: string): ViewModelInstanceList | null;
|
|
802
808
|
/**
|
|
803
809
|
* method to access a view model property instance belonging
|
|
804
810
|
* to the view model instance or to a nested view model instance
|
|
@@ -863,6 +869,15 @@ export declare class ViewModelInstanceEnum extends ViewModelInstanceValue {
|
|
|
863
869
|
get values(): string[];
|
|
864
870
|
internalHandleCallback(callback: Function): void;
|
|
865
871
|
}
|
|
872
|
+
export declare class ViewModelInstanceList extends ViewModelInstanceValue {
|
|
873
|
+
constructor(instance: rc.ViewModelInstanceList, parent: ViewModelInstance);
|
|
874
|
+
get length(): number;
|
|
875
|
+
addInstance(instance: ViewModelInstance): void;
|
|
876
|
+
removeInstance(instance: ViewModelInstance): void;
|
|
877
|
+
removeInstanceAt(index: number): void;
|
|
878
|
+
instanceAt(index: number): ViewModelInstance | null;
|
|
879
|
+
internalHandleCallback(callback: Function): void;
|
|
880
|
+
}
|
|
866
881
|
export declare class ViewModelInstanceColor extends ViewModelInstanceValue {
|
|
867
882
|
constructor(instance: rc.ViewModelInstanceColor, parent: ViewModelInstance);
|
|
868
883
|
get value(): number;
|
package/rive.js
CHANGED
|
@@ -408,7 +408,7 @@ function Qa(a, b) {
|
|
|
408
408
|
return Pa(c, a, b);
|
|
409
409
|
}));
|
|
410
410
|
}
|
|
411
|
-
var Ra, Sa, Wa = {
|
|
411
|
+
var Ra, Sa, Wa = {707724:(a, b, c, d, e) => {
|
|
412
412
|
if ("undefined" === typeof window || void 0 === (window.AudioContext || window.webkitAudioContext)) {
|
|
413
413
|
return 0;
|
|
414
414
|
}
|
|
@@ -471,9 +471,9 @@ var Ra, Sa, Wa = {704988:(a, b, c, d, e) => {
|
|
|
471
471
|
}
|
|
472
472
|
window.h.Ea += 1;
|
|
473
473
|
return 1;
|
|
474
|
-
},
|
|
474
|
+
}, 709902:() => {
|
|
475
475
|
"undefined" !== typeof window.h && (--window.h.Ea, 0 === window.h.Ea && delete window.h);
|
|
476
|
-
},
|
|
476
|
+
}, 710066:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 710170:() => {
|
|
477
477
|
try {
|
|
478
478
|
var a = new (window.AudioContext || window.webkitAudioContext)(), b = a.sampleRate;
|
|
479
479
|
a.close();
|
|
@@ -481,7 +481,7 @@ var Ra, Sa, Wa = {704988:(a, b, c, d, e) => {
|
|
|
481
481
|
} catch (c) {
|
|
482
482
|
return 0;
|
|
483
483
|
}
|
|
484
|
-
},
|
|
484
|
+
}, 710341:(a, b, c, d, e, f) => {
|
|
485
485
|
if ("undefined" === typeof window.h) {
|
|
486
486
|
return -1;
|
|
487
487
|
}
|
|
@@ -527,7 +527,7 @@ var Ra, Sa, Wa = {704988:(a, b, c, d, e) => {
|
|
|
527
527
|
a == window.h.H.Ca && g.X.connect(g.I.destination);
|
|
528
528
|
g.lb = f;
|
|
529
529
|
return window.h.nc(g);
|
|
530
|
-
},
|
|
530
|
+
}, 713218:a => window.h.ta(a).I.sampleRate, 713291:a => {
|
|
531
531
|
a = window.h.ta(a);
|
|
532
532
|
void 0 !== a.X && (a.X.onaudioprocess = function() {
|
|
533
533
|
}, a.X.disconnect(), a.X = void 0);
|
|
@@ -535,13 +535,13 @@ var Ra, Sa, Wa = {704988:(a, b, c, d, e) => {
|
|
|
535
535
|
a.I.close();
|
|
536
536
|
a.I = void 0;
|
|
537
537
|
a.lb = void 0;
|
|
538
|
-
},
|
|
538
|
+
}, 713691:a => {
|
|
539
539
|
window.h.xb(a);
|
|
540
|
-
},
|
|
540
|
+
}, 713741:a => {
|
|
541
541
|
a = window.h.ta(a);
|
|
542
542
|
a.I.resume();
|
|
543
543
|
a.state = window.h.ha.sb;
|
|
544
|
-
},
|
|
544
|
+
}, 713880:a => {
|
|
545
545
|
a = window.h.ta(a);
|
|
546
546
|
a.I.suspend();
|
|
547
547
|
a.state = window.h.ha.stopped;
|
|
@@ -4063,7 +4063,7 @@ Je();
|
|
|
4063
4063
|
/* 2 */
|
|
4064
4064
|
/***/ ((module) => {
|
|
4065
4065
|
|
|
4066
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl","version":"2.27.
|
|
4066
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl","version":"2.27.2","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}}');
|
|
4067
4067
|
|
|
4068
4068
|
/***/ }),
|
|
4069
4069
|
/* 3 */
|
|
@@ -4539,6 +4539,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4539
4539
|
/* harmony export */ ViewModelInstanceBoolean: () => (/* binding */ ViewModelInstanceBoolean),
|
|
4540
4540
|
/* harmony export */ ViewModelInstanceColor: () => (/* binding */ ViewModelInstanceColor),
|
|
4541
4541
|
/* harmony export */ ViewModelInstanceEnum: () => (/* binding */ ViewModelInstanceEnum),
|
|
4542
|
+
/* harmony export */ ViewModelInstanceList: () => (/* binding */ ViewModelInstanceList),
|
|
4542
4543
|
/* harmony export */ ViewModelInstanceNumber: () => (/* binding */ ViewModelInstanceNumber),
|
|
4543
4544
|
/* harmony export */ ViewModelInstanceString: () => (/* binding */ ViewModelInstanceString),
|
|
4544
4545
|
/* harmony export */ ViewModelInstanceTrigger: () => (/* binding */ ViewModelInstanceTrigger),
|
|
@@ -7413,6 +7414,7 @@ var PropertyType;
|
|
|
7413
7414
|
PropertyType["Color"] = "color";
|
|
7414
7415
|
PropertyType["Trigger"] = "trigger";
|
|
7415
7416
|
PropertyType["Enum"] = "enum";
|
|
7417
|
+
PropertyType["List"] = "list";
|
|
7416
7418
|
})(PropertyType || (PropertyType = {}));
|
|
7417
7419
|
var ViewModelInstance = /** @class */ (function () {
|
|
7418
7420
|
function ViewModelInstance(runtimeInstance, parent) {
|
|
@@ -7536,7 +7538,7 @@ var ViewModelInstance = /** @class */ (function () {
|
|
|
7536
7538
|
return null;
|
|
7537
7539
|
};
|
|
7538
7540
|
ViewModelInstance.prototype.propertyFromPathSegments = function (pathSegments, index, type) {
|
|
7539
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
7541
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
7540
7542
|
if (index < pathSegments.length - 1) {
|
|
7541
7543
|
var viewModelInstance = this.internalViewModelInstance(pathSegments[index]);
|
|
7542
7544
|
if (viewModelInstance !== null) {
|
|
@@ -7584,6 +7586,12 @@ var ViewModelInstance = /** @class */ (function () {
|
|
|
7584
7586
|
return new ViewModelInstanceEnum(instance, this);
|
|
7585
7587
|
}
|
|
7586
7588
|
break;
|
|
7589
|
+
case PropertyType.List:
|
|
7590
|
+
instance = (_p = (_o = this._runtimeInstance) === null || _o === void 0 ? void 0 : _o.list(pathSegments[index])) !== null && _p !== void 0 ? _p : null;
|
|
7591
|
+
if (instance !== null) {
|
|
7592
|
+
return new ViewModelInstanceList(instance, this);
|
|
7593
|
+
}
|
|
7594
|
+
break;
|
|
7587
7595
|
}
|
|
7588
7596
|
return null;
|
|
7589
7597
|
};
|
|
@@ -7655,6 +7663,15 @@ var ViewModelInstance = /** @class */ (function () {
|
|
|
7655
7663
|
var viewmodelInstanceValue = this.propertyFromPath(path, PropertyType.Enum);
|
|
7656
7664
|
return viewmodelInstanceValue;
|
|
7657
7665
|
};
|
|
7666
|
+
/**
|
|
7667
|
+
* method to access a property instance of type list belonging
|
|
7668
|
+
* to the view model instance or to a nested view model instance
|
|
7669
|
+
* @param path - path to the list property
|
|
7670
|
+
*/
|
|
7671
|
+
ViewModelInstance.prototype.list = function (path) {
|
|
7672
|
+
var viewmodelInstanceValue = this.propertyFromPath(path, PropertyType.List);
|
|
7673
|
+
return viewmodelInstanceValue;
|
|
7674
|
+
};
|
|
7658
7675
|
/**
|
|
7659
7676
|
* method to access a view model property instance belonging
|
|
7660
7677
|
* to the view model instance or to a nested view model instance
|
|
@@ -7929,6 +7946,45 @@ var ViewModelInstanceEnum = /** @class */ (function (_super) {
|
|
|
7929
7946
|
return ViewModelInstanceEnum;
|
|
7930
7947
|
}(ViewModelInstanceValue));
|
|
7931
7948
|
|
|
7949
|
+
var ViewModelInstanceList = /** @class */ (function (_super) {
|
|
7950
|
+
__extends(ViewModelInstanceList, _super);
|
|
7951
|
+
function ViewModelInstanceList(instance, parent) {
|
|
7952
|
+
return _super.call(this, instance, parent) || this;
|
|
7953
|
+
}
|
|
7954
|
+
Object.defineProperty(ViewModelInstanceList.prototype, "length", {
|
|
7955
|
+
get: function () {
|
|
7956
|
+
return this._viewModelInstanceValue.size;
|
|
7957
|
+
},
|
|
7958
|
+
enumerable: false,
|
|
7959
|
+
configurable: true
|
|
7960
|
+
});
|
|
7961
|
+
ViewModelInstanceList.prototype.addInstance = function (instance) {
|
|
7962
|
+
if (instance.runtimeInstance != null) {
|
|
7963
|
+
this._viewModelInstanceValue.addInstance(instance.runtimeInstance);
|
|
7964
|
+
}
|
|
7965
|
+
};
|
|
7966
|
+
ViewModelInstanceList.prototype.removeInstance = function (instance) {
|
|
7967
|
+
if (instance.runtimeInstance != null) {
|
|
7968
|
+
this._viewModelInstanceValue.removeInstance(instance.runtimeInstance);
|
|
7969
|
+
}
|
|
7970
|
+
};
|
|
7971
|
+
ViewModelInstanceList.prototype.removeInstanceAt = function (index) {
|
|
7972
|
+
this._viewModelInstanceValue.removeInstanceAt(index);
|
|
7973
|
+
};
|
|
7974
|
+
ViewModelInstanceList.prototype.instanceAt = function (index) {
|
|
7975
|
+
var runtimeInstance = this._viewModelInstanceValue.instanceAt(index);
|
|
7976
|
+
if (runtimeInstance != null) {
|
|
7977
|
+
var viewModelInstance = new ViewModelInstance(runtimeInstance, null);
|
|
7978
|
+
return viewModelInstance;
|
|
7979
|
+
}
|
|
7980
|
+
return null;
|
|
7981
|
+
};
|
|
7982
|
+
ViewModelInstanceList.prototype.internalHandleCallback = function (callback) {
|
|
7983
|
+
callback();
|
|
7984
|
+
};
|
|
7985
|
+
return ViewModelInstanceList;
|
|
7986
|
+
}(ViewModelInstanceValue));
|
|
7987
|
+
|
|
7932
7988
|
var ViewModelInstanceColor = /** @class */ (function (_super) {
|
|
7933
7989
|
__extends(ViewModelInstanceColor, _super);
|
|
7934
7990
|
function ViewModelInstanceColor(instance, parent) {
|