daemonburrito / webgl-webpack2-boilerplate

Skeleton of a Webpack2 JS project with shader loading support.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WebGL Webpack Boilerplate

An example WebGL project built with Webpack 2, demonstrating the inclusion of external GLSL with webpack-glsl-loader.

Inspired by https://github.com/obsoke/webpack-webgl-boilerplate, which was written for Webpack 1. Besides using Webpack2, this project aims to be larger in scope, and perhaps become a global npm CLI scaffold generator.

main.js demonstrates using ES6-style import statements to source the GLSL files. After that, they can be passed into gl.shaderSource() without further ado. This is made possible with the webpack-glsl-loader configuration in webpack.config.babel.js.

See also:

Issues and pull requests welcome.

About

Skeleton of a Webpack2 JS project with shader loading support.

License:GNU General Public License v3.0


Languages

Language:JavaScript 89.2%Language:GLSL 6.1%Language:HTML 4.6%