Skip to content

Commit 32813e2

Browse files
committed
check for colors and enable vertex colors
1 parent b63cbd0 commit 32813e2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/jsm/loaders/3DMLoader.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,12 @@ Rhino3dmLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
382382

383383
var geometry = loader.parse( obj.geometry );
384384

385+
if ( geometry.attributes.hasOwnProperty( 'color' ) ) {
386+
387+
mat.vertexColors = true;
388+
389+
}
390+
385391
var mesh = new Mesh( geometry, mat );
386392
mesh.castShadow = attributes.castsShadows;
387393
mesh.receiveShadow = attributes.receivesShadows;

0 commit comments

Comments
 (0)