I'm trying to load an .stl
file into three.js. Everything works fine and I get the model as BufferGeometry using this code:
var loader = new THREE.STLLoader();
loader.addEventListener( 'load', function ( event )
{
var material = new THREE.MeshLambertMaterial({
color: 0x888888,
side: THREE.DoubleSide
});
var bufferGeometry = event.content;
var mesh = new THREE.Mesh(geometry, material);
scene.add( mesh );
});
loader.load( 'model.stl' );
To make it easier to further manipulate the model I would like to have the geometry as regular THREE.Geometry
instead of THREE.BufferGeometry
. Is it possible to either load the .stl
in a way so I receive it as a THREE.Geometry
or is it possible to convert from THREE.BufferGeometry
to THREE.Geometry
? Or is this possible using a .obj
file or sth else?