diff --git a/dist/tween.amd.js b/dist/tween.amd.js index 85ceb1ea..3f442f12 100644 --- a/dist/tween.amd.js +++ b/dist/tween.amd.js @@ -769,7 +769,7 @@ define(['exports'], (function (exports) { 'use strict'; } this._onEveryStartCallbackFired = true; } - var elapsedTime = time - this._startTime; + var elapsedTime = this._yoyo ? Math.min(time - this._startTime, this._duration) : time - this._startTime; var durationAndDelay = this._duration + ((_a = this._repeatDelayTime) !== null && _a !== void 0 ? _a : this._delayTime); var totalTime = this._duration + this._repeat * durationAndDelay; var calculateElapsedPortion = function () { @@ -894,7 +894,7 @@ define(['exports'], (function (exports) { 'use strict'; return Tween; }()); - var VERSION = '25.0.0'; + var VERSION = '25.0.1'; /** * Tween.js - Licensed under the MIT license diff --git a/dist/tween.cjs b/dist/tween.cjs index 924fcea8..ffe1b00a 100644 --- a/dist/tween.cjs +++ b/dist/tween.cjs @@ -771,7 +771,7 @@ var Tween = /** @class */ (function () { } this._onEveryStartCallbackFired = true; } - var elapsedTime = time - this._startTime; + var elapsedTime = this._yoyo ? Math.min(time - this._startTime, this._duration) : time - this._startTime; var durationAndDelay = this._duration + ((_a = this._repeatDelayTime) !== null && _a !== void 0 ? _a : this._delayTime); var totalTime = this._duration + this._repeat * durationAndDelay; var calculateElapsedPortion = function () { @@ -896,7 +896,7 @@ var Tween = /** @class */ (function () { return Tween; }()); -var VERSION = '25.0.0'; +var VERSION = '25.0.1'; /** * Tween.js - Licensed under the MIT license diff --git a/dist/tween.d.ts b/dist/tween.d.ts index 36f7c930..f19535e6 100644 --- a/dist/tween.d.ts +++ b/dist/tween.d.ts @@ -196,7 +196,7 @@ declare class Sequence { static nextId(): number; } -declare const VERSION = "25.0.0"; +declare const VERSION = "25.0.1"; declare const nextId: typeof Sequence.nextId; /** diff --git a/dist/tween.esm.js b/dist/tween.esm.js index 709871d1..f3080459 100644 --- a/dist/tween.esm.js +++ b/dist/tween.esm.js @@ -767,7 +767,7 @@ var Tween = /** @class */ (function () { } this._onEveryStartCallbackFired = true; } - var elapsedTime = time - this._startTime; + var elapsedTime = this._yoyo ? Math.min(time - this._startTime, this._duration) : time - this._startTime; var durationAndDelay = this._duration + ((_a = this._repeatDelayTime) !== null && _a !== void 0 ? _a : this._delayTime); var totalTime = this._duration + this._repeat * durationAndDelay; var calculateElapsedPortion = function () { @@ -892,7 +892,7 @@ var Tween = /** @class */ (function () { return Tween; }()); -var VERSION = '25.0.0'; +var VERSION = '25.0.1'; /** * Tween.js - Licensed under the MIT license diff --git a/dist/tween.umd.js b/dist/tween.umd.js index 50f3ae3b..79a8877b 100644 --- a/dist/tween.umd.js +++ b/dist/tween.umd.js @@ -773,7 +773,7 @@ } this._onEveryStartCallbackFired = true; } - var elapsedTime = time - this._startTime; + var elapsedTime = this._yoyo ? Math.min(time - this._startTime, this._duration) : time - this._startTime; var durationAndDelay = this._duration + ((_a = this._repeatDelayTime) !== null && _a !== void 0 ? _a : this._delayTime); var totalTime = this._duration + this._repeat * durationAndDelay; var calculateElapsedPortion = function () { @@ -898,7 +898,7 @@ return Tween; }()); - var VERSION = '25.0.0'; + var VERSION = '25.0.1'; /** * Tween.js - Licensed under the MIT license diff --git a/examples/10_yoyo.html b/examples/10_yoyo.html index 2045ce36..8b8c813e 100644 --- a/examples/10_yoyo.html +++ b/examples/10_yoyo.html @@ -37,6 +37,9 @@