Skip to content

Commit

Permalink
Editor: Fixed gltf support.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Jan 12, 2017
1 parent 3f7e111 commit 692a95b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions editor/js/Loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,18 +160,17 @@ var Loader = function ( editor ) {
reader.addEventListener( 'load', function ( event ) {

var contents = event.target.result;
var json = JSON.parse( contents );

var loader = new THREE.GLTFLoader();
loader.parse( json, function ( result ) {
loader.parse( contents, function ( result ) {

result.scene.name = filename;
editor.execute( new AddObjectCommand( result.scene ) );

} );

}, false );
reader.readAsText( file );
reader.readAsArrayBuffer( file );

break;

Expand Down

0 comments on commit 692a95b

Please sign in to comment.