UNPKG

dreemgl

Version:

DreemGL is an open-source multi-screen prototyping framework for mediated environments, with a visual editor and shader styling for webGL and DALi runtimes written in JavaScript. As a toolkit for gpu-accelerated multiscreen development, DreemGL includes

13 lines (10 loc) 444 B
var fs = require('fs') var path = require('path') var compile = require('./') delete require.cache[require.resolve(__filename)] module.exports = function(file, opts) { file = path.join(path.dirname(module.parent.filename), file) if (!fs.existsSync(file) && fs.existsSync(file+'.schema')) file += '.schema' if (!fs.existsSync(file) && fs.existsSync(file+'.json')) file += '.json' return compile(fs.readFileSync(file, 'utf-8'), opts) }