Simple and fast tweening engine with optimised Robert Penner's equations.
Last release 2 years ago
no release in 18 months
Ships unpredictably
gaps range from 8 days to 2.4 years
Some releases are documented
notes for 16 of 48 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
49 releases · first in 2017
Release timeline
49 releases since 2017Releases
- 25.0.026 Jul 2024
Release notes
Open source →BREAKING: no longer auto-start tweens by default when calling
tween.update(). To restore previous behavior for the whole app, set the staticTween.autoStartOnUpdateproperty totrue.fix: make the
end()method work better by setting the end time to start + duration instead of Infinity.Full Changelog: https://github.com/tweenjs/tween.js/compare/v24.0.0...v25.0.0
- 24.0.026 Jul 2024
Release notes
Open source →This release finally deprecates usage of
TWEENas a defaultGroup. Allnew Tweens now default to having no group, and must be explicitly added to a group if desired. Plus some other improvements to related to groups, including breaking changes (see below for all details and how to migrate if affected).What's Changed
- Tiny readme fix for import-map example code. by @Bug-Reaper in https://github.com/tweenjs/tween.js/pull/685
- do not default to global TWEEN group for new Tweens, do not auto-add/remove tweens from groups, and update docs accordingly by @trusktr in https://github.com/tweenjs/tween.js/pull/688
New Contributors
- @Bug-Reaper made their first contribution in https://github.com/tweenjs/tween.js/pull/685
More Details
feat: do not automatically add/remove a tween to/from its associated group, and do not automatically add
new Tweens to the globalTWEENgroup by default.feat: the
tween.group(group)method now has a reciprocaltween.remove()method that will remove a tween from its associated group, and unassociate the group.tween.group()without an arg is no longer valid, see breaking changes and migration below.fix: when a tween is stopped before its end time, do not allow its update method to continue, therefore preventing logic (f.e. repeat logic) from being triggered
docs: improved the docs, adding some missing information, removing all examples of the global
TWEENgroup which has been deprecated, and adding docs on how to manage groups of tweens. Also updated samples to useimportsyntax for importing Tween, avoiding the use of theTWEENUMD global variable which has been deprecated.feat: A new
Group.allStopped()method returns true if all tweens in a group are not playing (i.e. stopped, and not paused), otherwise false. Useful for stopping an animation loop once all tweens in a group have finished their animation.deprecated: Methods on
TWEENthat come fromGroupare now deprecated to be removed in a future major version. Migrate forward by making anew Groupinstead of usingTWEENas a group.deprecated: The UMD script that creates a global
TWEENvariable is deprecated to be removed in a future major version.deprecated: The CommonJS build is deprecated to be removed in a future major version.
BREAKING:
- Tweens are no longer automatically added or removed from groups by default when you call any Tween methods such as
start(),stop(), orpause(), and thepreserveparameter toGroup.update()now defaults totrueand is deprecated to be removed in a future major version.- MIGRATION: To keep old behavior for a while, explicitly call
group.update()withfalsefor the second parameter. To migrate forward, do not rely on automatic add/remove of tweens, and instead add/remove tweens to/from groups manually.
- MIGRATION: To keep old behavior for a while, explicitly call
Group.update()no longer returns a boolean indicating if all tweens have been removed.- MIGRATION: Don't rely on auto-add/remove to/from groups. This boolean return was previously useful for stopping an animation loop once all tweens were finished animating. Instead, use the new
Group.allStopped()method to check if all tweens in a group are stopped in order to determine whether or not to continue an animation loop.
- MIGRATION: Don't rely on auto-add/remove to/from groups. This boolean return was previously useful for stopping an animation loop once all tweens were finished animating. Instead, use the new
- The second
groupparameter toTween.constructornow defaults toundefinedinstead of the globalTWEENgroup. Additionally it accepts a value oftrueto restore the old default behavior. Thetruevalue is deprecated and will be removed in a future major version.- MIGRATION: For the time being the parameter can be set to
trueto restore the old behavior. To migrate forward, usetween.group(group)orgroup.add(tween)instead.
- MIGRATION: For the time being the parameter can be set to
- The argless
tween.group()signature has been removed.- MIGRATION: Use
group.add(tween)orgroup.remove(tween)instead.tween.group(TWEEN),TWEEN.add(tween), andTWEEN.remove(tween)will also work for now, but they are deprecated and will be removed in a future major version.
- MIGRATION: Use
Group.update's second parameterpreservedefaults totruenow, and is deprecated to be removed in a future major version, at which point tweens of a group will no longer be automatically added/remove to/from a group when calling any Tween methods such asstart(),pause(), orstop().- MIGRATION: For now, explicitly set the parameter to
falseto restore old default behavior when callinggroup.update(). To migrate forward, do not rely on the automatic add/remove behavior, and instead manually add or remove tweens to or from groups.
- MIGRATION: For now, explicitly set the parameter to
- To make the fix for
tween.update()to be a no-op for stopped tweens, we had to break an undocumented feature that allowed tweens to move backward in time (https://github.com/tweenjs/tween.js/pull/271).- MIGRATION: To move tweens backward in time after they have already completed, first call
tween.start(startTime)then proceed to calltween.update(time)in reverse order as before (see the unit test with "go backward in time" in its name). Without callingtween.start()nothing will happen because stopped/completed tweens will now always return early fromupdate(), as they are considered to be no longer running.
- MIGRATION: To move tweens backward in time after they have already completed, first call
Full Changelog: https://github.com/tweenjs/tween.js/compare/v23.1.3...v24.0.0
- 23.1.325 Jul 2024
Release notes
Open source →Unfortunately we had to revert the fix for yoyo in v23.1.2 because it broke the yoyo demo. lol
- #687
So, this ironically fixes yoyo so that it is more fixed than how fixed we thought it was, and we will have to circle back to #677 again get yoyo even more fixed. 🥴
Full Changelog: https://github.com/tweenjs/tween.js/compare/v23.1.2...v23.1.3
- 23.1.25 May 2024
Release notes
Open source →What's Changed
- fix yoyo repeat bug by @humodz in https://github.com/tweenjs/tween.js/pull/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 https://github.com/tweenjs/tween.js/pull/682
New Contributors
- @humodz made their first contribution in https://github.com/tweenjs/tween.js/pull/682
- @soumen-pradhan made their first contribution in https://github.com/tweenjs/tween.js/pull/682
Full Changelog: https://github.com/tweenjs/tween.js/compare/v23.1.1...v23.1.2
- 23.1.115 Jan 2024
Release notes
Open source →What's Changed
- fixbug:when duration is negative,there should has no animate,not a bad result by @jackletter in https://github.com/tweenjs/tween.js/pull/669
New Contributors
- @jackletter made their first contribution in https://github.com/tweenjs/tween.js/pull/669
Full Changelog: https://github.com/tweenjs/tween.js/compare/v23.1.0...v23.1.1
- 23.1.015 Jan 2024
Nothing published for this version
- 23.0.015 Jan 2024
Release notes
Open source →What's Changed
- Add : tests for onRepeat callback by @MasatoMakino in https://github.com/tweenjs/tween.js/pull/609
- Handling of repeats with browser tab sleep by @MasatoMakino in https://github.com/tweenjs/tween.js/pull/564
- When updates are skipped (f.e. due to
requestAnimationFramenot 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 df8214619f671162034b9c881f81eafcdcbcad92 for migration example. - Update examples to avoid removed features by @trusktr
Full Changelog: https://github.com/tweenjs/tween.js/compare/v22.0.0...v23.0.0
- 22.0.015 Jan 2024
Release notes
Open source →But! Some people might still be using it, so:
Fixes
- Fix CJS entry point by @inukshuk in https://github.com/tweenjs/tween.js/pull/659, thanks!
- BREAKING: This is a potentially breaking change because
dist/index.cjs.jswas 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
- @inukshuk made their first contribution in https://github.com/tweenjs/tween.js/pull/659
Full Changelog: https://github.com/tweenjs/tween.js/compare/v21.1.1...v22.0.0
- Fix CJS entry point by @inukshuk in https://github.com/tweenjs/tween.js/pull/659, thanks!
- 21.1.115 Jan 2024
Release notes
Open source →Fixes:
- fix the
exportsfield 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: https://github.com/tweenjs/tween.js/compare/v21.0.0...v21.1.1
- fix the
- 21.1.014 Jan 2024
Nothing published for this version
- 21.0.023 Jun 2023
Release notes
Open source →Docs:
- bf50c1f529a96b646e3c5fffececb918c4ea7384- Chinese docs up to date with the latest English source. Thanks @mk965! 🎉
Possibly Breaking Change:
- 283e66e3b1d3c90cfd186b1b6ea83bb5c542cb56 - An
exportsfield was added topackage.jsonto make it compatible with ESM tools (to override themainfield 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!
- 20.0.323 Apr 2023
Nothing published for this version
- 20.0.223 Apr 2023
Nothing published for this version
- 20.0.123 Apr 2023
Nothing published for this version
- 20.0.023 Apr 2023
Release notes
Open source →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
dynamicis 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). Whendynamicistrue, 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.
- 19.0.02 Apr 2023
Release notes
Open source →Breaking change:
- The
Easingobject 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.
- The
- 18.6.422 Oct 2020
Nothing published for this version
- 18.6.322 Oct 2020
Nothing published for this version
- 18.6.220 Oct 2020
Nothing published for this version
- 18.6.120 Oct 2020
Nothing published for this version
- 18.6.021 Jun 2020
Nothing published for this version
- 18.5.09 Dec 2019
Nothing published for this version
- 18.4.26 Nov 2019
Nothing published for this version
- 18.4.16 Nov 2019
Nothing published for this version
- 18.3.231 Oct 2019
Nothing published for this version
- 18.3.110 Sept 2019
Nothing published for this version
- 18.3.010 Sept 2019
Nothing published for this version
- 18.2.29 Sept 2019
Nothing published for this version
- 18.2.09 Sept 2019
Nothing published for this version
- 18.1.22 Sept 2019
Nothing published for this version
- 18.1.02 Sept 2019
Nothing published for this version
- 18.0.01 Sept 2019
Release notes
Open source →The update to v18 was largely foundational: removal of bower and update of scripts and CI. It may break someone using Bower to install from git, hence the major bump.
Breaking:
- The script you should include has moved from
src/Tween.jstodist/tween.umd.jsfor global<script>tags. See the install guide. - Relative start values were removed (they were not documented).
- Migration:
- Before:
tween.start('+100') - After:
tween.delay(100).start()
- Before:
- Migration:
- The script you should include has moved from
- 17.6.024 Oct 2020
Release notes
Open source →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
dynamicoption to theto()method for choosing the desired behavior. - 17.4.027 May 2019
Release notes
Open source → - 17.3.527 May 2019
Nothing published for this version
- 17.3.226 May 2019
Nothing published for this version
- 17.3.028 Jan 2019
Nothing published for this version
- 17.2.024 Jan 2018
Nothing published for this version
- 17.1.115 Sept 2017
Nothing published for this version
- 17.1.027 Jul 2017
Nothing published for this version
- 16.11.027 Jul 2017
Nothing published for this version
- 16.10.021 Jul 2017
Nothing published for this version
- 16.9.020 Jul 2017
Nothing published for this version
- 16.8.227 May 2019
Nothing published for this version
- 16.8.127 May 2019
Nothing published for this version
- 16.8.030 Jun 2017
Nothing published for this version
- 16.7.011 Jun 2017
Release notes
Open source →<a name"16.7.0"></a>
16.7.0 (2017-06-11)
Features
- moving the npm package to @tweenjs/tween.js. The old tweenjs package will be dep (8b869c43)
- 16.6.011 Jun 2017
Release notes
Open source →<a name"16.6.0"></a>
16.6.0 (2017-01-26)
Features
- fix wrong contributing urls again. sigh (ae085330)
- 0.0.0-development11 Jun 2017pre-release
Nothing published for this version