Browse Source

fromBufferGeometry: using fromArray also for Color

Eran Geva 7 years ago
parent
commit
2326658719
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/core/Geometry.js

+ 1 - 1
src/core/Geometry.js

@@ -234,7 +234,7 @@ Geometry.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
 
 			if ( colors !== undefined ) {
 
-				scope.colors.push( new Color( colors[ i ], colors[ i + 1 ], colors[ i + 2 ] ) );
+				scope.colors.push( new Color().fromArray( colors, i ) );
 
 			}