We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c460b28 commit 9fa202cCopy full SHA for 9fa202c
examples/jsm/loaders/VOXLoader.js
@@ -251,9 +251,14 @@ class VOXMesh extends Mesh {
251
geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );
252
geometry.computeVertexNormals();
253
254
- if ( hasColors ) geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );
+ const material = new MeshStandardMaterial();
255
256
- const material = new MeshStandardMaterial( { vertexColors: hasColors } );
+ if ( hasColors ) {
257
+
258
+ geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );
259
+ material.vertexColors = true;
260
261
+ }
262
263
super( geometry, material );
264
0 commit comments