Skip to content

Commit

Permalink
Merge pull request #606 from tweenjs/remove-string-arg-from-start-method
Browse files Browse the repository at this point in the history
remove support for string arguments to start and mark the argument as…
  • Loading branch information
trusktr authored Apr 27, 2021
2 parents 07e3472 + 2733e64 commit d8b4f09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Tween.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class Tween<T extends UnknownProps> {
return this
}

start(time?: number): this {
start(time: number = now()): this {
if (this._isPlaying) {
return this
}
Expand Down Expand Up @@ -108,7 +108,7 @@ export class Tween<T extends UnknownProps> {

this._isChainStopped = false

this._startTime = time !== undefined ? (typeof time === 'string' ? now() + parseFloat(time) : time) : now()
this._startTime = time
this._startTime += this._delayTime

this._setupProperties(this._object, this._valuesStart, this._valuesEnd, this._valuesStartRepeat)
Expand Down

0 comments on commit d8b4f09

Please sign in to comment.