getCodeFromNode method
dynamic
getCodeFromNode(
- dynamic node,
- dynamic type, [
- dynamic shaderStage
Implementation
getCodeFromNode(node, type, [shaderStage]) {
shaderStage = shaderStage ?? this.shaderStage;
var nodeData = this.getDataFromNode(node);
var nodeCode = nodeData.code;
if (nodeCode == undefined) {
var codes = this.codes[shaderStage];
var index = codes.length;
nodeCode = new NodeCode('nodeCode' + index, type);
codes.add(nodeCode);
nodeData.code = nodeCode;
}
return nodeCode;
}