npm run build
or gulp
- compile and move all required code, images and models into the /build folder
npm run serve
- start a local web server for the project
npm run watch
- automatically rebuild updated assets while editing
gulp js
- rebuild all javascript files
gulp css
- rebuild all css files
gulp html
- rebuild all html files
gulp favicon
- copy favicon file to build
gulp models
- copy all model files to build
gulp image
- minify all image files (except thumbnails)
gulp thumbnails
- recreate all thumbnail files (takes a little while)
This is a static site which automatically gets rebuilt and distributed via netlify every time the master branch is updated.
Thumbnails are generated once when built then stored. This is done using puppetteer, which opens example-generator.htm, and passes the settings via the URL.
Models stored as .glb
files, exported from blender.
- Open the .blend file in the
/models
folder - Import your object
- Hide all objects aside from the bounding box
- Resize the object so it fits well within the bounding box (some outside is okay)
- If the object has sharp edges, manually add some slight bevel to them.
- Make sure the object is selected in the scene collection
- File > Export > glTF
- Set the format to
glTF binary (.glb)
- Under include, make sure
selected objects
is selected - Export the model
- Add an entry for the model in the
examples.json
file