https://github.com/sanderdebr/threejs-webpack-starter
A basic boilerplate for a Three.js project including the use of Webpack and ES6 syntax via Babel.
https://github.com/sanderdebr/threejs-webpack-starter
Last synced: 8 months ago
JSON representation
A basic boilerplate for a Three.js project including the use of Webpack and ES6 syntax via Babel.
- Host: GitHub
- URL: https://github.com/sanderdebr/threejs-webpack-starter
- Owner: sanderdebr
- Created: 2020-03-14T09:21:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T15:56:01.000Z (over 3 years ago)
- Last Synced: 2025-02-15T23:42:43.214Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 12.3 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Three.js Webpack ES6 Boilerplate
A basic boilerplate for a Three.js project including the use of Webpack and ES6 syntax via Babel.
### work in progress
Project Structure
```
dist - Directory for built and compressed files from the npm build script
├── assets
│ ├── models
│ ├── textures
src - Directory for all dev files
├── css - Contains all SCSS files, that are compiled to `src/public/css`
├── js - All the Three.js app files, with `app.js` as entry point. Compiled to `src/public/js` with webpack
│ ├── app
│ │ ├── components - Three.js components that get initialized in `main.js`
│ │ ├── helpers - Classes that provide ideas on how to set up and work with defaults
│ │ ├── managers - Manage complex tasks such as GUI or input
│ │ └── model - Classes that set up the model object
│ ├── data - Any data to be imported into app
│ └── utils - Various helpers and vendor classes
```
# Getting started
Install dependencies:
```
npm install
```
Then run dev script:
```
npm run dev
```
Spins up a webpack dev server at localhost:8080 and keeps track of all js and sass changes to files.
# Build
```
npm run build
```