|
@@ -409,6 +409,21 @@ function buildPrimvars( attributes ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ // vertex colors
|
|
|
+
|
|
|
+ const colorAttribute = attributes.color;
|
|
|
+
|
|
|
+ if ( colorAttribute !== undefined ) {
|
|
|
+
|
|
|
+ const count = colorAttribute.count;
|
|
|
+
|
|
|
+ string += `
|
|
|
+ color3f[] primvars:displayColor = [${buildVector3Array( colorAttribute, count )}] (
|
|
|
+ interpolation = "vertex"
|
|
|
+ )`;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
return string;
|
|
|
|
|
|
}
|