Skip to content

Commit

Permalink
animations display in full frame #110
Browse files Browse the repository at this point in the history
  • Loading branch information
PranshulGG committed Dec 23, 2024
1 parent 59fbde6 commit 74c6a62
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 4 deletions.
31 changes: 28 additions & 3 deletions app/src/main/assets/app/bg_animations.js
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,9 @@ class Meteor {

animationContainer1.setAttribute('running_clouds', 'true');


animationContainer1.classList.add('behind_search_animation', 'default_opacity');
animationContainer2.classList.add('behind_search_animation', 'default_opacity');
document.documentElement.classList.add('behind_search_animation_wrap')

animationContainer1.innerHTML = ''
animationContainer2.innerHTML = ''
Expand Down Expand Up @@ -1056,12 +1058,15 @@ class Meteor {

document.getElementById('background_animation').setAttribute('running_fog', 'true')

animationContainer1.classList.add('behind_search_animation');
animationContainer2.classList.add('behind_search_animation');
document.documentElement.classList.add('behind_search_animation_wrap')

animationContainer1.innerHTML = ''
animationContainer2.innerHTML = ''

var animationData1 = 'lottie_animations/haze_smoke_foreground.json';
animationContainer1.style.opacity = '0.4'
animationContainer1.style = 'z-index: 1; opacity: 0.4; height: 40% !important;'

anim1fog = bodymovin.loadAnimation({
container: animationContainer1,
Expand Down Expand Up @@ -1160,10 +1165,17 @@ class Meteor {
anim1CloudFull.destroy();
}

if (anim2CloudFull) {
anim2CloudFull.destroy();
}


animationContainer1.setAttribute('running_clouds_full', 'true');
animationContainer2.setAttribute('running_clouds_full', 'true');

animationContainer1.classList.add('behind_search_animation');
animationContainer2.classList.add('behind_search_animation');
document.documentElement.classList.add('behind_search_animation_wrap')


animationContainer1.innerHTML = ''
Expand Down Expand Up @@ -1214,6 +1226,10 @@ class Meteor {
if(document.getElementById('background_animation').getAttribute('running_clouds') || document.getElementById('foreground_animation').getAttribute('running_clouds')){
document.getElementById('background_animation').removeAttribute('running_clouds')
document.getElementById('foreground_animation').removeAttribute('running_clouds');
document.getElementById('background_animation').classList.remove('behind_search_animation', 'default_opacity');
document.getElementById('foreground_animation').classList.remove('behind_search_animation', 'default_opacity');
document.documentElement.classList.remove('behind_search_animation_wrap')

}
if (anim1Cloud) anim1Cloud.destroy();

Expand All @@ -1227,7 +1243,13 @@ class Meteor {
function removeFog(){
if (anim1fog) anim1fog.destroy();

document.getElementById('background_animation').style.opacity = ''

document.getElementById('background_animation').style = 'z-index: 1;'
document.getElementById('background_animation').classList.remove('behind_search_animation');
document.getElementById('foreground_animation').classList.remove('behind_search_animation');
document.documentElement.classList.remove('behind_search_animation_wrap')


}

function removeThunder(){
Expand All @@ -1252,6 +1274,9 @@ class Meteor {
if(document.getElementById('background_animation').getAttribute('running_clouds_full') || document.getElementById('foreground_animation').getAttribute('running_clouds_full')){
document.getElementById('background_animation').removeAttribute('running_clouds_full')
document.getElementById('foreground_animation').removeAttribute('running_clouds_full');
document.getElementById('background_animation').classList.remove('behind_search_animation');
document.getElementById('foreground_animation').classList.remove('behind_search_animation');
document.documentElement.classList.remove('behind_search_animation_wrap')
}

if (anim1CloudFull) anim1CloudFull.destroy();
Expand Down
39 changes: 38 additions & 1 deletion app/src/main/assets/ui-files/ui.css
Original file line number Diff line number Diff line change
Expand Up @@ -2610,6 +2610,15 @@ max-width: 150px;
.close_search{
display: none !important;
}
.behind_search_animation_wrap .behind_search_animation{
position: fixed;
z-index: 0;
height: auto !important;
width: 50% !important;
opacity: 0.7;
left: 50% !important;
top: -25px;
}
}

.animation_canvas{
Expand Down Expand Up @@ -2777,7 +2786,7 @@ Tempmeterbaritem span{


.currentConditionItem {
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.2);
}

.no_touch_screen{
Expand Down Expand Up @@ -3007,4 +3016,32 @@ Tempmeterbaritem span{
align-items: center;
justify-content: center;
gap: 10px;
}

.behind_search_animation_wrap .behind_search_animation{
position: fixed;
z-index: 0;
height: auto !important;
opacity: 0.7;
top: -25px;
}

.behind_search_animation_wrap .behind_search_animation.default_opacity{
opacity: 1 !important;
}

.behind_search_animation_wrap .behind_search_animation::after{
position: absolute;
top: 25px;
left: 0;
width: 100%;
height: 100%;
content: '';
background: linear-gradient(0deg, transparent 80%, var(--Surface));
}


.behind_search_animation_wrap .header_hold{
z-index: 5;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.2);
}

0 comments on commit 74c6a62

Please sign in to comment.