Need private packages and team management tools?Check out npm Teams »

glslify-bundle

5.1.1 • Public • Published

glslify-bundle

experimental

Bundle a glslify-deps dependency tree into a GLSL source string.

This has been separated from glslify-deps such that you can prebundle a dependency tree server-side, but then still modify shader file contents in a browser.

Usage

NPM

source = bundle(deps)

Takes the output object from glslify-deps and returns a bundled GLSL string.

var bundle = require('glslify-bundle')
var deps   = require('glslify-deps')
var path   = require('path')
 
var file = path.join(__dirname, 'index.glsl')
 
deps().add(file, function(err, tree) {
  if (err) throw err
 
  var glsl = bundle(tree)
 
  console.log(glsl)
})

Contributing

See stackgl/contributing for details.

License

MIT. See LICENSE.md for details.

Install

npm i glslify-bundle

DownloadsWeekly Downloads

79,431

Version

5.1.1

License

MIT

Unpacked Size

16.3 kB

Total Files

21

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar