Skip to content

Commit

Permalink
BufferGeometries: Cleanup (mrdoob#9811)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 authored and aardgoose committed Oct 7, 2016
1 parent 657592a commit 199f03e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/geometries/ParametricBufferGeometry.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BufferGeometry } from '../core/BufferGeometry';
import { Float32Attribute, Uint16Attribute } from '../core/BufferAttribute';
import { Float32Attribute, Uint16Attribute, Uint32Attribute } from '../core/BufferAttribute';

/**
* @author Mugen87 / https://github.com/Mugen87
Expand Down Expand Up @@ -72,7 +72,7 @@ function ParametricBufferGeometry( func, slices, stacks ) {

// build geometry

this.setIndex( Uint16Attribute( indices, 1 ) );
this.setIndex( ( indices.length > 65535 ? Uint32Attribute : Uint16Attribute )( indices, 1 ) );
this.addAttribute( 'position', Float32Attribute( vertices, 3 ) );
this.addAttribute( 'uv', Float32Attribute( uvs, 2 ) );

Expand Down
2 changes: 1 addition & 1 deletion src/geometries/PolyhedronBufferGeometry.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BufferGeometry } from '../core/BufferGeometry';
import { Uint16Attribute, Uint32Attribute, Float32Attribute } from '../core/BufferAttribute';
import { Float32Attribute } from '../core/BufferAttribute';
import { Vector3 } from '../math/Vector3';
import { Vector2 } from '../math/Vector2';
import { Sphere } from '../math/Sphere';
Expand Down

0 comments on commit 199f03e

Please sign in to comment.