{"id":15719805,"url":"https://github.com/dorkbox/tweenengine","last_synced_at":"2025-05-07T21:43:48.610Z","repository":{"id":36907631,"uuid":"41214659","full_name":"dorkbox/TweenEngine","owner":"dorkbox","description":"High performance and lightweight Animation/Tween framework for Java 8+","archived":false,"fork":false,"pushed_at":"2023-11-23T11:09:34.000Z","size":48310,"stargazers_count":36,"open_issues_count":0,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-31T14:21:56.242Z","etag":null,"topics":["android","animation","java"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dorkbox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-08-22T16:01:33.000Z","updated_at":"2024-11-23T01:55:33.000Z","dependencies_parsed_at":"2023-02-15T23:00:45.376Z","dependency_job_id":"b2a4d85d-b7e3-4aeb-8122-16f3a255b0b6","html_url":"https://github.com/dorkbox/TweenEngine","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dorkbox%2FTweenEngine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dorkbox%2FTweenEngine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dorkbox%2FTweenEngine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dorkbox%2FTweenEngine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dorkbox","download_url":"https://codeload.github.com/dorkbox/TweenEngine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252961812,"owners_count":21832189,"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":["android","animation","java"],"created_at":"2024-10-03T21:56:50.765Z","updated_at":"2025-05-07T21:43:48.590Z","avatar_url":"https://github.com/dorkbox.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"![logo](https://git.dorkbox.com/dorkbox/TweenEngine-demo/raw/branch/master/src/tween-engine-big-logo.jpg)\n\nForked from [JavaUniversalTweenEngine](http://www.aurelienribon.com/blog/projects/universal-tween-engine), by Aurelien Ribon\n\n###### [![Dorkbox](https://badge.dorkbox.com/dorkbox.svg \"Dorkbox\")](https://git.dorkbox.com/dorkbox/TweenEngine) [![Github](https://badge.dorkbox.com/github.svg \"Github\")](https://github.com/dorkbox/TweenEngine) [![Gitlab](https://badge.dorkbox.com/gitlab.svg \"Gitlab\")](https://gitlab.com/dorkbox/TweenEngine)\n\n# Check out the demo! #\n\n  * [Android application](https://play.google.com/store/apps/details?id=aurelienribon.tweenengine.demo)\n  * [Desktop application](https://xxxxxxxxx)\n  * [WebGL html5 page](http://www.aurelienribon.com/universal-tween-engine/gwt/demo.html) (requires a WebGL enabled browser)\n\n# Changelog #\n\nSee the [Changelog](https://github.com/dorkbox/TweenEngine/wiki) page.\n\n# Introduction #\n\nThe Tween Engine enables the interpolation of every attribute from any object in any Java project (being Swing, SWT, OpenGL or even Console-based). Implement the TweenAccessor interface, register it to the engine, and animate anything you want!\n\nIn one line, send your objects to another position (here x=20 and y=30), with a smooth elastic transition, during 1 second).\n```\n \nval engine = TweenEngine.build()\n\n// Arguments are (1) the target, (2) the type of interpolation,\n// and (3) the duration in seconds. Additional methods specify\n// the target values, and the easing function.\n\nengine.to(mySprite, Type.POSITION_XY, 1.0f).value(20, 30).ease(Elastic.INOUT);\n\n// Possibilities are:\n\nmyTween = engine.to(...); // interpolates from the current values to the targets\nmyTween = engine.from(...); // interpolates from the given values to the current ones\nmyTween = engine.set(...); // apply the target values without animation (useful with a delay)\nmyTween = engine.call(...); // calls a method (useful with a delay)\n\n// Current options are:\n\ncallback.setTriggers(flags);\n\nmyTween.delay(0.5f);\nmyTween.repeat(2, 0.5f);\nmyTween.repeatAutoReverse(2, 0.5f);\nmyTween.pause();\nmyTween.resume();\nmyTween.addCallback(callback);\nmyTween.setUserData(obj);\n\n// You can of course chain everything:\n\nengine.to(...).delay(1.0f).repeat(2, 0.5f).start();\n\n// Moreover, slow-motion, fast-motion and reverse play is easy,\n// you just need to change the speed of the update:\n\nengine.update(delta * speed);\n```\n\nCreate some powerful animation sequences!\n```\nval engine = TweenEngine.build()\nengine.createSequence()\n    // First, set all objects to their initial positions\n    .push(engine.set(...))\n    .push(engine.set(...))\n    .push(engine.set(...))\n\n    // Wait 1s\n    .pushPause(1.0f)\n\n    // Move the objects around, one after the other\n    .push(engine.to(...))\n    .push(engine.to(...))\n    .push(engine.to(...))\n\n    // Then, move the objects around at the same time\n    .beginParallel()\n        .push(engine.to(...))\n        .push(engine.to(...))\n        .push(engine.to(...))\n    .end()\n\n    // And repeat the whole sequence 2 times\n    // with a 0.5s pause between each iteration\n    .repeatAutoReverse(2, 0.5f)\n\n    // Let's go!\n    .start();\n```\n\nYou can also quickly create timers:\n```\nTweenEngine.build().call(myCallback).delay(3000).start();\n```\n\nMain features are:\n\n  * Supports every interpolation function defined by Robert Penner: http://www.robertpenner.com/easing/\n  * Can be used with any object. You just have to implement the TweenAccessor interface when you want interpolation capacities.\n  * Any attribute can be interpolated. The only requirement is that what you want to interpolate can be represented as a float number.\n  * One line is sufficient to create and start a simple interpolation.\n  * Delays can be specified, to trigger the interpolation only after some time.\n  * Many callbacks can be specified (when tweens complete, start, end, etc.).\n  * Tweens and Timelines are pooled - there won't be any object allocation during runtime! You can safely use it in Android game\n  development without fearing the garbage collector.\n  * Tweens can be sequenced when used in Timelines.\n  * Tweens can be run in parallel when used in Timelines.\n  * Tweens can act on more than one value at a time, so a single tween can change the whole position (X and Y) of a sprite for instance!\n  * Tweens and Timelines can have their \"current\" position (as a percentage) specified.\n  * Tweens and Timelines can be repeated, and can automatically auto-reverse for a smooth \"back-and-forth\" animation.\n  * Simple timers can be built with Tween.call().\n  * Source code extensively documented!\n  * All Tweens and Timelines are ThreadSafe.\n\n# Get started and documentation index #\n\nDetailed documentation with code snippets and examples is available for the following topics:\n  * [Get started](https://github.com/dorkbox/TweenEngine/wiki/GetStarted) --- A step-by-step example to get you started, with code\n  * [The TweenAccessor interface](https://github.com/dorkbox/TweenEngine/wiki/TweenAccessor) --- Know how to implement it\n  * [Tweens and options](https://github.com/dorkbox/TweenEngine/wiki/Tween) --- See what are the possibilities\n  * [Timelines and options](https://github.com/dorkbox/TweenEngine/wiki/Timeline) --- Learn how to build powerful sequences\n  * [Animating Android apps](https://github.com/dorkbox/TweenEngine/wiki/AndroidUI) --- See how to use the TweenEngine with Android UIs\n\n# Where can I ask for help? #\n\n**Use github issues**\n\n\u0026nbsp; \n\u0026nbsp; \n\nMaven Info\n---------\n```\n\u003cdependencies\u003e\n    ...\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.dorkbox\u003c/groupId\u003e\n      \u003cartifactId\u003eTweenEngine\u003c/artifactId\u003e\n      \u003cversion\u003e9.2\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\nGradle Info\n---------\n````\ndependencies {\n    ...\n    compile \"com.dorkbox:TweenEngine:8.3\"\n}\n````\n\nOr if you don't want to use Maven, you can access the files directly here:  \nhttps://repo1.maven.org/maven2/com/dorkbox/TweenEngine/\n  \nhttps://repo1.maven.org/maven2/com/dorkbox/ObjectPool/    \nhttps://repo1.maven.org/maven2/org/slf4j/slf4j-api/    \n\n\nLicense\n---------\nThis project is © 2015 dorkbox llc, and is distributed under the terms of the Apache v2.0 License. See file \"LICENSE\" for further references.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdorkbox%2Ftweenengine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdorkbox%2Ftweenengine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdorkbox%2Ftweenengine/lists"}