While attempting to utilize the recently introduced THREE.BufferGeometry.merge feature on buffer geometries created with THREE.PlaneBufferGeometry in r70, I encountered an error during the subsequent render call (although the merging process itself was error-free).
- Error message in Chrome:
Uncaught TypeError: Cannot read property 'array' of undefined
- Error message in Firefox:
TypeError: this.attributes.position is undefined
- Affected line of code: Line 8679 in the non-minified r70 build:
in the buffer geometry's computeBoundingSphere functionvar positions = this.attributes.position.array;
I managed to narrow down the issue to a simple cube model (attempting to merge all faces of the cube into a single BufferGeometry):
Sample code...
Here are links to jsfiddles:
- Scene with issues using PlaneBufferGeometry: Example link 1
- Working scene using normal PlaneGeometry: Example link 2
Based on my understanding, THREE.PlaneBufferGeometry should have handled setting the BufferGeometry's position attribute with the vertex positions. Did I make a mistake, or is this potentially a bug in three.js version r70?