How to use the mage-engine.engine.fx function in mage-engine

To help you get started, we’ve selected a few mage-engine examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MageStudio / Mage-Studio / _OLD / app_OLD / Interface.Sidebar.Right.js View on Github external
_setShaderSelector: function() {
        var engine = require('mage-engine').engine,
            shaders = engine.fx.shadersEngine.SHADERS;
        
        for (var i in shaders) {
            var li = document.createElement('li');
            li.role = 'presentation';
            var a = document.createElement('a');
            a.role = 'menuitem';
            a.tabindex = '-1';
            a.dataset['name'] = shaders[i];
            a.onclick = function() {
                app.interface.rightSidebar.meshListener.changeShader(this.dataset['name']);
                app.interface.rightSidebar._setShaderOptions(this.dataset['name']);
            }
            a.innerText = shaders[i];
            li.appendChild(a);
            $('#shaderSelector').append(li);
        }