A minimal three.js ES6 starter project that uses webpack 2.
- ES6 support via babel-loader
- CSS support via style-loader and css-loader
- SASS support via sass-loader
- ES6 linting via eslint and eslint-config-airbnb
- SASS linting via sass-lint
- Controls via orbit-controls-es6
- GUI via dat.GUI
- GLSL shaders support via webpack-glsl-loader
git clone git@github.com:jackaljack/threejs-es6-webpack-starter.git
cd threejs-es6-webpack-starter
yarn install
If you want to generate bundle.js
, run:
yarn run build
Otherwise, if you want to run webpack-dev-server
in memory, run:
yarn run start
Open your browser at localhost:8080
to see your project live!
You can change the port of webpack-dev-server
in webpack.config.js
.
The setup of this starter project was inspired by two snippets on Codepen: this one and this one.
I understood how to work with lights and camera helpers thanks to this snippet on JSFiddle.
The code for vertexShader.glsl
and fragmentShader.glsl
is taken from
this blog post.
The star used in the particle system is the PNG preview of this image by Offnfopt (Public domain or CC0, via Wikimedia Commons).