BH
@JoeJ Hi again nice to hear back
In terms of the triangles it loops through all of the 3d coordinates of the model based on the shader position attribute, applies the position of each vertex based on the world matrix of the current objects, and adds a triangle for every 3vertices, then splits everything and creates bounding boxes for each level etc
const positionAttribute = geometry.getAttribute( 'position' );
for ( let i = 0; i < positionAttribute.count; i += 3 ) {
const v1 = new THREE.Vector3().fromBufferAttribute( positionAttribute, i );
const v2 = new THREE.Vector3().fromBufferAttribute( positionAttribute, i + 1 );
const v3 = new THREE.Vector3().fromBufferAttribute( positionAttribute, i + 2 );
v1.applyMatrix4( obj.matrixWorld );
v2.applyMatrix4( obj.matrixWorld );
v3.applyMatrix4( obj.matrixWorld );
this.addTriangle( new THREE.Triangle( v1, v2, v3 ) );
}
Also the blender file is only around 2mb but that's before all of the array modifiers are applied, afterwards it's at least 4 times more and I think even more then they after some new edits
Is there a better way to load it? I'll try to take a look at that article also