getNodeType method
dynamic
getNodeType([
- dynamic builder,
- dynamic output
override
Implementation
getNodeType([builder, output]) {
var scope = this.scope;
var material = builder.context["material"];
if (scope == MaterialNode.COLOR) {
return material.map != null ? 'vec4' : 'vec3';
} else if (scope == MaterialNode.OPACITY) {
return 'float';
} else if (scope == MaterialNode.SPECULAR) {
return 'vec3';
} else if (scope == MaterialNode.ROUGHNESS ||
scope == MaterialNode.METALNESS) {
return 'float';
}
}