@rive-app/webgl2 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rive-app/webgl2",
3
- "version": "2.27.0",
3
+ "version": "2.27.2",
4
4
  "description": "Rive's webgl2 based web api.",
5
5
  "main": "rive.js",
6
6
  "homepage": "https://rive.app",
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
@@ -442,7 +442,7 @@ function Oa(a, b) {
442
442
  return Na(c, a, b);
443
443
  }));
444
444
  }
445
- var Pa, Qa, Ua = {511455:(a, b, c, d, e) => {
445
+ var Pa, Qa, Ua = {516495:(a, b, c, d, e) => {
446
446
  if ("undefined" === typeof window || void 0 === (window.AudioContext || window.webkitAudioContext)) {
447
447
  return 0;
448
448
  }
@@ -505,9 +505,9 @@ var Pa, Qa, Ua = {511455:(a, b, c, d, e) => {
505
505
  }
506
506
  window.h.Da += 1;
507
507
  return 1;
508
- }, 513633:() => {
508
+ }, 518673:() => {
509
509
  "undefined" !== typeof window.h && (--window.h.Da, 0 === window.h.Da && delete window.h);
510
- }, 513797:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 513901:() => {
510
+ }, 518837:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 518941:() => {
511
511
  try {
512
512
  var a = new (window.AudioContext || window.webkitAudioContext)(), b = a.sampleRate;
513
513
  a.close();
@@ -515,7 +515,7 @@ var Pa, Qa, Ua = {511455:(a, b, c, d, e) => {
515
515
  } catch (c) {
516
516
  return 0;
517
517
  }
518
- }, 514072:(a, b, c, d, e, f) => {
518
+ }, 519112:(a, b, c, d, e, f) => {
519
519
  if ("undefined" === typeof window.h) {
520
520
  return -1;
521
521
  }
@@ -561,7 +561,7 @@ var Pa, Qa, Ua = {511455:(a, b, c, d, e) => {
561
561
  a == window.h.I.Ba && g.Z.connect(g.J.destination);
562
562
  g.lb = f;
563
563
  return window.h.oc(g);
564
- }, 516949:a => window.h.va(a).J.sampleRate, 517022:a => {
564
+ }, 521989:a => window.h.va(a).J.sampleRate, 522062:a => {
565
565
  a = window.h.va(a);
566
566
  void 0 !== a.Z && (a.Z.onaudioprocess = function() {
567
567
  }, a.Z.disconnect(), a.Z = void 0);
@@ -569,13 +569,13 @@ var Pa, Qa, Ua = {511455:(a, b, c, d, e) => {
569
569
  a.J.close();
570
570
  a.J = void 0;
571
571
  a.lb = void 0;
572
- }, 517422:a => {
572
+ }, 522462:a => {
573
573
  window.h.yb(a);
574
- }, 517472:a => {
574
+ }, 522512:a => {
575
575
  a = window.h.va(a);
576
576
  a.J.resume();
577
577
  a.state = window.h.ja.tb;
578
- }, 517611:a => {
578
+ }, 522651:a => {
579
579
  a = window.h.va(a);
580
580
  a.J.suspend();
581
581
  a.state = window.h.ja.stopped;
@@ -3499,8 +3499,8 @@ k.dynCall_viijii = (a, b, c, d, e, f, g) => (k.dynCall_viijii = C.dynCall_viijii
3499
3499
  k.dynCall_iiiiij = (a, b, c, d, e, f, g) => (k.dynCall_iiiiij = C.dynCall_iiiiij)(a, b, c, d, e, f, g);
3500
3500
  k.dynCall_iiiiijj = (a, b, c, d, e, f, g, l, p) => (k.dynCall_iiiiijj = C.dynCall_iiiiijj)(a, b, c, d, e, f, g, l, p);
3501
3501
  k.dynCall_iiiiiijj = (a, b, c, d, e, f, g, l, p, m) => (k.dynCall_iiiiiijj = C.dynCall_iiiiiijj)(a, b, c, d, e, f, g, l, p, m);
3502
- k.___start_em_js = 508700;
3503
- k.___stop_em_js = 511455;
3502
+ k.___start_em_js = 513740;
3503
+ k.___stop_em_js = 516495;
3504
3504
  var Zd;
3505
3505
  Ha = function $d() {
3506
3506
  Zd || ae();
@@ -3560,7 +3560,7 @@ ae();
3560
3560
  /* 2 */
3561
3561
  /***/ ((module) => {
3562
3562
 
3563
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl2","version":"2.27.0","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}}');
3563
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl2","version":"2.27.2","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}}');
3564
3564
 
3565
3565
  /***/ }),
3566
3566
  /* 3 */
@@ -4036,6 +4036,7 @@ __webpack_require__.r(__webpack_exports__);
4036
4036
  /* harmony export */ ViewModelInstanceBoolean: () => (/* binding */ ViewModelInstanceBoolean),
4037
4037
  /* harmony export */ ViewModelInstanceColor: () => (/* binding */ ViewModelInstanceColor),
4038
4038
  /* harmony export */ ViewModelInstanceEnum: () => (/* binding */ ViewModelInstanceEnum),
4039
+ /* harmony export */ ViewModelInstanceList: () => (/* binding */ ViewModelInstanceList),
4039
4040
  /* harmony export */ ViewModelInstanceNumber: () => (/* binding */ ViewModelInstanceNumber),
4040
4041
  /* harmony export */ ViewModelInstanceString: () => (/* binding */ ViewModelInstanceString),
4041
4042
  /* harmony export */ ViewModelInstanceTrigger: () => (/* binding */ ViewModelInstanceTrigger),
@@ -6910,6 +6911,7 @@ var PropertyType;
6910
6911
  PropertyType["Color"] = "color";
6911
6912
  PropertyType["Trigger"] = "trigger";
6912
6913
  PropertyType["Enum"] = "enum";
6914
+ PropertyType["List"] = "list";
6913
6915
  })(PropertyType || (PropertyType = {}));
6914
6916
  var ViewModelInstance = /** @class */ (function () {
6915
6917
  function ViewModelInstance(runtimeInstance, parent) {
@@ -7033,7 +7035,7 @@ var ViewModelInstance = /** @class */ (function () {
7033
7035
  return null;
7034
7036
  };
7035
7037
  ViewModelInstance.prototype.propertyFromPathSegments = function (pathSegments, index, type) {
7036
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
7038
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
7037
7039
  if (index < pathSegments.length - 1) {
7038
7040
  var viewModelInstance = this.internalViewModelInstance(pathSegments[index]);
7039
7041
  if (viewModelInstance !== null) {
@@ -7081,6 +7083,12 @@ var ViewModelInstance = /** @class */ (function () {
7081
7083
  return new ViewModelInstanceEnum(instance, this);
7082
7084
  }
7083
7085
  break;
7086
+ case PropertyType.List:
7087
+ instance = (_p = (_o = this._runtimeInstance) === null || _o === void 0 ? void 0 : _o.list(pathSegments[index])) !== null && _p !== void 0 ? _p : null;
7088
+ if (instance !== null) {
7089
+ return new ViewModelInstanceList(instance, this);
7090
+ }
7091
+ break;
7084
7092
  }
7085
7093
  return null;
7086
7094
  };
@@ -7152,6 +7160,15 @@ var ViewModelInstance = /** @class */ (function () {
7152
7160
  var viewmodelInstanceValue = this.propertyFromPath(path, PropertyType.Enum);
7153
7161
  return viewmodelInstanceValue;
7154
7162
  };
7163
+ /**
7164
+ * method to access a property instance of type list belonging
7165
+ * to the view model instance or to a nested view model instance
7166
+ * @param path - path to the list property
7167
+ */
7168
+ ViewModelInstance.prototype.list = function (path) {
7169
+ var viewmodelInstanceValue = this.propertyFromPath(path, PropertyType.List);
7170
+ return viewmodelInstanceValue;
7171
+ };
7155
7172
  /**
7156
7173
  * method to access a view model property instance belonging
7157
7174
  * to the view model instance or to a nested view model instance
@@ -7426,6 +7443,45 @@ var ViewModelInstanceEnum = /** @class */ (function (_super) {
7426
7443
  return ViewModelInstanceEnum;
7427
7444
  }(ViewModelInstanceValue));
7428
7445
 
7446
+ var ViewModelInstanceList = /** @class */ (function (_super) {
7447
+ __extends(ViewModelInstanceList, _super);
7448
+ function ViewModelInstanceList(instance, parent) {
7449
+ return _super.call(this, instance, parent) || this;
7450
+ }
7451
+ Object.defineProperty(ViewModelInstanceList.prototype, "length", {
7452
+ get: function () {
7453
+ return this._viewModelInstanceValue.size;
7454
+ },
7455
+ enumerable: false,
7456
+ configurable: true
7457
+ });
7458
+ ViewModelInstanceList.prototype.addInstance = function (instance) {
7459
+ if (instance.runtimeInstance != null) {
7460
+ this._viewModelInstanceValue.addInstance(instance.runtimeInstance);
7461
+ }
7462
+ };
7463
+ ViewModelInstanceList.prototype.removeInstance = function (instance) {
7464
+ if (instance.runtimeInstance != null) {
7465
+ this._viewModelInstanceValue.removeInstance(instance.runtimeInstance);
7466
+ }
7467
+ };
7468
+ ViewModelInstanceList.prototype.removeInstanceAt = function (index) {
7469
+ this._viewModelInstanceValue.removeInstanceAt(index);
7470
+ };
7471
+ ViewModelInstanceList.prototype.instanceAt = function (index) {
7472
+ var runtimeInstance = this._viewModelInstanceValue.instanceAt(index);
7473
+ if (runtimeInstance != null) {
7474
+ var viewModelInstance = new ViewModelInstance(runtimeInstance, null);
7475
+ return viewModelInstance;
7476
+ }
7477
+ return null;
7478
+ };
7479
+ ViewModelInstanceList.prototype.internalHandleCallback = function (callback) {
7480
+ callback();
7481
+ };
7482
+ return ViewModelInstanceList;
7483
+ }(ViewModelInstanceValue));
7484
+
7429
7485
  var ViewModelInstanceColor = /** @class */ (function (_super) {
7430
7486
  __extends(ViewModelInstanceColor, _super);
7431
7487
  function ViewModelInstanceColor(instance, parent) {