Browse Source

BufferGeometry.fromDynamicGeometry: fix copying of colors

Brage Nilsson 10 years ago
parent
commit
e0e701d88b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/core/BufferGeometry.js

+ 1 - 1
src/core/BufferGeometry.js

@@ -471,7 +471,7 @@ THREE.BufferGeometry.prototype = {
 		this.addAttribute( 'normal', new THREE.BufferAttribute( normals, 3 ).copyVector3sArray( geometry.normals ) );
 
 		var colors = new Float32Array( geometry.colors.length * 3 );
-		this.addAttribute( 'color', new THREE.BufferAttribute( colors, 3 ).copyVector3sArray( geometry.colors ) );
+		this.addAttribute( 'color', new THREE.BufferAttribute( colors, 3 ).copyColorsArray( geometry.colors ) );
 
 		var uvs = new Float32Array( geometry.uvs.length * 2 );
 		this.addAttribute( 'uv', new THREE.BufferAttribute( uvs, 2 ).copyVector2sArray( geometry.uvs ) );