diff --git a/editor/js/Loader.js b/editor/js/Loader.js index 65c062a6450f56..8acc12596dc04f 100644 --- a/editor/js/Loader.js +++ b/editor/js/Loader.js @@ -392,7 +392,6 @@ function Loader( editor ) { var { LDrawLoader } = await import( '../../examples/jsm/loaders/LDrawLoader.js' ); var loader = new LDrawLoader(); - loader.fileMap = {}; // TODO Uh... loader.setPath( '../../examples/models/ldraw/officialLibrary/' ); loader.parse( event.target.result, undefined, function ( group ) { diff --git a/examples/jsm/loaders/LDrawLoader.js b/examples/jsm/loaders/LDrawLoader.js index b739896a8fac2f..f17a0591112427 100644 --- a/examples/jsm/loaders/LDrawLoader.js +++ b/examples/jsm/loaders/LDrawLoader.js @@ -815,7 +815,7 @@ class LDrawLoader extends Loader { this.cache = new LDrawFileCache( this ); // This object is a map from file names to paths. It agilizes the paths search. If it is not set then files will be searched by trial and error. - this.fileMap = null; + this.fileMap = {}; this.rootParseScope = this.newParseScopeLevel(); @@ -874,12 +874,6 @@ class LDrawLoader extends Loader { load( url, onLoad, onProgress, onError ) { - if ( ! this.fileMap ) { - - this.fileMap = {}; - - } - const fileLoader = new FileLoader( this.manager ); fileLoader.setPath( this.path ); fileLoader.setRequestHeader( this.requestHeader );