{"id":21372844,"url":"https://github.com/calebnance/phaser-vite","last_synced_at":"2025-10-03T19:57:19.656Z","repository":{"id":219028020,"uuid":"747974773","full_name":"calebnance/phaser-vite","owner":"calebnance","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-25T02:51:21.000Z","size":665,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-03T19:57:19.291Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/calebnance.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-25T02:20:00.000Z","updated_at":"2024-01-25T02:20:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"74256472-4afd-4cf1-a522-cb03f41c6358","html_url":"https://github.com/calebnance/phaser-vite","commit_stats":null,"previous_names":["calebnance/phaser-vite"],"tags_count":0,"template":false,"template_full_name":"phaserjs/template-vite","purl":"pkg:github/calebnance/phaser-vite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calebnance%2Fphaser-vite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calebnance%2Fphaser-vite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calebnance%2Fphaser-vite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calebnance%2Fphaser-vite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/calebnance","download_url":"https://codeload.github.com/calebnance/phaser-vite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calebnance%2Fphaser-vite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278219770,"owners_count":25950350,"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-10-03T02:00:06.070Z","response_time":53,"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":[],"created_at":"2024-11-22T08:23:22.639Z","updated_at":"2025-10-03T19:57:19.640Z","avatar_url":"https://github.com/calebnance.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phaser Vite Template\n\nThis is a Phaser 3 project template that uses Vite for bundling. It supports hot-reloading for quick development workflow and includes scripts to generate production-ready builds.\n\n### Versions\n\nThis template has been updated for:\n\n- [Phaser 3.70.0](https://github.com/phaserjs/phaser)\n- [Vite 5.0.8](https://github.com/vitejs/vite)\n\n![screenshot](screenshot.png)\n\n## Requirements\n\n[Node.js](https://nodejs.org) is required to install dependencies and run scripts via `npm`.\n\n## Available Commands\n\n| Command | Description |\n|---------|-------------|\n| `npm install` | Install project dependencies |\n| `npm run dev` | Launch a development web server |\n| `npm run build` | Create a production build in the `dist` folder |\n\n## Writing Code\n\nAfter cloning the repo, run `npm install` from your project directory. Then, you can start the local development server by running `npm run dev`.\n\nThe local development server runs on `http://localhost:8080` by default. Please see the Vite documentation if you wish to change this, or add SSL support.\n\nOnce the server is running you can edit any of the files in the `src` folder. Vite will automatically recompile your code and then reload the browser.\n\n## Template Project Structure\n\nWe have provided a default project structure to get you started. This is as follows:\n\n- `index.html` - A basic HTML page to contain the game.\n- `src` - Contains the game source code.\n- `src/main.js` - The main entry point. This contains the game configuration and starts the game.\n- `src/scenes/` - The Phaser Scenes are in this folder.\n- `public/style.css` - Some simple CSS rules to help with page layout.\n- `public/assets` - Contains the static assets used by the game.\n\n## Handling Assets\n\nVite supports loading assets via JavaScript module `import` statements.\n\nThis template provides support for both embedding assets and also loading them from a static folder. To embed an asset, you can import it at the top of the JavaScript file you are using it in:\n\n```js\nimport logoImg from './assets/logo.png'\n```\n\nTo load static files such as audio files, videos, etc place them into the `public/assets` folder. Then you can use this path in the Loader calls within Phaser:\n\n```js\npreload ()\n{\n    //  This is an example of an imported bundled image.\n    //  Remember to import it at the top of this file\n    this.load.image('logo', logoImg);\n\n    //  This is an example of loading a static image\n    //  from the public/assets folder:\n    this.load.image('background', 'assets/bg.png');\n}\n```\n\nWhen you issue the `npm run build` command, all static assets are automatically copied to the `dist/assets` folder.\n\n## Deploying to Production\n\nAfter you run the `npm run build` command, your code will be built into a single bundle and saved to the `dist` folder, along with any other assets your project imported, or stored in the public assets folder.\n\nIn order to deploy your game, you will need to upload *all* of the contents of the `dist` folder to a public facing web server.\n\n## Customizing the Template\n\n### Vite\n\nIf you want to customize your build, such as adding plugin (i.e. for loading CSS or fonts), you can modify the `vite.config.js` file for cross-project changes, or you can modify and/or create new configuration files and target them in specific npm tasks inside of `package.json`. Please see the [Vite documentation](https://vitejs.dev/) for more information.\n\n## Join the Phaser Community!\n\nWe love to see what developers like you create with Phaser! It really motivates us to keep improving. So please join our community and show-off your work 😄\n\n**Visit:** The [Phaser website](https://phaser.io) and follow on [Phaser Twitter](https://twitter.com/phaser_)\u003cbr /\u003e\n**Play:** Some of the amazing games [#madewithphaser](https://twitter.com/search?q=%23madewithphaser\u0026src=typed_query\u0026f=live)\u003cbr /\u003e\n**Learn:** [API Docs](https://newdocs.phaser.io), [Support Forum](https://phaser.discourse.group/) and [StackOverflow](https://stackoverflow.com/questions/tagged/phaser-framework)\u003cbr /\u003e\n**Discord:** Join us on [Discord](https://discord.gg/phaser)\u003cbr /\u003e\n**Code:** 2000+ [Examples](https://labs.phaser.io)\u003cbr /\u003e\n**Read:** The [Phaser World](https://phaser.io/community/newsletter) Newsletter\u003cbr /\u003e\n\nCreated by [Phaser Studio](mailto:support@phaser.io). Powered by coffee, anime, pixels and love.\n\nThe Phaser logo and characters are \u0026copy; 2011 - 2024 Phaser Studio Inc.\n\nAll rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalebnance%2Fphaser-vite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcalebnance%2Fphaser-vite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalebnance%2Fphaser-vite/lists"}