diff --git a/src/core/BufferAttribute.js b/src/core/BufferAttribute.js index e18cb380eb79902168e5a00c48342c96492b12a5..15312ad5681ae9518950d5739457318f911ecbad 100644 --- a/src/core/BufferAttribute.js +++ b/src/core/BufferAttribute.js @@ -10,6 +10,12 @@ import { _Math } from '../math/Math'; function BufferAttribute( array, itemSize, normalized ) { + if (array.buffer instanceof ArrayBuffer === false) { + + throw new TypeError( 'THREE.BufferAttribute: array should be an instance of Uint8Array, Int8Array, Uint16Array, Int16Array, or Float32Array.' ); + + } + this.uuid = _Math.generateUUID(); this.array = array;