{"id":16405618,"url":"https://github.com/multirious/bevy_tween","last_synced_at":"2025-04-12T23:43:19.744Z","repository":{"id":225529511,"uuid":"766219646","full_name":"Multirious/bevy_tween","owner":"Multirious","description":"Flexible tweening plugin library for Bevy.","archived":false,"fork":false,"pushed_at":"2025-03-28T08:54:34.000Z","size":11016,"stargazers_count":115,"open_issues_count":2,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T23:43:02.347Z","etag":null,"topics":["animation","animator","bevy","bevy-plugin","rust","tween","tweener","tweening","tweening-library"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Multirious.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-02T16:58:52.000Z","updated_at":"2025-04-02T10:40:51.000Z","dependencies_parsed_at":"2024-12-20T10:09:01.309Z","dependency_job_id":"0e216bf7-71eb-49e7-91f4-b8ee4fd4bf7f","html_url":"https://github.com/Multirious/bevy_tween","commit_stats":{"total_commits":379,"total_committers":4,"mean_commits":94.75,"dds":"0.20052770448548818","last_synced_commit":"a8b88d4820f2a2d8a59f31598f2ea0a511466214"},"previous_names":["multirious/bevy_tween"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Multirious%2Fbevy_tween","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Multirious%2Fbevy_tween/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Multirious%2Fbevy_tween/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Multirious%2Fbevy_tween/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Multirious","download_url":"https://codeload.github.com/Multirious/bevy_tween/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647256,"owners_count":21139081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animation","animator","bevy","bevy-plugin","rust","tween","tweener","tweening","tweening-library"],"created_at":"2024-10-11T06:06:43.245Z","updated_at":"2025-04-12T23:43:19.717Z","avatar_url":"https://github.com/Multirious.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/Multirious/bevy_tween/assets/77918086/38ab44e1-67a4-4c2d-b17c-3a35128e6930\" width=\"100%\"/\u003e\n\n[![Crates.io Version](https://img.shields.io/crates/v/bevy_tween?style=for-the-badge)](https://crates.io/crates/bevy_tween)\n[![Crates.io License](https://img.shields.io/crates/l/bevy_tween?style=for-the-badge)](https://github.com/Multirious/bevy_tween/blob/main/README.md#license)\n[![Docs.rs](https://img.shields.io/docsrs/bevy_tween?style=for-the-badge)](https://docs.rs/bevy_tween)\n\n# `bevy_tween`\n\n[Bevy](https://github.com/bevyengine/bevy) procedural and keyframe animation library.\n\nThis is a young plugin and APIs are to be fleshed out.\nBreaking changes are to be expected!\n\nSee changelog [here](CHANGELOG.md).\n\n## Features\n- **Ergonomic and user-friendly API**: This crate provides functional animation\n  framework, inspired by [nom](https://crates.io/crates/nom) and other functional\n  languages, which allows for declarative animation.\n  \u003cdetails\u003e\n  \u003csummary\u003eExample\u003c/summary\u003e\n\n  ```rust\n  let sprite_id = commands.spawn(SpriteBundle { ... }).id();\n  let sprite = sprite_id.into_target();\n  commands.animation()\n      .insert(tween(\n          Duration::from_secs(1),\n          EaseKind::Linear,\n          sprite.with(translation(pos0, pos1))\n      ));\n  ```\n\n  Many functional techniques are available such as decoupling and composition.\n  ```rust\n  fn my_animation(\n      target: TargetComponent,\n      duration: Duration\n  ) -\u003e impl FnOnce(\u0026mut AnimationCommands, \u0026mut Duration) {\n      parallel((\n          tween(duration, EaseKind::QuadraticOut, target.with(translation(...))),\n          tween(duration, EaseKind::QuadraticOut, target.with(rotation(...))),\n      ))\n  }\n\n  let sprite_id = commands.spawn(Sprite { ... }).id();\n  let sprite = sprite_id.into_target();\n  commands.animation().insert(my_animation(sprite, Duration::from_secs(1)))\n  ```\n\n  \u003c/details\u003e\n- **Flexible and Extensible**: This crate is built on top of [`bevy_time_runner`](https://github.com/Multirious/bevy_time_runner)\n  which mean we can extend this crate by adding *any* components and systems.\n  - Tween anything from anywhere, built-in or custom system.\n  - Interpolate with any curve, built-in or custom system.\n  - Anything else.\n\n- **Parallelism**: Tweens are typed and can be query over by their typed system\n  which increase chances for system parallelism.\n- **Rich timer control**:\n  - Looping\n  - Time scaling\n  - Skip backward or forward\n  - Jumping to anywhen\n\nSee [demos](#Demos)\n\nGoals:\n- [x] Flexible 🎉\n- integration with other crates (?)\n  - [ ] `bevy_animation`\n  - [x] `bevy_lookup_curve`\n- [ ] Editor. While the original goal for this crate is tweening from code,\n       this crate absolutely has the capability to work on any complex animations.\n       The editor will aid in such jobs.\n  - Real-time display at any point in time in the animation.\n  - Editing path from point A to point B with arbitary curve.\n\n## Differences and how it works\nThis crate chose a different approach to storing tween data/input to solve flexibility issues present in\n[`bevy_tweening`](https://github.com/djeedai/bevy_tweening) or [`bevy_easings`](https://github.com/vleue/bevy_easings),\nlike difficulty tweening in parallel or sequence of multiple types.\n\nThis approach offers:\n- As mentioned above, capability to tween in parallel, sequence, or overlapping of any types.\n- Extendability. And not just for tweening. For example, this crate adds a custom event\n  plugin that can emit arbitrary events anytime in the animation by just building off the same system.\n\nHow it works:\n1. By building on top of [`bevy_time_runner`](https://github.com/Multirious/bevy_time_runner), an animator is a tree of entities.\n2. The parent is [`TimeRunner`](https://docs.rs/bevy_time_runner/latest/bevy_time_runner/struct.TimeRunner.html).\n  This entity handles all the timing and progress of its children.\n3. The children can be any combination of any components, such as tweens by this crate.\n4. Systems are then run in a pipeline, communicating through various dependency-injected components.\n\n## Feature gates\n- Defaults\n  - `bevy_asset`\u003cbr/\u003e\n     Add tweening systems for asset.\n  - `bevy_render`\u003cbr/\u003e\n    Currently add nothing but required by the `bevy_sprite` feature.\n  - `bevy_sprite`\u003cbr/\u003e\n    Add some built-in interpolators related to sprite.\n  - `bevy_ui`\u003cbr/\u003e\n    Add some built-in interpolators related to ui.\n- Optional\n  - `bevy_lookup_curve`.\u003cbr/\u003e\n    Adds interpolation implementation using [`bevy_lookup_curve`](https://github.com/villor/bevy_lookup_curve).\n\n## Bevy Version Support\n\n|`bevy`|`bevy_tween`|\n|------|------------|\n|0.15  |0.7         |\n|0.14  |0.6         |\n|0.13  |0.2–0.5     |\n\n## Credits\n- [`bevy_tweening`](https://github.com/djeedai/bevy_tweening)\n\n  The first crate that I've learned and improve this crate upon.\n\n- [`godot`](https://github.com/godotengine/godot)\n\n  There are one common pattern in Godot to uses Node as composition interface\n  which inspired how [`bevy_time_runner`](https://github.com/Multirious/bevy_time_runner) works.\n\n- [`nom`](https://crates.io/crates/nom)\n\n  `nom` provides function parser combinator framework that inspried this crate's\n  animation framework.\n\n## Contributions\n\nContributions are welcome!\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Your contributions\nUnless you explicitly state otherwise, any contribution intentionally submitted for\ninclusion in the work by you, as defined in the Apache-2.0 license, shall be dual\nlicensed as above, without any additional terms or conditions.\n\n\u003cimg src=\"https://github.com/Multirious/bevy_tween/assets/77918086/dbebd0c3-f4b0-432b-8778-70413a6dfa50\" width=\"100%\"/\u003e\n\n## Demos\n\n`cargo run --example follow -F bevy/bevy_winit`\u003cbr\u003e\nA square will follow your circle with configurable animation.\u003cbr\u003e\n\nhttps://github.com/Multirious/bevy_tween/assets/77918086/d582c2de-0f54-4b22-be03-e3bff3348deb\n\n---\n\n`cargo run --example click -F bevy/bevy_winit`\u003cbr\u003e\nClick left to spawn a circle. Hold right click to repetitively spawn a circle every frame.\u003cbr\u003e\n\nhttps://github.com/Multirious/bevy_tween/assets/77918086/fd0fe9d3-13a2-4261-880c-cc2609b875ba\n\n---\n\n`cargo run --example hold -F bevy/bevy_winit`\u003cbr\u003e\nHold left click to increase the effect intensitiy.\u003cbr\u003e\n\nhttps://github.com/Multirious/bevy_tween/assets/77918086/33a297a6-19f2-4146-a906-1a88ff037ab3\n\n---\n\n`cargo run --example event -F bevy/bevy_winit`\u003cbr\u003e\nShowcasing the tween event feature.\u003cbr\u003e\n\nhttps://github.com/Multirious/bevy_tween/assets/77918086/9507c467-6428-4aed-bd00-511f05e6e951\n\n---\n\n`cargo run --example sprite_sheet -F bevy/bevy_winit`\u003cbr\u003e\nSprite Sheet animation.\u003cbr\u003e\n\nhttps://github.com/Multirious/bevy_tween/assets/77918086/e3997b06-38e6-4add-85f5-a885b69c6687\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultirious%2Fbevy_tween","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmultirious%2Fbevy_tween","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultirious%2Fbevy_tween/lists"}