Skip to content

vwochnik/rollup-plugin-glsl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rollup-plugin-glsl Build Status

Converts GLSL shader source files to modules

import fragmentShaderSource from './fragment.glsl';
console.log(`Fragment shader source: ${fragmentShaderSource}`);

Installation

npm i rollup-plugin-glsl -D

Usage

import { rollup } from 'rollup';
import glsl from 'rollup-plugin-glsl';

rollup({
	entry: 'main.js',
	plugins: [
		glsl({
			// By default, everything gets included
			include: 'lib/**/*.glsl',

			// Undefined by default
			exclude: ['**/index.html'],

			// Source maps are on by default
			sourceMap: false
		})
	]
});

License

MIT

About

Converts GLSL shader source files to modules

Resources

License

Stars

Watchers

Forks

Packages

No packages published