2
0
Эх сурвалжийг харах

NodeBuilder: Get real color type (#26524)

sunag 2 жил өмнө
parent
commit
32276efec7

+ 3 - 1
examples/jsm/nodes/core/NodeBuilder.js

@@ -331,6 +331,8 @@ class NodeBuilder {
 
 	getType( type ) {
 
+		if ( type === 'color' ) return 'vec3';
+
 		return type;
 
 	}
@@ -812,7 +814,7 @@ class NodeBuilder {
 
 	getVar( type, name ) {
 
-		return `${type} ${name}`;
+		return `${ this.getType( type ) } ${ name }`;
 
 	}