shaderNodeObject function
dynamic
shaderNodeObject(
- dynamic obj
Implementation
shaderNodeObject(obj) {
if (obj is num) {
return shaderNodeObject(FloatNode(obj).setConst(true));
} else if (obj is Node) {
var nodeObject = nodeObjects.get(obj);
if (nodeObject == null) {
nodeObject = proxy(obj, NodeHandler);
nodeObjects.set(obj, nodeObject);
}
return nodeObject;
}
return obj;
}