Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vwochnik/rollup-plugin-glsl
Converts GLSL shader source files to modules
https://github.com/vwochnik/rollup-plugin-glsl
Last synced: 25 days ago
JSON representation
Converts GLSL shader source files to modules
- Host: GitHub
- URL: https://github.com/vwochnik/rollup-plugin-glsl
- Owner: vwochnik
- License: mit
- Created: 2017-06-18T14:14:08.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-05-25T04:18:37.000Z (over 2 years ago)
- Last Synced: 2024-10-09T22:09:16.099Z (2 months ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 22
- Watchers: 2
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - glsl - Import GLSL shaders as compressed strings. (Plugins / Other File Imports)
README
# rollup-plugin-glsl [![Build Status](https://travis-ci.org/vwochnik/rollup-plugin-glsl.svg)](https://travis-ci.org/vwochnik/rollup-plugin-glsl)
> Converts GLSL shader source files to modules
```js
import fragmentShaderSource from './fragment.glsl';
console.log(`Fragment shader source: ${fragmentShaderSource}`);
```## Installation
```sh
npm i rollup-plugin-glsl -D
```## Usage
```js
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