diff --git a/src/core/BufferGeometry.js b/src/core/BufferGeometry.js index 5f27ef8125f646cc828c7b53bc59ee7e2e8b8b29..f68534070850e689a64d87bce286c58f331c92bd 100644 --- a/src/core/BufferGeometry.js +++ b/src/core/BufferGeometry.js @@ -149,6 +149,12 @@ THREE.BufferGeometry.prototype = { } + if ( isNaN( this.boundingBox.min.x ) || isNaN( this.boundingBox.min.y ) || isNaN( this.boundingBox.min.z ) ) { + + console.error( 'THREE.BufferGeometry.computeBoundingBox()', 'Computed min/max have NaN values. The "position" attribute is likely to have NaN values.' ); + + } + }, computeBoundingSphere: function () { @@ -195,6 +201,12 @@ THREE.BufferGeometry.prototype = { this.boundingSphere.radius = Math.sqrt( maxRadiusSq ); + if ( isNaN( this.boundingSphere.radius ) ) { + + console.error( 'THREE.BufferGeometry.computeBoundingSphere()', 'Computed radius is NaN. The "position" attribute is likely to have NaN values.' ); + + } + } }