|
@@ -8,6 +8,7 @@ import { Object3D } from './Object3D';
|
|
import { Matrix4 } from '../math/Matrix4';
|
|
import { Matrix4 } from '../math/Matrix4';
|
|
import { Matrix3 } from '../math/Matrix3';
|
|
import { Matrix3 } from '../math/Matrix3';
|
|
import { _Math } from '../math/Math';
|
|
import { _Math } from '../math/Math';
|
|
|
|
+import { arrayMax } from '../utils';
|
|
import { GeometryIdCount } from './Geometry';
|
|
import { GeometryIdCount } from './Geometry';
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -54,7 +55,7 @@ BufferGeometry.prototype = {
|
|
|
|
|
|
if ( Array.isArray( index ) ) {
|
|
if ( Array.isArray( index ) ) {
|
|
|
|
|
|
- this.index = new ( _Math.arrayMax( index ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( index, 1 );
|
|
|
|
|
|
+ this.index = new ( arrayMax( index ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( index, 1 );
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
|
|
|
@@ -516,7 +517,7 @@ BufferGeometry.prototype = {
|
|
|
|
|
|
if ( geometry.indices.length > 0 ) {
|
|
if ( geometry.indices.length > 0 ) {
|
|
|
|
|
|
- var TypeArray = _Math.arrayMax( geometry.indices ) > 65535 ? Uint32Array : Uint16Array;
|
|
|
|
|
|
+ var TypeArray = arrayMax( geometry.indices ) > 65535 ? Uint32Array : Uint16Array;
|
|
var indices = new TypeArray( geometry.indices.length * 3 );
|
|
var indices = new TypeArray( geometry.indices.length * 3 );
|
|
this.setIndex( new BufferAttribute( indices, 1 ).copyIndicesArray( geometry.indices ) );
|
|
this.setIndex( new BufferAttribute( indices, 1 ).copyIndicesArray( geometry.indices ) );
|
|
|
|
|