Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mguinea/js13k-aframe-boilerplate
An A-Frame boilerplate for the js13k competition. http://js13kgames.com/
https://github.com/mguinea/js13k-aframe-boilerplate
a-frame boilerplate html5 js13k js13kgames webpack
Last synced: 4 months ago
JSON representation
An A-Frame boilerplate for the js13k competition. http://js13kgames.com/
- Host: GitHub
- URL: https://github.com/mguinea/js13k-aframe-boilerplate
- Owner: mguinea
- License: mit
- Created: 2019-07-01T20:14:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-01T10:31:16.000Z (almost 2 years ago)
- Last Synced: 2024-10-01T03:23:15.505Z (4 months ago)
- Topics: a-frame, boilerplate, html5, js13k, js13kgames, webpack
- Language: JavaScript
- Size: 710 KB
- Stars: 13
- Watchers: 1
- Forks: 5
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-jsgames - JS13K A-Frame Boilerplate - An A-Frame boilerplate for the js13k competition. (Uncategorized / Uncategorized)
README
![js13k logo](./js13k-logo.png)
# JS13K A-Frame Boilerplate
This project is a boilerplate to start developing a WebXR game based on [A-Frame](https://aframe.io/) and [Webpack](https://webpack.js.org/) for the [js13k competition](https://2019.js13kgames.com/).
![A-Frame logo](./a-frame.png)
## Getting Started
### Prerequisites
- You need [node](https://nodejs.org/en/download/current/) installed.
### Installing
- Clone this repository
- Update `package.json` with your info
- Delete `.git` directory
- Delete unneeded files and blocks
- Download node dependencies```bash
npm install
```### Start development server
After installation you just need to run:
```bash
npm start
```This will setup a server listening at `http://localhost:8080/`.
If everything went OK, you will see:
![Screenshot](./screenshot.png)
#### Access from another device
You can pass an argument to the development server specifying the interface to listen on.
```bash
npm start -- --host=0.0.0.0
```This command will start the development server listening on all interfaces. Having a device on the same network you will be able to view the webpage at `http://[yourLocalIP]:8080` for example `http://192.168.1.1:8080`.
## Build for submission
This project provides a npm script for building your application
```bash
npm run build
```This will generate two files index.html and build.zip both located in the dist/ folder. The zip file contains only the generated index.html. The output from the command also tells you how large is the generated zip file.
## Where does my code go?
All your javascript files should be located in the `src/app/` directory. The entry point is the `main.js` file. All your css should be located in the `src/styles` directory. The entry point is `main.css`. If you need to modify the html file, you can find the template used in `src/index.html`.
This project uses webpack for module bundling. This means that all the files that you want to use should be imported directly or indirectly by either `main.js` or `main.css`.
## ES2015+ support
This repository used to include [Babel](https://babeljs.io/) to enable working with modern JavaScript. As time progresses however the browser support for modern JS became excelent and webpack began shipping a newer version of uglify that can minify it. All of this makes it a rational choice to omit Babel as it would only increase the overall bundle size.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
## References
* This project is based on [https://github.com/sz-piotr/js13k-webpack-starter](https://github.com/sz-piotr/js13k-webpack-starter) by Piotr Szlachciak.