简体   繁体   中英

ThreeJS: loading OBJ files keeping quadrilateral faces

Is it possible to load an OBJ file under ThreeJS keeping the quadrilateral faces? Here is an example:

http://www.professores.im-uff.mat.br/hjbortol/disciplinas/2014.2/hwc00001/test/threejs/viewer-04/viewer-04-b.html

Note that each quadrilateral face is rendered as two triangles in wireframe. I would like to keep the original quadrilateral faces, as shown here (in Java):

http://www.uff.br/cdme/triplets/triplets-html/triplets-en.html

And what about a general n-polygon face in OBJ files? Is it possible to keep it?

Thanks, Humberto.

Unfortunately everything gets translated to triangles. However, you may be able to achieve the results you are after with this code:

var edges = new THREE.EdgesHelper( mesh );
scene.add( edges );

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM