Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

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