ros3djs icon indicating copy to clipboard operation
ros3djs copied to clipboard

Export scene as gltf

Open jonra1993 opened this issue 5 years ago • 1 comments

Hi there is any way to export viewer as ply or GLTF. I was trying three js Exporters with no success always result is empty.

jonra1993 avatar Jan 04 '20 03:01 jonra1993

You must mean that you tried the GLTFExporter from three.js examples.

https://threejs.org/docs/#examples/en/exporters/GLTFExporter

I'd imagine if you use this module like in the following code, it should work:

var viewer = new ROS3D.Viewer();
...
var exporter = new THREE.GLTFExporter();

// Parse the input and generate the glTF output
exporter.parse( viewer.scene, function ( gltf ) {
	console.log( gltf );
}, options );

J-Rojas avatar Feb 19 '20 02:02 J-Rojas