var presentation = ["Star Wars: Rise of the Resistance<\/word>","Star Wars: Galaxy's Edge at Disneyland<\/word>","walk-through<\/word>","drop ride system<\/word>","Resistance<\/word>","First Order<\/word>","combined trackless dark ride<\/word>","motion simulator<\/word>","ride systems<\/word>","Audio-Animatronics<\/word>","practical sets<\/word>","screen-based media<\/word>","advanced attractions<\/word>","Walt Disney Imagineering<\/word>","Star Wars: Rise of the Resistance<\/strong> is an attraction at Star Wars: Galaxy's Edge at Disneyland<\/strong>. The attraction-a combined trackless dark ride<\/strong>, walk-through<\/strong>, motion simulator<\/strong>, and drop ride system<\/strong>-puts guests into the middle of an altercation between the Resistance<\/strong> and the First Order<\/strong>. Featuring four interworking ride systems<\/strong> in conjunction with Audio-Animatronics<\/strong>, practical sets<\/strong>, projection mapping and screen-based media<\/strong>, Rise of the Resistance<\/strong> is one of the most complex and advanced attractions<\/strong> designed by Walt Disney Imagineering<\/strong>.<\/phrase>","Resistance encampment<\/word>","Resistance control center<\/word>","Rey<\/word>","Resistance<\/word>","First Order<\/word>","hijacked First Order Fleet Transport<\/word>","Black Spire Outpost<\/word>","new recruits<\/word>","ancient caves<\/word>","BB-8<\/word>","General Leia Organa<\/word>","undisclosed planet<\/word>","Poe Dameron<\/word>","Nien Nunb<\/word>","Mon Calamari Lieutenant Bek<\/word>","video screens<\/word>","walk<\/word>","past ships<\/word>","X-wing fighter<\/word>","CEC Intersystem Transport Ship<\/word>","first portion<\/word>","other X-wings<\/word>","help<\/word>","transport and fighters<\/word>","pull<\/word>","hangar bay<\/word>","Kylo Ren<\/word>","Armitage Hux<\/word>","their interrogation<\/word>","Finn<\/word>","recruits board<\/word>","eight-seat ride vehicle<\/word>","travel<\/word>","escape pod<\/word>","The attraction is located in the area of Galaxy's Edge known as the ancient ruins on the outskirts of Black Spire Outpost<\/strong>, which includes a Resistance encampment<\/strong>. Its entrance is marked by a turret that leads guests - acting as new recruits<\/strong> - to a path heading into ancient caves<\/strong> that house a Resistance control center<\/strong> where they are given a mission by BB-8<\/strong> and a hologram of Rey<\/strong> to rendezvous with General Leia Organa<\/strong> at an undisclosed planet<\/strong>. The briefing also includes Poe Dameron<\/strong>, Nien Nunb<\/strong>, and Mon Calamari Lieutenant Bek<\/strong>, all appearing on video screens<\/strong>. Guests then walk<\/strong> past ships<\/strong>, including Dameron's X-wing fighter<\/strong>, and board a Resistance<\/strong> CEC Intersystem Transport Ship<\/strong> for the first portion<\/strong> of the ride. On board, Bek speaks to guests as Nien Nunb<\/strong> pilots the ship, which is escorted by Dameron and other X-wings<\/strong>. Dameron is forced to go for help<\/strong> when the transport and fighters<\/strong> are attacked by a First Order<\/strong> Star Destroyer which appears to capture the guests' ship and pull<\/strong> it inside a hangar bay<\/strong> filled with stormtroopers. The recruits then are brought into a cell where Kylo Ren<\/strong> and Armitage Hux<\/strong> discuss their interrogation<\/strong>. Then with help<\/strong> from Finn<\/strong>, disguised as a stormtrooper, the recruits board<\/strong> a hijacked First Order Fleet Transport<\/strong> (an eight-seat ride vehicle<\/strong>) piloted by an R5 unit to travel<\/strong> to an escape pod<\/strong>.<\/phrase>","two AT-ATs<\/word>","AT-AT pilot<\/word>","almost blasted<\/word>","Finn<\/word>","escape pods<\/word>","two transports<\/word>","loading station<\/word>","pass<\/word>","empty transports<\/word>","nearly spots<\/word>","reach<\/word>","spot<\/word>","attempt<\/word>","fail<\/word>","escape<\/word>","The ride begins with Finn<\/strong> explaining how to get to the escape pods<\/strong>. The two transports<\/strong> exit the loading station<\/strong> where they pass<\/strong> two other empty transports<\/strong> heading into the loading station<\/strong>, with Bek speaking to the riders through the transports' radio. They enter another room where a probe droid nearly spots<\/strong> them. However, when about to reach<\/strong> two lifts, two stormtroopers spot<\/strong> the guests. The stormtroopers attempt<\/strong> to blast at the transports, but fail<\/strong> as the transports escape<\/strong>. They enter the next room which includes two AT-ATs<\/strong>. The door leading out of the room closes before the transports can pass<\/strong> through. The stormtroopers spot<\/strong> the transports again and attempt<\/strong> to blast at them. An audio-animatronic Finn<\/strong> in a stormtrooper suit helps the guests as the transports split up and enter two lifts. Finn<\/strong> tells them to go down, but they go up instead. One of the vehicles is spotted by an AT-AT pilot<\/strong> and is almost blasted<\/strong>.<\/phrase>","Resistance ship fleet<\/word>","attempt to escape<\/word>","lightsaber<\/word>","doors close<\/word>","cannons<\/word>","Resistance<\/word>","demanding<\/word>","whereabouts of the Resistance Base<\/word>","vertical drop<\/word>","crash landed<\/word>","Kylo Ren<\/word>","General Hux<\/word>","escape<\/word>","pass<\/word>","Force<\/word>","TIE Fighter<\/word>","escape pods<\/word>","motion simulator<\/word>","Batuu<\/word>","escape pod<\/word>","In the next room, audio-animatronic figures of Kylo Ren<\/strong> and General Hux<\/strong> are seen atop the ship's bridge discussing the situation. Suddenly, a Resistance ship fleet<\/strong> appears and Ren notices the transports. The riders attempt to escape<\/strong>, but Ren jumps down in front of them and ignites his lightsaber<\/strong> as the transports enter two lifts, though the doors close<\/strong> in front of them before he can get to them. As the lifts go down, Kylo's lightsaber<\/strong> suddenly cuts through the ceiling as they escape<\/strong>. The riders then enter a room with three cannons<\/strong> firing at the Resistance<\/strong>, which they pass<\/strong> under and make it into the next room where an audio-animatronic Ren uses the Force<\/strong> on the transports, demanding<\/strong> that they tell him the whereabouts of the Resistance Base<\/strong>. Suddenly, a hole is blasted into the wall and Ren is almost blown out into space as debris falls over him. If the animatronic of Kylo Ren<\/strong> is not working, an alternate ending is triggered. Ren instead appears through the windows in front of the transports in his TIE Fighter<\/strong> and threatens to blast them if they don't give him information on the Resistance<\/strong> Base. All of a sudden, a Resistance<\/strong> X Wing shoots down Kylo Ren<\/strong>'s TIE Fighter<\/strong> and the transports escape<\/strong>. The transports enter the next room and enter the escape pods<\/strong>, where the ride turns into a motion simulator<\/strong>. After two other pods eject, the riders' pods undergo a sudden vertical drop<\/strong> and escape<\/strong> back onto Batuu<\/strong>. The transports exit the simulator and enter the hangar, where an audio-animatronic Bek is seen in his escape pod<\/strong>, having just crash landed<\/strong> in the base. They then enter the unload station where the ride ends.<\/phrase>"]; var currentPosition = 0; var totalPositions = 0; var timePerWord = 1500; var timePerPhraseWord = 120 var readAheadPlayerTimer; var autoPlay = true; var setMinimized = false; var wordSpeedOptions = {'Slower':2000,'Moderate':1200,'Fast':800}; var phraseSpeedOptions = {'Slower':280,'Moderate':200,'Fast':80}; var defaultWordSpeedOption = 'Moderate'; var defaultPhraseSpeedOption = 'Moderate'; var logToLTI = false; $(window).load(function(){ totalPositions = presentation.length; if (totalPositions > 0){ $('body').prepend('
'); $('body').prepend('
'); $('#read_ahead_player').prepend('
'); initializeReadAheadControls(); initializeReadAheadSlider(); initializeReadAheadSpeedOptions(); currentReadAheadControls(); resumeReadAheadPlayback(); } }); $(document).keyup(function(e){ switch(e.which) { case 37: pauseReadAheadPresentation(); priorReadAheadPresentationItem(); break; case 39: pauseReadAheadPresentation(); nextReadAheadPresentationItem(); break; default: break; } }); function initializeReadAheadControls(){ var s = ''; s += ''; s += ''; s += ''; s += '
'; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += '
'; $('#read_ahead_player').append(s); } function initializeReadAheadSlider(){ var s = ''; s += '
'; s += '
'; s += '
'; $('#read_ahead_controls').prepend(s); updateReadAheadSliderPosition(); } function initializeReadAheadSpeedOptions(){ var s = '
'; s += '
'; s += ' Word Speed
'; s += '
'; optionCount = 0; for (index in wordSpeedOptions) { optionCount++; } optionWidth = 100 / optionCount; for (index in wordSpeedOptions) { var option = wordSpeedOptions[index]; if (index == defaultWordSpeedOption) { s += ''; updateReadAheadWordSpeed(option); } else { s += ''; } } s += '
'; s += '
'; s += '
'; s += ' Phrase Speed
'; s += '
'; optionCount = 0; for (index in phraseSpeedOptions) { optionCount++; } optionWidth = 100 / optionCount; for (index in phraseSpeedOptions) { var option = phraseSpeedOptions[index]; if (index == defaultWordSpeedOption) { s += ''; updateReadAheadPhraseSpeed(option); } else { s += ''; } } s += '
'; s += '
'; s += '
'; $('#read_ahead_controls').append(s); } function updateReadAheadWordSpeed(microseconds,sender) { microseconds = microseconds != undefined && microseconds > 0 ? microseconds : 0; if (microseconds > 0) { timePerWord = microseconds; } if (sender!=undefined) { $('#slider_control_word_speed').find('a').removeClass('current_speed'); $(sender).addClass('current_speed'); } logReadAheadPlayerAction('updateReadAheadWordSpeed','Presentation',microseconds); } function updateReadAheadPhraseSpeed(microseconds,sender) { microseconds = microseconds != undefined && microseconds > 0 ? microseconds : 0; if (microseconds > 0 ) { timePerPhraseWord = microseconds; } if (sender!=undefined) { $('#slider_control_phrase_speed').find('a').removeClass('current_speed'); $(sender).addClass('current_speed'); } logReadAheadPlayerAction('updateReadAheadPhraseSpeed','Presentation',microseconds); } function updateReadAheadSliderPosition(){ var currentSliderBarWidth = 100 - (100 / totalPositions * (currentPosition + 1)); $('#readAheadSliderBar').css('width',currentSliderBarWidth+'%'); } function currentReadAheadControls(){ $('#read_ahead_player_pause_play').show(); if (currentPosition < totalPositions - 1) { $('#read_ahead_player_next_word').removeClass('disabled'); } else { $('#read_ahead_player_next_word').addClass('disabled'); } if (currentPosition > 0) { $('#read_ahead_player_previous_word').removeClass('disabled'); } else { $('#read_ahead_player_previous_word').addClass('disabled'); } } function restartReadAheadPresentation(){ currentPosition = 0; logReadAheadPlayerAction('restartReadAheadPresentation','Presentation',''); resumeReadAheadPlayback(); } function resumeReadAheadPlayback(){ $('.fa-repeat').removeClass('fa-repeat').addClass('fa-play'); $('#read_ahead_player_pause_play').each(function(){ $(this).find('.fa-play').removeClass('fa-play').addClass('fa-pause'); $(this).off('click'); $(this).attr('onclick','pauseReadAheadPresentation()'); }); logReadAheadPlayerAction('resumeReadAheadPlayback','Presentation',''); playReadAheadPresentation(); } function pauseReadAheadPresentation(){ $('#read_ahead_player_pause_play').each(function(){ $(this).find('.fa-pause').removeClass('fa-pause').addClass('fa-play'); $(this).off('click'); $(this).attr('onclick','resumeReadAheadPlayback()'); }); logReadAheadPlayerAction('pauseReadAheadPresentation','Presentation',''); read_ahead_pause(); } function endReadAheadPresentation(){ $('.fa-play').removeClass('fa-play').addClass('fa-repeat'); $('.fa-pause').removeClass('fa-pause').addClass('fa-repeat'); $('#read_ahead_player_pause_play').each(function(){ $(this).off('click'); $(this).attr('onclick','restartReadAheadPresentation()'); }); logReadAheadPlayerAction('endReadAheadPresentation','Presentation',''); logLTIEndPresentation(); } function playReadAheadPresentation(){ autoPlay=true; currentPosition--; logReadAheadPlayerAction('playReadAheadPresentation','Presentation',''); nextReadAheadPresentationItem(); } function startReadAheadStepper(timeDisplayWord){ clearInterval(readAheadPlayerTimer); readAheadPlayerTimer = setTimeout(function() { read_ahead_step(); },timeDisplayWord); } function stopReadAheadStepper(){ clearInterval(readAheadPlayerTimer); } function read_ahead_step(){ if (autoPlay) { nextReadAheadPresentationItem(); } } function read_ahead_pause(){ autoPlay=false; stopReadAheadStepper(); } function showReadAheadPresentationItem(index){ currentPosition = index; currentPresentationItem = presentation[currentPosition] != undefined ? presentation[currentPosition].trim() : ""; if (currentPresentationItem != "") { currentItemWordCount = presentation[currentPosition].replace("\n","").split(" ").length; if (currentPresentationItem.startsWith("")){ startReadAheadStepper(currentItemWordCount*timePerWord); $('#read_ahead_player_field').html('
'+currentPresentationItem+'
'); logReadAheadPlayerAction('showReadAheadPresentationItem','Word',currentPresentationItem); } else { startReadAheadStepper(currentItemWordCount*timePerPhraseWord); $('#read_ahead_player_field').html('
'+currentPresentationItem.replace("\n","
")+'
'); logReadAheadPlayerAction('showReadAheadPresentationItem','Phrase',''); } } else { if (currentPosition < totalPositions) { nextReadAheadPresentationItem(); } else { endReadAheadPresentation(); read_ahead_minimize(); } } currentReadAheadControls(); updateReadAheadSliderPosition(); saveReadAheadPosition(); } function priorReadAheadPresentationItem(){ stopReadAheadStepper(); logReadAheadPlayerAction('priorReadAheadPresentationItem','Controls',''); showReadAheadPresentationItem(currentPosition-1); } function nextReadAheadPresentationItem(){ stopReadAheadStepper(); logReadAheadPlayerAction('nextReadAheadPresentationItem','Controls',''); showReadAheadPresentationItem(currentPosition+1); } function read_ahead_playAgain(){ currentWordIndex = 0; logReadAheadPlayerAction('read_ahead_playAgain','Controls',''); playReadAheadPresentation(); } function read_ahead_minimize(){ setMinimized = true; logReadAheadPlayerAction('read_ahead_minimize','Controls',''); read_ahead_switch_min_max(); } function read_ahead_maximize(){ setMinimized = false; logReadAheadPlayerAction('read_ahead_maximize','Controls',''); read_ahead_switch_min_max(); } function read_ahead_switch_min_max(forceSwitch){ forceSwitch = forceSwitch != undefined ? forceSwitch : false; if (forceSwitch) { setMinimized = !setMinimized; } if (setMinimized) { $('#read_ahead_player_back').fadeOut(); $('#read_ahead_player').addClass('minimize'); $('.player-icons .fa-stack').removeClass('fa-lg').addClass('fa-sm'); $('.player-icons .fa-minus').removeClass('fa-minus').addClass('fa-expand'); logReadAheadPlayerAction('read_ahead_switch_min_max','Min',''); //$('#read_ahead_player_max_min').each(function(){ // $(this).off('click'); // $(this).attr('onclick','read_ahead_maximize()'); //}); } else { $('#read_ahead_player_back').fadeIn(); $('#read_ahead_player').removeClass('minimize'); $('.player-icons .fa-stack').removeClass('fa-sm').addClass('fa-lg'); $('.player-icons .fa-expand').removeClass('fa-expand').addClass('fa-minus'); logReadAheadPlayerAction('read_ahead_switch_min_max','Max',''); //$('#read_ahead_player_max_min').each(function(){ // $(this).off('click'); // $(this).attr('onclick','read_ahead_minimize()'); //}); } } function saveReadAheadPosition(){ $.ajax({ type:'POST', url:'/ajax/save_user_presentation_position.php', data: { 'id':1522, 'position': currentPosition } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); } function logLTIEndPresentation(action) { if (!logToLTI) { return; } $.ajax({ type:'POST', url:'/lti/presentationEnded.php', data: { 'documentId':1522, 'userId':0, } }) } function logReadAheadPlayerAction(action,area,details){ var d = new Date(); var t = d.getTime(); action = action != undefined ? action.trim() : 'UNKNOWN'; area = area != undefined ? area.trim() : ''; details = details != undefined ? details : ''; // If we are about to show a new word, increase the number of keywords // reinforced so we can log that for the Dashboard page. if (area == 'Word') { window.keywordCount++; } $.ajax({ type:'POST', url:'/logging/logPlayerAction.php', data: { 'documentId':1522, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }