Skip to content

Instantly share code, notes, and snippets.

@jaw187
Last active January 25, 2017 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaw187/5648fb4c995504b745525055a6f3b904 to your computer and use it in GitHub Desktop.
Save jaw187/5648fb4c995504b745525055a6f3b904 to your computer and use it in GitHub Desktop.
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