1. glslify-bundle
Bundle a glslify-deps dependency tree into a GLSL source string
glslify-bundle
Package: glslify-bundle
Created by: stackgl
Last modified: Tue, 08 Nov 2022 10:39:24 GMT
Version: 5.1.1
License: MIT
Downloads: 1,087,621
Repository: https://github.com/stackgl/glslify-bundle

Install

npm install glslify-bundle
yarn add glslify-bundle

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.

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin