Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_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);
}