소스 검색

PDBLoader: Update Buffer Creation

Mugen87 8 년 전
부모
커밋
8ddeca5157
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      examples/js/loaders/PDBLoader.js

+ 3 - 3
examples/js/loaders/PDBLoader.js

@@ -175,10 +175,10 @@ THREE.PDBLoader.prototype = {
 
 		}
 
-		geometryAtoms.addAttribute( 'position', new THREE.BufferAttribute( new Float32Array( verticesAtoms ), 3 ) );
-		geometryAtoms.addAttribute( 'color', new THREE.BufferAttribute( new Float32Array( colors ), 3 ) );
+		geometryAtoms.addAttribute( 'position',  new THREE.Float32BufferAttribute( verticesAtoms, 3 ) );
+		geometryAtoms.addAttribute( 'color',  new THREE.Float32BufferAttribute( colors, 3 ) );
 
-		geometryBonds.addAttribute( 'position', new THREE.BufferAttribute( new Float32Array( verticesBonds ), 3 ) );
+		geometryBonds.addAttribute( 'position', new THREE.Float32BufferAttribute( verticesBonds, 3 ) );
 
 		callback( geometryAtoms, geometryBonds, json );