mattdesl / three-glslify-example

a simple example of ThreeJS with glslify

Home Page:http://mattdesl.github.io/three-glslify-example/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

three-glslify-example

stable

screenshot

(click for demo)

A simple example of modular shaders in ThreeJS with glslify. Uses glsl-halftone, glsl-hash-blur, and glsl-checker.

To run:

# clone repo
git clone https://github.com/mattdesl/three-glslify-example.git
cd three-glslify-example

# install deps
npm install

# start dev server
npm run start

Now open http://localhost:9966/ and start making changes to index.js, frag.glsl or vert.glsl to see changes reloaded in the browser.

To build the production release:

npm run build

This will create a bundle.js for your static site.

See the scripts field of package.json to integrate this into your own workflow. This is also specifying browserify transforms with a "browserify" field (not recommended for modules, but useful for applications), and Babelify configuration with a .babelrc file.

License

MIT, see LICENSE.md for details.

About

a simple example of ThreeJS with glslify

http://mattdesl.github.io/three-glslify-example/

License:MIT License


Languages

Language:GLSL 45.1%Language:JavaScript 44.4%Language:HTML 10.5%