An open API service indexing awesome lists of open source software.

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.

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
```