浏览代码

GLTFExporter: Added TRS option

Fernando Serrano 8 年之前
父节点
当前提交
547a8a803e
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      examples/misc_exporter_gltf.html

+ 6 - 1
examples/misc_exporter_gltf.html

@@ -28,6 +28,8 @@
 			<button id="export_object">Export Sphere</button>
 			<button id="export_objects">Export Sphere and Grid</button>
 			<button id="export_scene_object">Export Scene1 and Sphere</button>
+			<br/>
+			<input id="option_trs" type="checkbox" value="trs"/> TRS
 		</div>
 
 		<script src="../build/three.js"></script>
@@ -41,13 +43,16 @@
 
 				var gltfExporter = new THREE.GLTFExporter();
 
+				var options = {
+					trs: document.getElementById('option_trs').checked
+				}
 				gltfExporter.parse( input, function( result ) {
 
 					var output = JSON.stringify( result, null, 2 );
 					console.log( output );
 					saveString( output, 'scene.gltf' );
 
-				} );
+				}, options );
 
 			}