Giter Site home page Giter Site logo

pampanelson / threejs-glsify-webpack Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thedatalife/threejs-glsify-webpack

0.0 2.0 0.0 4 KB

Starter kit for shader development with three.js and glsify.

License: MIT License

JavaScript 77.37% GLSL 20.70% CSS 1.93%

threejs-glsify-webpack's Introduction

threejs-glsify-webpack

Simple boilerplate for shader development in WebGL. Uses ThreeJS as a rendering engine and glsify to help organize shaders and provide a simple syntax for including them directly in Javascript. Webpack is used to provide a dev server with auto-reloading and es6 transpilation. Not suited for production use at the moment.

getting started

Clone this project.

npm install
npm start

Then open http://localhost:8080/build/index.html in your browser.

development

The project uses webpack and glsify to provide a streamlined way of working with GLSL shaders. It's traditionally been cumbersome to have to include the shaders in HTML or as Javascript strings as this makes syntax highlighting difficult and doesn't scale well if you have multiple shaders. The glsify-loader for webpack allows the project to require vertex and fragment shaders as if they were Javascript files. Glsify also provides the benefit of a library of shader functions that can be brought into the project with npm.

The three.js code is taken directly from thebookofshaders.com but modified to include the shaders using glsify and webpack. It's possible to drop the examples from the book directly into this project.

links

The biggest credit goes to Patricio Gonzalez Vivo and Jen Lowe for their incredible work on the website (https://thebookofshaders.com/) and helping me understand some of the critical concepts about GLSL and shaders. The three.js code is lifted directly from their open source repository at (https://github.com/patriciogonzalezvivo/thebookofshaders).

(https://github.com/stackgl/glslify) glsify - a node style module system for GLSL (https://github.com/mrdoob/three.js/) three.js

threejs-glsify-webpack's People

Contributors

twitter-milesryan avatar

Watchers

James Cloos avatar WangJunKai avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.