@rive-app/canvas 1.0.2 → 1.0.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/rive.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rive-app/canvas",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Rive's canvas based web api.",
5
5
  "main": "rive.js",
6
6
  "homepage": "https://rive.app",
package/rive.js CHANGED
@@ -121,7 +121,7 @@ if(h.preInit)for("function"==typeof h.preInit&&(h.preInit=[h.preInit]);0<h.preIn
121
121
  /* 2 */
122
122
  /***/ ((module) => {
123
123
 
124
- module.exports = JSON.parse('{"name":"@rive-app/canvas","version":"1.0.2","description":"Rive\'s canvas 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"],"typings":"rive.d.ts","dependencies":{}}');
124
+ module.exports = JSON.parse('{"name":"@rive-app/canvas","version":"1.0.3","description":"Rive\'s canvas 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"],"typings":"rive.d.ts","dependencies":{}}');
125
125
 
126
126
  /***/ })
127
127
  /******/ ]);
@@ -1092,6 +1092,8 @@ var Rive = /** @class */ (function () {
1092
1092
  // Ensure the runtime is loaded
1093
1093
  RuntimeLoader.awaitInstance().then(function (runtime) {
1094
1094
  _this.runtime = runtime;
1095
+ // Get the canvas where you want to render the animation and create a renderer
1096
+ _this.renderer = _this.runtime.makeRenderer(_this.canvas);
1095
1097
  // Load Rive data from a source uri or a data buffer
1096
1098
  _this.initData(artboard, startingAnimationNames, startingStateMachineNames, autoplay).catch(function (e) {
1097
1099
  console.error(e);
@@ -1171,8 +1173,6 @@ var Rive = /** @class */ (function () {
1171
1173
  }
1172
1174
  // Initialize the animator
1173
1175
  this.animator = new Animator(this.runtime, this.artboard, this.eventManager);
1174
- // Get the canvas where you want to render the animation and create a renderer
1175
- this.renderer = this.runtime.makeRenderer(this.canvas);
1176
1176
  // Initialize the animations; as loaded hasn't happened yet, we need to
1177
1177
  // suppress firing the play/pause events until the load event has fired. To
1178
1178
  // do this we tell the animator to suppress firing events, and add event