diff --git a/examples/js/exporters/GLTFExporter.js b/examples/js/exporters/GLTFExporter.js index 58142ab3fce28b6b3f1bfbc22306d626da8327bd..c41289fc8b27a826aa365dc6cd3efde91f891ae0 100644 --- a/examples/js/exporters/GLTFExporter.js +++ b/examples/js/exporters/GLTFExporter.js @@ -57,8 +57,6 @@ THREE.GLTFExporter.prototype = { */ parse: function ( input, onDone, options ) { - options = options || {}; - var outputJSON = { asset: { diff --git a/examples/misc_exporter_gltf.html b/examples/misc_exporter_gltf.html index 2a6dbbee3875ff8683fa30709503ae3d4b8dcf41..887b0144fdad3c98bbecc59d0e7c67be5f84b8e6 100644 --- a/examples/misc_exporter_gltf.html +++ b/examples/misc_exporter_gltf.html @@ -29,7 +29,8 @@
- TRS + + @@ -44,7 +45,8 @@ var gltfExporter = new THREE.GLTFExporter(); var options = { - trs: document.getElementById('option_trs').checked + trs: document.getElementById('option_trs').checked, + onlyVisible: document.getElementById('option_visible').checked, } gltfExporter.parse( input, function( result ) { @@ -400,6 +402,17 @@ object.position.set( 200, 0, 400 ); scene1.add( object ); + // --------------------------------------------------------------------- + // Big red box hidden just for testing `onlyVisible` option + // --------------------------------------------------------------------- + material = new THREE.MeshBasicMaterial( { + color: 0xff0000 + } ); + object = new THREE.Mesh( new THREE.BoxBufferGeometry( 200, 200, 200 ), material ); + object.position.set( 0, 0, 0 ); + object.name = "CubeHidden"; + object.visible = false; + scene1.add( object ); // --------------------------------------------------------------------- // 2nd Scene