@@ -5,6 +5,17 @@ var XHRSettings = require('./XHRSettings');
55
66var BaseLoader = function ( )
77{
8+ // To finish the loader ...
9+ //
10+ // 1) Image Tag loader
11+ // 2) Events (or Signals?) for the various stages
12+ // 3) Progress update
13+ // 4) JSON loader
14+ // 5) XML Loader
15+ // 6) Multi File support (atlas + data)
16+ // 7) Atlas Loader
17+
18+
819 // Move to a 'setURL' method?
920 this . baseURL = '' ;
1021 this . path = '' ;
@@ -22,6 +33,7 @@ var BaseLoader = function ()
2233 this . inflight = new Set ( ) ;
2334 this . failed = new Set ( ) ;
2435 this . queue = new Set ( ) ;
36+
2537 this . storage = new Set ( ) ;
2638
2739 this . _state = 'PENDING' ;
@@ -44,16 +56,12 @@ BaseLoader.prototype = {
4456 file . fileA . path = this . path ;
4557 file . fileB . path = this . path ;
4658
47- file . fileA . tag = this . tag ;
48- file . fileB . tag = this . tag ;
49-
5059 this . list . add ( file . fileA ) ;
5160 this . list . add ( file . fileB ) ;
5261 }
5362 else
5463 {
5564 file . path = this . path ;
56- // file.tag = this.tag;
5765
5866 this . list . add ( file ) ;
5967 }
@@ -219,25 +227,10 @@ BaseLoader.prototype = {
219227 // Dispatch 'on complete' signals now
220228 } ,
221229
222- /*
223- getLoadedFilesByType (type, group = '', output = []) {
224-
225- // Return an array of all files that have state = COMPLETE (which means loaded + processed)
226-
227- for (let file of this.storage)
228- {
229- if (file.state === FILE.COMPLETE && file.tag === group && file.type === type)
230- {
231- output.push(file);
232- }
233- }
234-
235- return output;
236-
237- },
238-
239230 getLoadedFiles ( group = '' , output = [ ] ) {
240231
232+ var output = [ ] ;
233+
241234 // Return an array of all files that have state = COMPLETE (which means loaded + processed)
242235
243236 for ( let file of this . storage )
@@ -251,7 +244,6 @@ BaseLoader.prototype = {
251244 return output ;
252245
253246 } ,
254- */
255247
256248 reset : function ( )
257249 {
0 commit comments