tween.js icon indicating copy to clipboard operation
tween.js copied to clipboard

it would be nice to be able to get the duration we assign to a tween

Open cesarl94 opened this issue 4 years ago • 1 comments

cesarl94 avatar Mar 01 '21 15:03 cesarl94

It's stored on this property:

https://github.com/tweenjs/tween.js/blob/ae24c58c8b57b2079151ae2c3c63f2bb501c8b2b/src/Tween.ts#L26

In plain JS, just read it:

console.log(tween._duration)

But it is marked as private if you're using TypeScript.

I think we can do something special like duration() without an argument returning the current value, or something.

trusktr avatar Mar 01 '21 20:03 trusktr

available in v23.1.0

trusktr avatar Jan 15 '24 07:01 trusktr