modern-canvas 0.24.4 → 0.24.5
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/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5072,8 +5072,8 @@ var yr = class {
|
|
|
5072
5072
|
return this;
|
|
5073
5073
|
}
|
|
5074
5074
|
addTime(e) {
|
|
5075
|
-
let t = this.endTime, n = Math.min(this.startTime, this.endTime), r = this.currentTime;
|
|
5076
|
-
return
|
|
5075
|
+
let t = this.endTime, n = Math.min(this.startTime, this.endTime), r = t - n, i = this.currentTime + e;
|
|
5076
|
+
return this.loop && r > 0 && i > t && (i = n + (i - n) % r), i = D(i, n, t), this.currentTime = i, this.emit("updateCurrentTime", i, e), this;
|
|
5077
5077
|
}
|
|
5078
5078
|
play(e) {
|
|
5079
5079
|
return e?.rate !== void 0 && (this._rate = e.rate), e?.loopMode !== void 0 && (this.loopMode = e.loopMode), this._direction = 1, (!Number.isFinite(this.currentTime) || this.currentTime >= this.endTime) && (this.currentTime = Math.min(this.startTime, this.endTime)), this.playing = !0, this.playbackRate = this._rate * this._direction, this;
|