@@ -10722,7 +10722,7 @@ THREE.BufferGeometry.prototype = {
10722
10722
if ( name === 'index' ) {
10723
10723
10724
10724
console.warn( 'THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute.' );
10725
- this.addIndex ( attribute );
10725
+ this.setIndex ( attribute );
10726
10726
10727
10727
}
10728
10728
@@ -11163,7 +11163,7 @@ THREE.BufferGeometry.prototype = {
11163
11163
11164
11164
var TypeArray = geometry.vertices.length > 65535 ? Uint32Array : Uint16Array;
11165
11165
var indices = new TypeArray( geometry.indices.length * 3 );
11166
- this.addIndex ( new THREE.BufferAttribute( indices, 1 ).copyIndicesArray( geometry.indices ) );
11166
+ this.setIndex ( new THREE.BufferAttribute( indices, 1 ).copyIndicesArray( geometry.indices ) );
11167
11167
11168
11168
}
11169
11169
@@ -11626,7 +11626,7 @@ THREE.BufferGeometry.prototype = {
11626
11626
11627
11627
if ( index !== null ) {
11628
11628
11629
- this.addIndex ( index.clone() );
11629
+ this.setIndex ( index.clone() );
11630
11630
11631
11631
}
11632
11632
@@ -11700,7 +11700,7 @@ THREE.InstancedBufferGeometry.prototype.copy = function ( source ) {
11700
11700
11701
11701
if ( index !== null ) {
11702
11702
11703
- this.addIndex ( index.clone() );
11703
+ this.setIndex ( index.clone() );
11704
11704
11705
11705
}
11706
11706
@@ -13720,7 +13720,7 @@ THREE.BufferGeometryLoader.prototype = {
13720
13720
if ( index !== undefined ) {
13721
13721
13722
13722
var typedArray = new self[ index.type ]( index.array );
13723
- geometry.addIndex ( new THREE.BufferAttribute( typedArray, 1 ) );
13723
+ geometry.setIndex ( new THREE.BufferAttribute( typedArray, 1 ) );
13724
13724
13725
13725
}
13726
13726
@@ -18062,7 +18062,7 @@ THREE.Sprite = ( function () {
18062
18062
var uvs = new Float32Array( [ 0, 0, 1, 0, 1, 1, 0, 1 ] );
18063
18063
18064
18064
var geometry = new THREE.BufferGeometry();
18065
- geometry.addIndex ( new THREE.BufferAttribute( indices, 1 ) );
18065
+ geometry.setIndex ( new THREE.BufferAttribute( indices, 1 ) );
18066
18066
geometry.addAttribute( 'position', new THREE.BufferAttribute( vertices, 3 ) );
18067
18067
geometry.addAttribute( 'uv', new THREE.BufferAttribute( uvs, 2 ) );
18068
18068
@@ -31395,7 +31395,7 @@ THREE.CircleBufferGeometry = function ( radius, segments, thetaStart, thetaLengt
31395
31395
31396
31396
}
31397
31397
31398
- this.addIndex ( new THREE.BufferAttribute( new Uint16Array( indices ), 1 ) );
31398
+ this.setIndex ( new THREE.BufferAttribute( new Uint16Array( indices ), 1 ) );
31399
31399
this.addAttribute( 'position', new THREE.BufferAttribute( positions, 3 ) );
31400
31400
this.addAttribute( 'normal', new THREE.BufferAttribute( normals, 3 ) );
31401
31401
this.addAttribute( 'uv', new THREE.BufferAttribute( uvs, 2 ) );
@@ -32792,7 +32792,7 @@ THREE.PlaneBufferGeometry = function ( width, height, widthSegments, heightSegme
32792
32792
32793
32793
}
32794
32794
32795
- this.addIndex ( new THREE.BufferAttribute( indices, 1 ) );
32795
+ this.setIndex ( new THREE.BufferAttribute( indices, 1 ) );
32796
32796
this.addAttribute( 'position', new THREE.BufferAttribute( vertices, 3 ) );
32797
32797
this.addAttribute( 'normal', new THREE.BufferAttribute( normals, 3 ) );
32798
32798
this.addAttribute( 'uv', new THREE.BufferAttribute( uvs, 2 ) );
@@ -33064,7 +33064,7 @@ THREE.SphereBufferGeometry = function ( radius, widthSegments, heightSegments, p
33064
33064
33065
33065
}
33066
33066
33067
- this.addIndex ( new THREE.BufferAttribute( new Uint16Array( indices ), 1 ) );
33067
+ this.setIndex ( new THREE.BufferAttribute( new Uint16Array( indices ), 1 ) );
33068
33068
this.addAttribute( 'position', positions );
33069
33069
this.addAttribute( 'normal', normals );
33070
33070
this.addAttribute( 'uv', uvs );
@@ -34603,7 +34603,7 @@ THREE.BoxHelper = function ( object ) {
34603
34603
var positions = new Float32Array( 8 * 3 );
34604
34604
34605
34605
var geometry = new THREE.BufferGeometry();
34606
- geometry.addIndex ( new THREE.BufferAttribute( indices, 1 ) );
34606
+ geometry.setIndex ( new THREE.BufferAttribute( indices, 1 ) );
34607
34607
geometry.addAttribute( 'position', new THREE.BufferAttribute( positions, 3 ) );
34608
34608
34609
34609
THREE.LineSegments.call( this, geometry, new THREE.LineBasicMaterial( { color: 0xffff00 } ) );
0 commit comments