提交 30f12122 编写于 作者: M Marius Kintel

Support BufferGeometry, created by STLImporter

上级 a6f1ce6b
......@@ -34,9 +34,16 @@ THREE.STLBinaryExporter.prototype = {
scene.traverse( function ( object ) {
if ( ! ( object instanceof THREE.Mesh ) ) return;
if ( ! ( object.geometry instanceof THREE.Geometry ) ) return;
var geometry = object.geometry;
if ( geometry instanceof THREE.BufferGeometry ) {
geometry = new THREE.Geometry().fromBufferGeometry( geometry );
}
if ( ! ( geometry instanceof THREE.Geometry ) ) return;
var matrixWorld = object.matrixWorld;
var vertices = geometry.vertices;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册