.vscode | ||
app | ||
.eslintignore | ||
.eslintrc.json | ||
.gitignore | ||
brunch-config.coffee | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
README.md |
Brunch app
This is brunch skeleton for starting a project in WebGL with Three.js, ES2015 and WAGNER.
Getting started
- Install (if you don't have them):
- Create a new project :
- Deploy with brunch :
brunch new myapp --skeleton https://github.com/Jeremboo/brunch-threejs-es6
- create new project
- Or use git to clone the brunch-threejs-es6 repository :
git clone https://github.com/Jeremboo/brunch-threejs-es6
- Deploy with brunch :
- Download dependencies :
npm run deploy
ornpm install && npm start
How to use
npm start
orbrunch watch --server
to watch the project with continuous rebuild.npm run prod
orbrunch build --production
to build minified project for production.
More
-
Like brunch basic skeleton :
public/
dir is fully auto-generated and served by HTTP server. Write your code inapp/
dir.- Place static files you want to be copied from
app/assets/
topublic/
.
-
Specific to this skeleton :
-
You can use this dir
/app/js/components/
for placed your THREE.object3D components. For my part, I create one component for each 3D objet. There is an example of object 3D in this dir (Example.js
) for showing you how can you create a THREE.object3D with ES6. -
/app/js/shaders
contains each fragments and vertices.glsl
files. If you need to use a couple of.glsl
file for build aShaderMaterial
, you just need to import this files. Look atExample.js
for more details. -
This directory
/app/js/core/
contain the classes of setting :Webgl.js
initializes the 3D scene and the camera.Loop.js
allows to manage the frame animation for each update of 3Dobjects.props.js
is a file who contains all variables of settings who can be use in all other file. It's specially created for be used by dat.gui
-
/app/js/main.js
allows to show you how all of this files are using for create and animate a 3D object. -
I also added WAGNER for have a choice of post processing already available.
-
Thanks to
-
Valentin Daguenet and his repository Threejs-starter-kit.
-
Florian Zumbrunn for his starter kit during his Three.js workshop at Gobelins, l'école de l'image.