{"id":18299895,"url":"https://github.com/gamestdio/tweener","last_synced_at":"2025-12-12T04:21:52.585Z","repository":{"id":31404687,"uuid":"34967957","full_name":"gamestdio/tweener","owner":"gamestdio","description":"Minimal Tweening Library for Games","archived":false,"fork":false,"pushed_at":"2017-01-30T12:26:10.000Z","size":238,"stargazers_count":10,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-21T05:21:48.766Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gamestdio.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}},"created_at":"2015-05-03T00:18:11.000Z","updated_at":"2020-10-03T02:51:14.000Z","dependencies_parsed_at":"2022-08-31T09:42:19.918Z","dependency_job_id":null,"html_url":"https://github.com/gamestdio/tweener","commit_stats":null,"previous_names":["maurodetarso/tweener"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamestdio%2Ftweener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamestdio%2Ftweener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamestdio%2Ftweener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamestdio%2Ftweener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gamestdio","download_url":"https://codeload.github.com/gamestdio/tweener/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247342654,"owners_count":20923637,"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":[],"created_at":"2024-11-05T15:10:39.596Z","updated_at":"2025-12-12T04:21:52.535Z","avatar_url":"https://github.com/gamestdio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tweener\n\n[![Build Status](https://secure.travis-ci.org/gamestdio/tweener.png?branch=master)](https://travis-ci.org/gamestdio/tweener)\n\nA minimal tweening library written in ES6 JavaScript.\n\n##### Chaining\n  Heavily inspired on [Grant Skinner's TweenJS](http://www.createjs.com/tweenjs) - which is easy and really good to make sequences.\n##### Manual update\n  You can manage updates and time steps by your own, useful for game development.\n##### Minimal\n  No DOM or CSS stuff. Deals only with numbers.\n##### Not singleton\n  That's it!\n\n## Usage\n\n##### Install\n```javascript\nnpm install tweener\n```\n\n##### Basics\n```javascript\n// Creating a Tweener instance with auto-update of 60 ticks per second:\nvar tweener = new Tweener(1/60);\n\n// Tweening an object:\ntweener.add(target).to({x:300, y:200}, 2, Tweener.ease.backOut);\n\n// Killing tweens:\ntweener.remove(target);\n```\n\n##### Chaining\n```javascript\n// Dispatching a callback after completion:\ntweener.add(target).from({x:300, y:200}, 2, Tweener.ease.elasticOut).then(method);\n\n// Delaying tween start by 1 second:\ntweener.add(target).wait(1).to({x:300, y:200}, 2, Tweener.ease.expoOut);\n\n// Delaying the callback by 1 second:\ntweener.add(target).to({x:300, y:200}, 2, Tweener.ease.quintOut).wait(1).then(method);\n\n// Go, then come back:\ntweener.add(target).to({x:300}, 2, Tweener.ease.sineOut).to({x:0}, 2, Tweener.ease.sineOut);\n\n// Tweening targetB after targetA:\ntweener.add(targetA).to({x:300}, 2, Tweener.ease.sineOut).add(targetB).to({x:300}, 2, Tweener.ease.sineOut);\n```\n\n##### Manual update\n```javascript\n// You can create Tweener instances without auto-update:\nvar tweenerA = new Tweener();\nvar tweenerB = new Tweener();\n\n// Then, you need to call the update, passing the elapsed time:\ntweenerA.update(elapesdTimeInSeconds);\ntweenerB.update(elapesdTimeInMilliseconds);\n\n// Added tweens will work with elapsed time format:\ntweenerA.add(targetA).to({x:300, y:200}, 0.5, Tweener.ease.backOut); //seconds\ntweenerB.add(targetB).to({x:300, y:200}, 500, Tweener.ease.backOut); //milliseconds\n```\n\n##### Development\n- Requires Node 5.2\n- `npm install`\n- Develop: `npm start`\n- Release: `npm run dist`\n- See `package.json` for more info.\n\n## Easing functions\n\nHere is the list of available easing functions (thanks to [@mattdesl](https://github.com/mattdesl) for his [eases](https://github.com/mattdesl/eases) package):\n\n```javascript\nTweener.ease.backInOut\nTweener.ease.backIn\nTweener.ease.backOut\nTweener.ease.bounceInOut\nTweener.ease.bounceIn\nTweener.ease.bounceOut\nTweener.ease.circInOut\nTweener.ease.circIn\nTweener.ease.circOut\nTweener.ease.cubicInOut\nTweener.ease.cubicIn\nTweener.ease.cubicOut\nTweener.ease.elasticInOut\nTweener.ease.elasticIn\nTweener.ease.elasticOut\nTweener.ease.expoInOut\nTweener.ease.expoIn\nTweener.ease.expoOut\nTweener.ease.linear\nTweener.ease.quadInOut\nTweener.ease.quadIn\nTweener.ease.quadOut\nTweener.ease.quartInOut\nTweener.ease.quartIn\nTweener.ease.quartOut\nTweener.ease.quintInOut\nTweener.ease.quintIn\nTweener.ease.quintOut\nTweener.ease.sineInOut\nTweener.ease.sineIn\nTweener.ease.sineOut\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgamestdio%2Ftweener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgamestdio%2Ftweener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgamestdio%2Ftweener/lists"}