{"id":14963982,"url":"https://github.com/proyecto26/phaser-kinetic-scrolling-plugin","last_synced_at":"2026-03-14T04:01:39.413Z","repository":{"id":74465244,"uuid":"38861677","full_name":"proyecto26/Phaser-Kinetic-Scrolling-Plugin","owner":"proyecto26","description":"Kinetic Scrolling plugin for Canvas using Phaser Framework","archived":false,"fork":false,"pushed_at":"2024-10-27T16:26:57.000Z","size":6887,"stargazers_count":132,"open_issues_count":2,"forks_count":26,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-29T22:37:27.781Z","etag":null,"topics":["gulp","html5","html5-canvas","javascript","javascript-game","js","phaser","phaser-camera","phaser-ce","phaser-framework","phaser-game","phaser-plugin","phaserjs","pixijs","scrolling","webgl"],"latest_commit_sha":null,"homepage":"https://proyecto26.github.io/Phaser-Kinetic-Scrolling-Plugin/","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/proyecto26.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"jdnichollsc","patreon":"proyecto26","open_collective":"proyecto26","ko_fi":"proyecto26","liberapay":"proyecto26","donorbox":"proyecto-26","custom":["paypal.me/jdnichollsc","buymeacoffee.com/jdnichollsc","donorbox.org/proyecto-26"]}},"created_at":"2015-07-10T04:54:31.000Z","updated_at":"2024-10-27T16:27:00.000Z","dependencies_parsed_at":"2024-11-09T16:36:20.222Z","dependency_job_id":null,"html_url":"https://github.com/proyecto26/Phaser-Kinetic-Scrolling-Plugin","commit_stats":{"total_commits":94,"total_committers":11,"mean_commits":8.545454545454545,"dds":"0.36170212765957444","last_synced_commit":"dc385c759639552d4b950b55c659e69965860fa8"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proyecto26%2FPhaser-Kinetic-Scrolling-Plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proyecto26%2FPhaser-Kinetic-Scrolling-Plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proyecto26%2FPhaser-Kinetic-Scrolling-Plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proyecto26%2FPhaser-Kinetic-Scrolling-Plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/proyecto26","download_url":"https://codeload.github.com/proyecto26/Phaser-Kinetic-Scrolling-Plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249532,"owners_count":20908212,"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":["gulp","html5","html5-canvas","javascript","javascript-game","js","phaser","phaser-camera","phaser-ce","phaser-framework","phaser-game","phaser-plugin","phaserjs","pixijs","scrolling","webgl"],"created_at":"2024-09-24T13:32:25.542Z","updated_at":"2026-03-14T04:01:34.244Z","avatar_url":"https://github.com/proyecto26.png","language":"JavaScript","funding_links":["https://github.com/sponsors/jdnichollsc","https://patreon.com/proyecto26","https://opencollective.com/proyecto26","https://ko-fi.com/proyecto26","https://liberapay.com/proyecto26","proyecto-26","paypal.me/jdnichollsc","buymeacoffee.com/jdnichollsc","donorbox.org/proyecto-26","http://www.paypal.me/jdnichollsc/2"],"categories":[],"sub_categories":[],"readme":"\u003cp\u003e\n  \u003ca href=\"./LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"MIT license\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://npmjs.org/package/phaser-kinetic-scrolling-plugin\"\u003e\n    \u003cimg src=\"http://img.shields.io/npm/v/phaser-kinetic-scrolling-plugin.svg\" alt=\"Current npm package version\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/proyecto26/Phaser-Kinetic-Scrolling-Plugin/graphs/commit-activity\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Maintained%3F-yes-brightgreen.svg\" alt=\"Maintenance\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/proyecto26\" alt=\"Financial Contributors on Open Collective\"\u003e\n    \u003cimg src=\"https://opencollective.com/proyecto26/all/badge.svg?label=financial+contributors\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://npmjs.org/package/phaser-kinetic-scrolling-plugin\"\u003e\n    \u003cimg src=\"http://img.shields.io/npm/dm/phaser-kinetic-scrolling-plugin.svg\" alt=\"Downloads\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://npmjs.org/package/phaser-kinetic-scrolling-plugin\"\u003e\n    \u003cimg src=\"http://img.shields.io/npm/dt/phaser-kinetic-scrolling-plugin.svg?label=total%20downloads\" alt=\"Total downloads\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://twitter.com/intent/follow?screen_name=jdnichollsc\"\u003e\n    \u003cimg src=\"https://img.shields.io/twitter/follow/jdnichollsc.svg?label=Follow%20@jdnichollsc\" alt=\"Follow @jdnichollsc\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# Kinetic Scrolling Plugin for Phaser Framework\n\n![Kinetic Scrolling Plugin](https://raw.githubusercontent.com/jdnichollsc/Phaser-Kinetic-Scrolling-Plugin/main/img/plugin.png)\n\nThe vertical and horizontal scrolling is a very useful feature in the games for example to display a section of levels and with this plugin you can simulate the scrolling within a **canvas** element of **HTML5**... so check this awesome plugin for **Phaser Framework**!\n\n\u003e Kinetic scrolling based on http://ariya.ofilabs.com/2013/11/javascript-kinetic-scrolling-part-2.html\n\n## Download the Plugin\n\n[![NPM](https://nodei.co/npm/phaser-kinetic-scrolling-plugin.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/phaser-kinetic-scrolling-plugin/)\n\nInstall via [bower](http://bower.io)\n\n`bower i phaser-kinetic-scrolling-plugin --save`\n\nInstall via [npm](https://www.npmjs.com)\n\n`npm i phaser-kinetic-scrolling-plugin --save`\n\n## Load the Plugin\n\n```javascript\nthis.game.kineticScrolling = this.game.plugins.add(Phaser.Plugin.KineticScrolling);\n```\n\n## Change Default Settings of the Plugin - *_It isn't necessary, default is horizontal_*\n\n```javascript\nthis.game.kineticScrolling.configure({\n    kineticMovement: true,\n    timeConstantScroll: 325, //really mimic iOS\n    horizontalScroll: true,\n    verticalScroll: false,\n    horizontalWheel: true,\n    verticalWheel: false,\n    deltaWheel: 40,\n    onUpdate: null //A function to get the delta values if it's required (deltaX, deltaY)\n});\n```\n\n## Start the Plugin\n\n```javascript\nthis.game.kineticScrolling.start();\n```\n\n## Stop the Plugin\n\n```javascript\nthis.game.kineticScrolling.stop();\n```\n\n## Full Example\n\n```javascript\nvar game = new Phaser.Game(1024, 768, Phaser.AUTO, '', {\n    init: function () {\n\n        //Load the plugin\n        this.game.kineticScrolling = this.game.plugins.add(Phaser.Plugin.KineticScrolling);\n\n        //If you want change the default configuration before start the plugin\n    },\n    create: function () {\n\n        //Starts the plugin\n        this.game.kineticScrolling.start();\n\n        //If you want change the default configuration after start the plugin\n\n        this.rectangles = [];\n\n        var initX = 50;\n\n        for (var i = 0; i \u003c 26; i++) {\n            this.rectangles.push(this.createRectangle(initX, this.game.world.centerY - 100, 250, 200));\n            this.index = this.game.add.text(initX + 125, this.game.world.centerY, i + 1,\n                        { font: 'bold 150px Arial', align: \"center\" });\n            this.index.anchor.set(0.5);\n            initX += 300;\n        }\n\n        //Changing the world width\n        this.game.world.setBounds(0, 0, 320 * this.rectangles.length, this.game.height);\n    },\n    createRectangle: function (x, y, w, h) {\n        var sprite = this.game.add.graphics(x, y);\n        sprite.beginFill(Phaser.Color.getRandomColor(100, 255), 1);\n        sprite.bounds = new PIXI.Rectangle(0, 0, w, h);\n        sprite.drawRect(0, 0, w, h);\n        return sprite;\n    }\n});\n```\n\n## Examples\nThe repository has some examples of the plugin, to run the examples created by the community execute the command `gulp examples` from the terminal:\n- Horizontal scrolling\n- Horizontal scrolling with scrollbar\n- Horizontal scrolling and pressing events\n- Horizontal and Vertical scrolling (Mouse wheel too)\n- onUpdate callback to track delta\n\n## Other Projects\n- **[IonPhaser](http://market.ionic.io/plugins/ionphaser)**\n- **[Rotate Sprite Extension](https://github.com/jdnichollsc/Phaser-Rotate-Sprite-Extension)**\n\n## Contributing ✨\nWhen contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.  \nContributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated** ❤️.  \nYou can learn more about how you can contribute to this project in the [contribution guide](https://github.com/proyecto26/Phaser-Kinetic-Scrolling-Plugin/blob/master/CONTRIBUTING.md).\n\n## Collaborators ✨\n[\u003cimg alt=\"jdnichollsc\" src=\"https://avatars3.githubusercontent.com/u/2154886?v=3\u0026s=117\" width=\"117\"\u003e](https://github.com/jdnichollsc) | [\u003cimg alt=\"daniel-mf\" src=\"https://avatars1.githubusercontent.com/u/4193707?s=117\u0026v=4\" width=\"117\"\u003e](https://github.com/daniel-mf) | [\u003cimg alt=\"VitaZheltyakov\" src=\"https://avatars3.githubusercontent.com/u/5693437?v=3\u0026s=117\" width=\"117\"\u003e](https://github.com/VitaZheltyakov) | [\u003cimg alt=\"iamchristopher\" src=\"https://avatars2.githubusercontent.com/u/5909516?v=3\u0026s=117\" width=\"117\"\u003e](https://github.com/iamchristopher) | [\u003cimg alt=\"daaaabeen\" src=\"https://avatars0.githubusercontent.com/u/3760804?s=117\u0026v=3\" width=\"117\"\u003e](https://github.com/daaaabeen) |\n:---: |:---: |:---: |:---: |:---: |\n[Nicholls](mailto:jdnichollsc@hotmail.com) | [Daniel](mailto:echo.dmf@gmail.com) | [Vitaliy](mailto:vita-zhelt@yandex.ru) | [Chris Wright](https://twitter.com/jorbascrumps) | [Daaaabeen](mailto:dianbin.lee@gmail.com) |\n\n## Supporting 🍻\nI believe in Unicorns 🦄\nSupport [me](http://www.paypal.me/jdnichollsc/2), if you do too.\n\nDonate **Ethereum**, **ADA**, **BNB**, **SHIBA**, **USDT/USDC**, **DOGE**, etc:\n\n\u003e Wallet address: jdnichollsc.eth\n\nPlease let us know your contributions! 🙏\n\n## License ⚖️\nThis repository is available under the [MIT License](https://github.com/proyecto26/Phaser-Kinetic-Scrolling-Plugin/blob/master/LICENSE).\n\n## Happy scrolling 💯\nMade with \u003c3\n\n\u003cimg width=\"150px\" src=\"https://github.com/jdnichollsc/jdnichollsc.github.io/blob/master/assets/nicholls.png?raw=true\" align=\"right\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproyecto26%2Fphaser-kinetic-scrolling-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproyecto26%2Fphaser-kinetic-scrolling-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproyecto26%2Fphaser-kinetic-scrolling-plugin/lists"}