rollup-plugin-glsl 1.0.0
Install from the command line:
Learn more about npm packages
$ npm install @plutotcool/rollup-plugin-glsl@1.0.0
Install via package.json:
"@plutotcool/rollup-plugin-glsl": "1.0.0"
About this version
Rollup plugin that allows imports of glsl files. Resolves import pragma and minifies glsl code using @plutotcool/glsl-bundler.
yarn add rollup-plugin-glsl-bundler --dev
// rollup.config.js
import { glslBundler } from '@plutotcool/rollup-plugin-glsl-bundler'
export default {
plugins: [
glslBundler({ /* options */ })
]
}
interface GLSLBundlerParameters {
/**
* Patterns of files that must be transformed by the plugin.
*
* Default: /\.(?:glsl|frag|vert)$/
*/
include?: (string | RegExp)[] | string | RegExp | null
/**
* Patterns of files that must not be transformed by the plugin.
*
* Default: null
*/
exclude?: (string | RegExp)[] | string | RegExp | null
/**
* Alternative custom filter function that determines if a file should be
* transformed by the plugin. If specified, the include and exclude parameters
* are ignored.
*
* Default: filter function created from include and exclude parameters
*/
filter?: (id: string) => boolean
/**
* Enable loader pragma
*
* Default: true
*/
loader?: boolean
/**
* Enable minifier or specify custom minify parameters
*
* Default: true
*/
minifier?: boolean | {
renameFunctions?: boolean
renameVariables?: boolean
renameDefines?: boolean
renameStructs?: boolean
trimComments?: boolean
trimSpaces?: boolean
trimZeros?: boolean
}
/**
* Additional transform functions to apply to glsl code
*/
transforms?: ((source: string) => Promise<string> | string)[]
}
Details
- rollup-plugin-glsl
-
plutotcool
- about 3 years ago
- MIT
- 18 dependencies
Assets
- rollup-plugin-glsl-1.0.0-npm.tgz
Download activity
- Total downloads 0
- Last 30 days 0
- Last week 0
- Today 0