Miss any of our Open RFC calls?Watch the recordings here! »

rollup-plugin-glslify

1.2.0 • Public • Published

rollup-plugin-glslify

NPM Package Build Status Dependencies Dev Dependencies

Import GLSL strings with glslify (a node.js-style module system for GLSL).

import frag from './shaders/frag.glsl';
console.log(frag);

Installation

npm install --save-dev rollup-plugin-glslify

Usage

// rollup.config.js
import glslify from 'rollup-plugin-glslify';
 
export default {
    // ...
    plugins: [
        glslify()
    ]
};

Options

glslify(options)
{
    // Default
    include: [
        '**/*.vs',
        '**/*.fs',
        '**/*.vert',
        '**/*.frag',
        '**/*.glsl'
    ],
 
    // Undefined by default
    exclude: 'node_modules/**',
 
    // Compress shader by default using logic from rollup-plugin-glsl
    compress: true
}

glslify API options

Changelog

License

Released under the MIT license.

See also

Install

npm i rollup-plugin-glslify

DownloadsWeekly Downloads

237

Version

1.2.0

License

MIT

Unpacked Size

7.47 kB

Total Files

9

Last publish

Collaborators

  • avatar