@rive-app/canvas-single 1.0.74 → 1.0.75
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 -6
- package/rive.js.map +1 -1
package/package.json
CHANGED
package/rive.js
CHANGED
|
@@ -141,7 +141,7 @@ k.run=Fc;if(k.preInit)for("function"==typeof k.preInit&&(k.preInit=[k.preInit]);
|
|
|
141
141
|
/* 2 */
|
|
142
142
|
/***/ ((module) => {
|
|
143
143
|
|
|
144
|
-
module.exports = JSON.parse('{"name":"@rive-app/canvas-single","version":"1.0.
|
|
144
|
+
module.exports = JSON.parse('{"name":"@rive-app/canvas-single","version":"1.0.75","description":"Rive\'s high-level canvas based web api all in one js file.","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.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
145
145
|
|
|
146
146
|
/***/ }),
|
|
147
147
|
/* 3 */
|
|
@@ -1516,8 +1516,12 @@ var Rive = /** @class */ (function () {
|
|
|
1516
1516
|
if (this.eventCleanup !== null) {
|
|
1517
1517
|
this.eventCleanup();
|
|
1518
1518
|
}
|
|
1519
|
-
|
|
1520
|
-
|
|
1519
|
+
// Delete all animation and state machine instances
|
|
1520
|
+
this.stop();
|
|
1521
|
+
if (this.artboard) {
|
|
1522
|
+
this.artboard.delete();
|
|
1523
|
+
this.artboard = null;
|
|
1524
|
+
}
|
|
1521
1525
|
};
|
|
1522
1526
|
// Plays specified animations; if none specified, it unpauses everything.
|
|
1523
1527
|
Rive.prototype.play = function (animationNames, autoplay) {
|
|
@@ -1590,7 +1594,6 @@ var Rive = /** @class */ (function () {
|
|
|
1590
1594
|
var stateMachineNames = mapToStringArray(params === null || params === void 0 ? void 0 : params.stateMachines);
|
|
1591
1595
|
var autoplay = (_a = params === null || params === void 0 ? void 0 : params.autoplay) !== null && _a !== void 0 ? _a : false;
|
|
1592
1596
|
// Stop everything and clean up
|
|
1593
|
-
this.stop();
|
|
1594
1597
|
this.cleanup();
|
|
1595
1598
|
// Reinitialize an artboard instance with the state
|
|
1596
1599
|
this.initArtboard(artBoardName, animationNames, stateMachineNames, autoplay);
|
|
@@ -1667,7 +1670,7 @@ var Rive = /** @class */ (function () {
|
|
|
1667
1670
|
* Returns the name of the active artboard
|
|
1668
1671
|
*/
|
|
1669
1672
|
get: function () {
|
|
1670
|
-
return this.artboard.name;
|
|
1673
|
+
return this.artboard ? this.artboard.name : "";
|
|
1671
1674
|
},
|
|
1672
1675
|
enumerable: false,
|
|
1673
1676
|
configurable: true
|
|
@@ -1873,7 +1876,7 @@ var Rive = /** @class */ (function () {
|
|
|
1873
1876
|
* renderer is already active, then this will have zero effect.
|
|
1874
1877
|
*/
|
|
1875
1878
|
Rive.prototype.startRendering = function () {
|
|
1876
|
-
if (this.loaded && !this.frameRequestId) {
|
|
1879
|
+
if (this.loaded && this.artboard && !this.frameRequestId) {
|
|
1877
1880
|
if (this.runtime.requestAnimationFrame) {
|
|
1878
1881
|
this.frameRequestId = this.runtime.requestAnimationFrame(this.draw.bind(this));
|
|
1879
1882
|
}
|