File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 153153 }
154154 splitAnim ( ) ;
155155
156- // Switch hero video to shatter with crossfade
157- const vCalm = document . getElementById ( 'vid-hero-calm' ) ;
158- const vShatter = document . getElementById ( 'vid-hero-shatter' ) ;
159- if ( vCalm && vShatter ) {
160- vShatter . currentTime = 2.5 ; // skip to the explosion part
161- vShatter . play ( ) . catch ( ( ) => { } ) ;
162- vShatter . style . opacity = '1' ;
163- vCalm . style . opacity = '0' ;
156+ // Only red pill triggers shatter video
157+ if ( type === 'red' ) {
158+ const vCalm = document . getElementById ( 'vid-hero-calm' ) ;
159+ const vShatter = document . getElementById ( 'vid-hero-shatter' ) ;
160+ if ( vCalm && vShatter ) {
161+ vShatter . currentTime = 2.5 ;
162+ vShatter . play ( ) . catch ( ( ) => { } ) ;
163+ vShatter . style . opacity = '1' ;
164+ vCalm . style . opacity = '0' ;
165+ }
164166 }
165167
166168 const flash = document . getElementById ( 'pill-flash' ) ;
Original file line number Diff line number Diff line change @@ -525,14 +525,16 @@ let cx=0,cy=0;
525525 }
526526 splitAnim();
527527
528- // Switch hero video to shatter with crossfade
529- const vCalm=document.getElementById('vid-hero-calm');
530- const vShatter=document.getElementById('vid-hero-shatter');
531- if(vCalm&&vShatter){
532- vShatter.currentTime=2.5; // skip to the explosion part
533- vShatter.play().catch(()=>{});
534- vShatter.style.opacity='1';
535- vCalm.style.opacity='0';
528+ // Only red pill triggers shatter video
529+ if(type==='red'){
530+ const vCalm=document.getElementById('vid-hero-calm');
531+ const vShatter=document.getElementById('vid-hero-shatter');
532+ if(vCalm&&vShatter){
533+ vShatter.currentTime=2.5;
534+ vShatter.play().catch(()=>{});
535+ vShatter.style.opacity='1';
536+ vCalm.style.opacity='0';
537+ }
536538 }
537539
538540 const flash=document.getElementById('pill-flash');
You can’t perform that action at this time.
0 commit comments