webpack-lygia-loader
v0.0.1
Published
Webpack loader for Lygia shader library
Maintainers
Readme
lygia-loader
A webpack loader for the Lygia shader library that resolves includes at build time.
Installation
npm install lygia-loaderUsage
Add to your webpack configuration:
module.exports = {
module: {
rules: [
{
test: /\.(glsl|vs|fs|vert|frag)$/,
exclude: /node_modules/,
use: [
'raw-loader',
'lygia-loader'
]
}
]
}
}Then in your shaders you can include Lygia modules:
#include "lygia/math/const.glsl"
#include "lygia/space/ratio.glsl"Features
- Resolves Lygia includes at build time
- Caches downloaded files
- Supports local file includes
- Works with Next.js and other webpack-based bundlers
License
MIT
