Skip to content

Instantly share code, notes, and snippets.

@flushpot1125
Created December 14, 2019 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flushpot1125/56abd29251df9e5568e61c87af47ad28 to your computer and use it in GitHub Desktop.
Save flushpot1125/56abd29251df9e5568e61c87af47ad28 to your computer and use it in GitHub Desktop.
inputs: {
inputValue: "number",
scriptLoaded: "string",
domElement: "domelement",
objPath:"string",
mtlPath:"string",
},
outputs: {
outputValue: "number"
},
destroy: function(inputs, outputs) {
},
setup: function(inputs, outputs) {
},
run: function(inputs, outputs, changedInputs) {
if (!inputs.scriptLoaded) {
return;
}
var id_obj = document.getElementById("crate-obj");
id_obj.setAttribute("src",inputs.objPath);
var id_mtl = document.getElementById("crate-mtl");
id_mtl.setAttribute("src",inputs.mtlPath);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment