softer scream and aspect ratio fix

This commit is contained in:
Nicky Case 2019-05-06 21:26:00 -04:00
parent 284e144159
commit 3bcdc71efb
2 changed files with 8 additions and 6 deletions

View File

@ -33,11 +33,13 @@
<!-- Mobile --> <!-- Mobile -->
<meta name="viewport" content="width=360, user-scalable=no" id="my_viewport"> <meta name="viewport" content="width=360, user-scalable=no" id="my_viewport">
<script> <script>
var ratio = screen.width/screen.height; window.addEventListener("load", function(){
if(ratio > 360/600){ var ratio = screen.width/screen.height;
var mvp = document.getElementById('my_viewport'); if(ratio > 360/600){
mvp.setAttribute('content','width='+Math.round(ratio*600)+', height=600, user-scalable=no'); var mvp = document.getElementById('my_viewport');
} mvp.setAttribute('content','width='+Math.round(ratio*600)+', height=600, user-scalable=no');
}
});
</script> </script>
</head> </head>

View File

@ -168,7 +168,7 @@ function BG_Intro(){
} }
if(!SHOWN_LOGO && ticker>=530/30){ if(!SHOWN_LOGO && ticker>=530/30){
SHOWN_LOGO = true; SHOWN_LOGO = true;
sfx("intro_scream"); sfx("intro_scream", {volume:0.9});
} }
if(GAME_TRANSITION==0 && SHOWN_LOGO){ if(GAME_TRANSITION==0 && SHOWN_LOGO){
self.logoSprite.draw(ctx); self.logoSprite.draw(ctx);