Releases: tweenjs/tween.js
v23.1.2 - yo yo yo yo!
What's Changed
- fix yoyo repeat bug by @humodz in #683
- Change the Easing.Linear methods to pure function so that saving them to a variable and calling them won't error. F.e. this no longer errors:
let in = TWEEN.Easing.Linear.In; in()
. by @soumen-pradhan in #682
New Contributors
- @humodz made their first contribution in #682
- @soumen-pradhan made their first contribution in #682
Full Changelog: v23.1.1...v23.1.2
v23.1.1
What's Changed
- fixbug:when duration is negative,there should has no animate,not a bad result by @jackletter in #669
New Contributors
- @jackletter made their first contribution in #669
Full Changelog: v23.1.0...v23.1.1
v23.0.0 - Time Travel
What's Changed
- Add : tests for onRepeat callback by @MasatoMakino in #609
- Handling of repeats with browser tab sleep by @MasatoMakino in #564
- When updates are skipped (f.e. due to
requestAnimationFrame
not firing for unfocused tabs) and then start firing again later, things now work (tweens can travel properly into the future).
- When updates are skipped (f.e. due to
- BREAKING: negative values for
.delay()
are no longer valid (it was not a documented feature). See df82146 for migration example. - Update examples to avoid removed features by @trusktr
Full Changelog: v22.0.0...v23.0.0
v22.0.0 - CommonJS is not so common anymore!
But! Some people might still be using it, so:
Fixes
- Fix CJS entry point by @inukshuk in #659, thanks!
- BREAKING: This is a potentially breaking change because
dist/index.cjs.js
was renamed todist/index.cjs
. If you relied ondist/index.cjs.js
, update your paths and you'll be good to go.
- BREAKING: This is a potentially breaking change because
New Contributors
Full Changelog: v21.1.1...v22.0.0
v21.1.1 - TypeScript all day every day!
Fixes:
- fix the
exports
field so that types will be discoverable by TypeScript out of the box when importing tween.js into a TS project. Thanks @tazyong @jramstedt @keiya01!
Docs:
- fix broken tutorial link. Thanks @victorbnl!
Full Changelog: v21.0.0...v21.1.1
v21.0.0 - Back to the Future
Docs:
Possibly Breaking Change:
- 283e66e - An
exports
field was added topackage.json
to make it compatible with ESM tools (to override themain
field currently pointing at a CommonJS file which doesn't make sense for ESM, but does for old Node.js). To be safe, we made this a major version because there's a chance it can break someone's app (f.e. if they imported from dist/ directly, that will now be blocked, and they would need to changeimport ... from '@tweenjs/tween.js/dist/tween.esm.js'
toimport ... from '@tweenjs/tween.js'
). Thanks for this @christjt!
v20.0.0 - Good luck, bunnies!
You won't be able to outrun the fox!
Fixes
- Fixed the video_and_time example which sometimes didn't play a video.
Breaking changes:
- By default, the "dynamic to" feature is no longer enabled. To enable it, you must now enable it with
tween.dynamic(true)
.Warning When
dynamic
is set tofalse
, Tween makes a copy of the object passed intotween.to()
and will never modify it (hence updating the original object from the outside is not dynamic). Whendynamic
istrue
, Tween uses the original object as the source of values during animation (every update reads the values, hence they can be modified dynamically) but note that in dynamic mode, Tween will modify any interpolation arrays of the object passed intotween.to()
which may cause side-effects on any external code that may also rely on the same object.
We've added two new dynamic_to examples. In each example, when dynamic is disabled, the fox cannot catch any rabbits. When dynamic is enabled, the rabbits have no chance! tween.to()
now throws if it is called when a tween is started (even if paused). Calltween.stop()
first before setting a new.to()
value.
v19.0.0 - Stop the monkeys!
Breaking change:
- The
Easing
object is no longer monkey-patchable, i.e. it has been frozen withObject.freeze()
. If you relied on patchingEasing
, instead you should use alternative references for the easing functions you wish to use.
From now on we will also keep the changelog updated with each release so that it is easy to see what changed and if any migration is needed for breaking changes.
v18.6.4
v17.6
Reverted a breaking change from v17.3.0 to v17.3.2 (v17.3.1 was never released) that broke dynamic-to with array interpolation values.
In v17.6, objects passed to tween.to()
that have interpolation arrays will be modified as before v17.3.2, and those objects can be modified on the outside during animation to update interpolation values dynamically.
v18 contains the new behavior where the object passed into to()
is prototypically copied and never modified, but that prevents dynamic interpolation values during animations (the breaking change is suitable for the major version bump from 17 to 18).
A following major version will provide a new dynamic
option to the to()
method for choosing the desired behavior.