@rive-app/canvas-lite 2.38.0 → 2.38.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.js +9 -4
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +17 -3
- package/rive_fallback.wasm +0 -0
package/package.json
CHANGED
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.38.
|
|
2549
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.38.2","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 */
|
|
@@ -5749,10 +5749,15 @@ var Rive = /** @class */ (function () {
|
|
|
5749
5749
|
* Rive class
|
|
5750
5750
|
*/
|
|
5751
5751
|
Rive.prototype.cleanup = function () {
|
|
5752
|
-
var _a, _b;
|
|
5752
|
+
var _a, _b, _c, _d;
|
|
5753
5753
|
this.destroyed = true;
|
|
5754
5754
|
// Stop the renderer if it hasn't already been stopped.
|
|
5755
5755
|
this.stopRendering();
|
|
5756
|
+
// Make the GL context backing this renderer current before any WASM teardown
|
|
5757
|
+
// that frees GPU resources. Binding here covers the artboard/file deletes;
|
|
5758
|
+
// deleteRiveRenderer() re-binds for the renderer's own delete. No-op on the
|
|
5759
|
+
// canvas2d build
|
|
5760
|
+
(_b = (_a = this.renderer) === null || _a === void 0 ? void 0 : _a.bindContext) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
5756
5761
|
// Clean up any artboard, animation or state machine instances.
|
|
5757
5762
|
this.cleanupInstances();
|
|
5758
5763
|
// Remove from observer
|
|
@@ -5761,7 +5766,7 @@ var Rive = /** @class */ (function () {
|
|
|
5761
5766
|
}
|
|
5762
5767
|
this.removeRiveListeners();
|
|
5763
5768
|
if (this.file) {
|
|
5764
|
-
(
|
|
5769
|
+
(_c = this.riveFile) === null || _c === void 0 ? void 0 : _c.cleanup();
|
|
5765
5770
|
this.file = null;
|
|
5766
5771
|
}
|
|
5767
5772
|
this.riveFile = null;
|
|
@@ -5774,7 +5779,7 @@ var Rive = /** @class */ (function () {
|
|
|
5774
5779
|
document.removeEventListener('visibilitychange', this._pageVisibilityHandler);
|
|
5775
5780
|
this._pageVisibilityHandler = null;
|
|
5776
5781
|
}
|
|
5777
|
-
(
|
|
5782
|
+
(_d = this._viewModelInstance) === null || _d === void 0 ? void 0 : _d.cleanup();
|
|
5778
5783
|
this._viewModelInstance = null;
|
|
5779
5784
|
this._dataEnums = null;
|
|
5780
5785
|
};
|