{"id":15164361,"url":"https://github.com/yandeu/phaser-project-template-es6","last_synced_at":"2025-09-30T19:30:37.407Z","repository":{"id":130696307,"uuid":"167691470","full_name":"yandeu/phaser-project-template-es6","owner":"yandeu","description":"Phaser 3 - Starter Template with ES6 (ESNext features included) and webpack.","archived":true,"fork":false,"pushed_at":"2021-03-05T22:54:53.000Z","size":2728,"stargazers_count":150,"open_issues_count":0,"forks_count":31,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-06-04T17:11:45.291Z","etag":null,"topics":["babel7","es6","esnext","html5-game","phaser","phaser3","pwa","starter-template","webpack"],"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/yandeu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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},"funding":{"github":"yandeu","open_collective":"yandeu","patreon":"yandeu"}},"created_at":"2019-01-26T13:24:49.000Z","updated_at":"2024-08-11T08:11:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"1967ee87-b58a-498b-aa24-4d10d15c5e5a","html_url":"https://github.com/yandeu/phaser-project-template-es6","commit_stats":null,"previous_names":[],"tags_count":8,"template":true,"template_full_name":null,"purl":"pkg:github/yandeu/phaser-project-template-es6","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandeu%2Fphaser-project-template-es6","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandeu%2Fphaser-project-template-es6/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandeu%2Fphaser-project-template-es6/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandeu%2Fphaser-project-template-es6/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yandeu","download_url":"https://codeload.github.com/yandeu/phaser-project-template-es6/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandeu%2Fphaser-project-template-es6/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277746952,"owners_count":25870057,"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","status":"online","status_checked_at":"2025-09-30T02:00:09.208Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["babel7","es6","esnext","html5-game","phaser","phaser3","pwa","starter-template","webpack"],"created_at":"2024-09-27T03:20:23.666Z","updated_at":"2025-09-30T19:30:37.080Z","avatar_url":"https://github.com/yandeu.png","language":"JavaScript","funding_links":["https://github.com/sponsors/yandeu","https://opencollective.com/yandeu","https://patreon.com/yandeu"],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://github.com/yandeu/phaser-project-template-es6#readme\"\u003e\u003cimg src=\"readme/header-es6.png\" alt=\"header\" width=\"600\"\u003e\u003c/a\u003e\n  \u003cbr\u003e\n  Phaser 3 ES6 Starter Template\n  \u003cbr\u003e\n\u003c/h1\u003e\n\n\u003ch4 align=\"center\"\u003e\nA starter template for \u003ca href=\"https://phaser.io/\" target=\"_blank\" \u003ePhaser 3\u003c/a\u003e with \u003cstrong\u003eES6\u003c/strong\u003e and \u003ca href=\"https://webpack.js.org/\" target=\"_blank\" \u003ewebpack\u003c/a\u003e for building excellent html5-games that work great in the browser and on mobile devices.\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://david-dm.org/yandeu/phaser-project-template-es6\" title=\"dependencies status\"\u003e\n    \u003cimg src=\"https://david-dm.org/yandeu/phaser-project-template-es6/status.svg?style=flat-square\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\" title=\"License: MIT\" \u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-MIT-greenbright.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/github/package-json/v/yandeu/phaser-project-template-es6.svg?style=flat-square\" alt=\"GitHub package.json version\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/last-commit/yandeu/phaser-project-template-es6.svg?style=flat-square\" alt=\"GitHub last commit\"\u003e\n  \u003ca href=\"https://github.com/prettier/prettier\" alt=\"code style: prettier\"\u003e\u003cimg src=\"https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#key-features\"\u003eKey Features\u003c/a\u003e •\n  \u003ca href=\"#preview\"\u003ePreview\u003c/a\u003e •\n  \u003ca href=\"#how-to-use\"\u003eHow To Use\u003c/a\u003e •\n  \u003ca href=\"#enable3d\"\u003eenable3d\u003c/a\u003e •\n  \u003ca href=\"#progressive-web-app-pwa\"\u003ePWA\u003c/a\u003e •\n  \u003ca href=\"#native-app\"\u003eNative App\u003c/a\u003e •\n  \u003ca href=\"#custom-configurations\"\u003eCustom Configurations\u003c/a\u003e •\n  \u003ca href=\"#typescript\"\u003eTypeScript\u003c/a\u003e •\n  \u003ca href=\"#useful-links\"\u003eUseful Links\u003c/a\u003e •\n  \u003ca href=\"#multiplayer-game\"\u003eMultiplayer Game\u003c/a\u003e •\n  \u003ca href=\"#examples\"\u003eExamples\u003c/a\u003e •\n  \u003ca href=\"#credits\"\u003eCredits\u003c/a\u003e •\n  \u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cblockquote align=\"center\"\u003e\n Want to use TypeScript instead? Switch to the \u003ca href=\"https://github.com/yandeu/phaser-project-template#readme\" \u003ephaser-project-template\u003c/a\u003e\n\u003c/blockquote\u003e\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## \\* \\* \\* \\* \\* \\*\n\n# ⚠️ IMPORTANT\n\n### Please use the [phaser-project-template](https://github.com/yandeu/phaser-project-template#readme) instead!\n\n### Although it uses TypeScript under the hood, all TypeScript features are disabled by default. This means you can just write JavaScript (ES2015+) as you are used to. Give it a try! 👍\n\n## \\* \\* \\* \\* \\* \\*\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## Key Features\n\n- **ESNext** features ready (async/await, Rest/Spread operators)\n- Code Splitting\n- Obfuscation\n- Development Server with SourceMap and Live-Reload\n- PWA ready with offline support and \"Add to Home screen\" install prompt\n- Easy to build Native App using Capacitor\n- Includes Phaser 3 TypeScript typings\n- For development and production builds\n- Adds a webpack ContentHash to the JavaScript files (in production)\n\n## Preview\n\nThis is what you get after installing this template. A simple and clean starter template written in ES6+. [Try it!](https://s3.eu-central-1.amazonaws.com/phaser3-typescript/starter-template/index.html)\n\n\u003ca href=\"https://s3.eu-central-1.amazonaws.com/phaser3-typescript/starter-template/index.html\"\u003e\n\u003cimg src=\"readme/screenshot.png\" width=\"640\" style='border: 0.25em solid #e1e4e8;border-radius: 20px;'/\u003e\n\u003c/a\u003e\n\n## How To Use\n\nTo clone and run this template, you'll need [Git](https://git-scm.com) and [Node.js](https://nodejs.org/en/download/) (which comes with [npm](http://npmjs.com)) installed on your computer. From your command line:\n\n```bash\n# Clone this repository\n$ git clone --depth 1 https://github.com/yandeu/phaser-project-template-es6.git phaser3-game\n\n# Go into the repository\n$ cd phaser3-game\n\n# Install dependencies\n$ npm install\n\n# Start the local development server (on port 8080)\n$ npm start\n\n# Ready for production?\n# Build the production ready code to the /dist folder\n$ npm run build\n\n# Play your production ready game in the browser\n$ npm run serve\n```\n\nChange the **gameName** in /webpack/webpack.common.js.\n\nAll your game code lies inside the **/src/scripts** folder. All assets need to be inside the **/src/assets** folder in order to get copied to /dist while creating the production build. Do not change the name of the index.html and game.ts files.\n\n## enable3d\n\n\u003ca href=\"https://github.com/yandeu/enable3d#readme\"\u003e\u003cimg src=\"readme/enable3d-logo.png\" alt=\"enable3d logo\" width=\"300\"\u003e\u003c/a\u003e\n\nWant to add 3D objects and physics to your Phaser game? Checkout [enable3d](https://github.com/yandeu/enable3d#readme)!\n\n## Progressive Web App (PWA)\n\n![PWA](readme/pwa.png)\n\nThis template is **100% PWA ready**.\n\nThe ServiceWorker is **disabled by default**. Uncomment the line below inside /src/index.html to enable it.\n\n```html\n\u003cscript\u003e\n  if ('serviceWorker' in navigator) {\n    window.addEventListener('load', () =\u003e {\n      navigator.serviceWorker.register('./sw.js')\n    })\n  }\n\u003c/script\u003e\n```\n\nYou can easily personalize its settings by following these steps:\n\n- Replace both icons in /pwa/icons with your own.\n  - One is **512x512** the other **192x192**\n- Add your own **favicon.ico** to /src\n- Adjust these parameters in the **manifest.json** file in /pwa\n  - **short_name**: Max. 12 characters\n  - **name**: The full game name\n  - **orientation**: \"landscape\" or \"portrait\"\n  - **background_color**: color of the splash screen\n  - **theme_color**: color of the navbar - has to match the theme-color in the index.html file\n- You can leave the **sw.js** (serviceWorker) in /pwa how it is.\n- Change the **gameName** in /webpack/webpack.common.js\n\nRead more about PWA on [developers.google.com](https://developers.google.com/web/progressive-web-apps/)\n\n## Native App\n\nThe simplest way to build a Native App is using [Capacitor](https://capacitor.ionicframework.com/) and following its [Documentation](https://capacitor.ionicframework.com/docs/).\n\nThe only thing you need to change after installing Capacitor is the **webDir** inside the **capacitor.config.json** file. Set it to **dist** like so:\n\n```json\n{\n  \"appId\": \"com.example.app\",\n  \"appName\": \"YOUR_APP_NAME\",\n  \"bundledWebRuntime\": false,\n  \"webDir\": \"dist\"\n}\n```\n\n## Custom Configurations\n\n### Babel Compiler\n\nChange the Babel compiler's settings in the .babelrc file.\n\nYou'll find more information about the babel [here](https://babeljs.io/).\n\n### Webpack\n\nAll webpack configs are in the **webpack** folder.\n\n#### Obfuscation\n\nWe are using the [webpack-obfuscator](https://github.com/javascript-obfuscator/webpack-obfuscator). Change its settings in webpack/webpack.prod.js if needed. All available options are listed [here](https://github.com/javascript-obfuscator/javascript-obfuscator#javascript-obfuscator-options).\n\n## TypeScript\n\nWant to use TypeScript instead of ES6? Switch to the [phaser-project-template](https://github.com/yandeu/phaser-project-template#readme)\n\n## Multiplayer Game\n\nMaking a multiplayer game? Check out [geckos.io](https://github.com/geckosio/geckos.io#readme)\n\n## Useful Links\n\n- [Phaser Website](https://phaser.io/)\n- [Phaser 3 Forum](https://phaser.discourse.group/)\n- [Phaser 3 API Docs](https://photonstorm.github.io/phaser3-docs/)\n- [Official Phaser 3 Examples](http://labs.phaser.io/)\n- [Notes of Phaser 3](https://rexrainbow.github.io/phaser3-rex-notes/docs/site/index.html)\n\n## Examples\n\n### Game Examples Built with the TypeScript Starter Template\n\n#### Platformer Example [[Play this game](https://s3.eu-central-1.amazonaws.com/phaser3-typescript/platformer-example/index.html) - [Visit its Repository](https://github.com/yandeu/phaser3-typescript-platformer-example#readme)]\n\n[![phaser3-typescript-platformer](https://raw.githubusercontent.com/yandeu/phaser3-typescript-platformer-example/master/screenshots/nexus6-640x360.png)](https://github.com/yandeu/phaser3-typescript-platformer-example#readme)\n\n#### Phaser 3 + Matter.js: Car Example [[Play this game](https://s3.eu-central-1.amazonaws.com/phaser3-typescript/car-on-curved-tarrain/index.html) - [Visit its Repository](https://github.com/yandeu/phaser3-matter-car-on-curved-terrain#readme)]\n\n\u003ca href=\"https://github.com/yandeu/phaser3-matter-car-on-curved-terrain#readme\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/yandeu/phaser3-matter-car-on-curved-terrain/master/readme/myimage.gif\" width=\"640\" alt=\"phaser3-matter-car-example\"\u003e\n\u003c/a\u003e\n\n## Credits\n\nA huge thank you to Rich [@photonstorm](https://github.com/photonstorm) for creating Phaser\n\n## License\n\nThe MIT License (MIT) 2019 - [Yannick Deubel](https://github.com/yandeu). Please have a look at the [LICENSE](LICENSE) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyandeu%2Fphaser-project-template-es6","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyandeu%2Fphaser-project-template-es6","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyandeu%2Fphaser-project-template-es6/lists"}