Last active
January 25, 2017 19:02
-
-
Save jaw187/5648fb4c995504b745525055a6f3b904 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for( var current_index = 0; current_index < 10; current_index++ ){ | |
var photo_path = PVL.Viewer.getPhotoPath( photos[ current_index ] ); | |
var loadedIntoQueue = function (i) { | |
return function ( texture ){ | |
console.log( 'texture loaded in queue', i, new Date() ); | |
} | |
}; | |
var loaded = function (i) { | |
return function ( ){ | |
console.log('loading texture', photos[i].index, i ); | |
} | |
}; | |
photos[ current_index ].texture = loader.load( | |
photo_path, | |
loadedIntoQueue(current_index), | |
loaded(current_index), | |
function ( err ){ | |
console.log( 'An error occurred loading retrieving image: ', err ); | |
} | |
); | |
if( current_index == queueReadyPosition ){ | |
$('#pbc_loading').hide(); | |
PVL.UI.PlayerControls.queueReady = true; | |
console.log( 'Queue Playback Ready', new Date() ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment