Hello.
Im trying to manually give an array of vertices and faces to a threejs object, i want to then take that object and feed it to a threejs mesh constructor. im curious how i format the data, and where exactly it goes, as well as what constructors i use.
i was thinking something like this.
let geometry = new THREE.geometry();
geometry.vertices = [vertices];
geometry.faces = [faces];
let myMesh = new THREE.Mesh(geometry, material);
can anyone help me figure out exactly how to format my data, and the bare minimum i need for THREE.Mesh() to except the geometry object? im a c++ openGL guy, if that helps in explaining it to me, and what i know. im also curious about indices, and if it can calculate normals on its own, or if i need to program that.
Thanks! ya im super new to JS and this api. i learned js in two days and just was like " okay thats good " and now im trying to figure out how this engine handles everything, so i dont have to learn webGL and build a ground up solution for this client.
yes… im very interested in finding out all the problems the web will bring. i jumped into the deepend and am working on my work first job in software engineering as a contractor, flying solo… i love hate it haha. but thanks for the help!