glslify-bundle

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

MIT 16 个版本
安装
npm install glslify-bundle
yarn add glslify-bundle
pnpm add glslify-bundle
bun add glslify-bundle
README

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.

版本列表
5.1.1 2018-10-23
5.1.0 2018-10-22
5.0.0 2015-12-14
4.0.1 2015-12-14
4.0.0 2015-12-06
3.1.0 2015-11-24
3.0.0 2015-11-24
2.0.4 2015-06-24
2.0.3 2015-04-05
2.0.2 2015-03-14
2.0.1 2015-03-11
2.0.0 2015-03-09
1.0.3 2015-04-05
1.0.2 2014-06-29
1.0.1 2014-06-29
1.0.0 2014-06-28