parcel-plugin-glslify

0.1.0 • Public • Published

parcel-plugin-glsl

Import .glsl files as strings with parcel. The shader contents are available as the default export of the file.

Example

import { ShaderMaterial } from 'three';
import vertexShader from './vert-shader.glsl';
import fragmentShader from './frag-shader.glsl';
 
export function CustomShaderMaterial() {
  
  return new ShaderMaterial({
    uniforms: { ... },
    vertexShader,
    fragmentShader,
  });
  
}

Package Sidebar

Install

npm i parcel-plugin-glslify

Weekly Downloads

2

Version

0.1.0

License

MIT

Unpacked Size

1.76 kB

Total Files

4

Last publish

Collaborators

  • sortasleepy