@rive-app/canvas-lite 2.37.6 → 2.37.7

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/canvas-lite",
3
- "version": "2.37.6",
3
+ "version": "2.37.7",
4
4
  "description": "A lite version of Rive's canvas based web api.",
5
5
  "main": "rive.js",
6
6
  "homepage": "https://rive.app",
package/rive.js CHANGED
@@ -2546,7 +2546,7 @@ moduleRtn = da;
2546
2546
  /* 5 */
2547
2547
  /***/ ((module) => {
2548
2548
 
2549
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.37.6","description":"A lite version of 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.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts","runtimeLoader.d.ts","utils"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
2549
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.37.7","description":"A lite version of 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.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts","runtimeLoader.d.ts","utils"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
2550
2550
 
2551
2551
  /***/ }),
2552
2552
  /* 6 */
@@ -5009,7 +5009,16 @@ var Rive = /** @class */ (function () {
5009
5009
  // Get the canvas where you want to render the animation and create a renderer
5010
5010
  if (_this.enablePerfMarks)
5011
5011
  performance.mark('rive:make-renderer:start');
5012
- _this.renderer = _this.runtime.makeRenderer(_this.canvas, useOffscreenRenderer);
5012
+ try {
5013
+ _this.renderer = _this.runtime.makeRenderer(_this.canvas, useOffscreenRenderer);
5014
+ if (!_this.renderer) {
5015
+ throw new Error("Renderer is null, cannot render Rive on the canvas.");
5016
+ }
5017
+ }
5018
+ catch (e) {
5019
+ console.error(e);
5020
+ throw new RiveError("Unable to create the renderer, your environment may not support WebGL. Try the @rive-app/canvas runtime as an alternative.");
5021
+ }
5013
5022
  if (_this.enablePerfMarks) {
5014
5023
  performance.mark('rive:make-renderer:end');
5015
5024
  performance.measure('rive:make-renderer', 'rive:make-renderer:start', 'rive:make-renderer:end');