Explorar o código

EdgesHelper: Updated to use BufferAttribute. Fixes #5098.

Mr.doob %!s(int64=11) %!d(string=hai) anos
pai
achega
e5b1d38e1e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/extras/helpers/EdgesHelper.js

+ 1 - 1
src/extras/helpers/EdgesHelper.js

@@ -48,7 +48,7 @@ THREE.EdgesHelper = function ( object, hex ) {
 
 	}
 
-	geometry.addAttribute( 'position', new THREE.Float32Attribute( numEdges * 2 * 3, 3 ) );
+	geometry.addAttribute( 'position', new THREE.BufferAttribute( new Float32Array( numEdges * 2 * 3 ), 3 ) );
 
 	var coords = geometry.attributes.position.array;