Skip to content

A synchronous wrapper for glslify, providing a consistent interface between both Node.js and browserify

License

Notifications You must be signed in to change notification settings

vorg/glslify-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

glslify-sync

stable

A synchronous wrapper for glslify, providing a consistent interface between both Node.js and browserify.

In node.js it works by synchronousily executing glsl in the command line via execSync.

Usage

NPM

glsl = glslify(file)

For example

var glslify = require('glslify-sync')
var source = glslify('./shader.glsl')

console.log(source) // your glslified GLSL source!

To use it in browserify either add it as a transform parameter

browserify main.js -t glslify-sync/transform

or add to your package.json

{
  "browserify": {
    "transform": [
      "glslify-sync/transform"
    ]
  }
}

License

MIT, see LICENSE.md for details.

About

A synchronous wrapper for glslify, providing a consistent interface between both Node.js and browserify

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •