Gem 一覧へ戻る
glslify/rollup-plugin-glslify(新しいタブで開きます)
主要言語: JavaScript
Import GLSL strings with glslify
- star 数
- 58
- watcher 数
- 3
- fork 数
- 5
- issue 数
- 0
- 最終更新
- 2023/02/02
主要言語: JavaScript
Import GLSL strings with glslify
Import GLSL strings with glslify (a node.js-style module system for GLSL).
import frag from './shaders/frag.glsl'; console.log(frag);
npm i -D rollup-plugin-glslify
# or
yarn add -D rollup-plugin-glslify// rollup.config.js import glslify from 'rollup-plugin-glslify'; export default { // ... plugins: [ glslify() ] };
glslify(options)
{ // Default include: [ '**/*.vs', '**/*.fs', '**/*.vert', '**/*.frag', '**/*.glsl' ], // Undefined by default exclude: 'node_modules/**', // Enabled by default compress: true // The compress option also accepts a function with its first argument // being the string containing the glslified shader code. // The function is expected to return a string (or object) - the compressed shader }