Discussions » Creation Requests

script request littlebigsnake game

§
Posted:
Edited:

script request littlebigsnake game

Hi,

I request script for littlebigsnake.com game. Snake Speed and Zoom would be great. Anything else you can think of would be helpful.

I was not able to find script tag so I am pasting what I have tried. I am novice so it didn't worked what I found from the game source page and modified 2 values.

tried below code for zoom out but didn't worked. some error related $

<script type="text/javascript">
    $(window).on('resize', function () {
        draw();
    });

    function draw() {
        var w = $(window);
        var defaultWidth = 2080;
        var defaultHeight = 1200;
        var contentScale = Math.min(/*w.width() / defaultWidth,*/ w.height() / defaultHeight) * 1;//0.8;
        $("#gamePanel").css({transform: "translate(-50%,-50%) scale(" + (contentScale) + ")"});
        $("#preloader").css({transform: "translate(-50%,-50%) scale(" + (contentScale) + ")"});
        $("#leafs").css({transform: "translate(-50%,-50%) scale(" + (contentScale) + ")"});
        $("#leafsDark").css({transform: "translate(-50%,-50%) scale(" + (contentScale) + ")"});
        $("#screenConnectionLost").css({transform: "translate(-50%,-50%) scale(" + (contentScale) + ")"});
        $("#screenForgot").css({transform: "translate(-50%,-50%) scale(" + (contentScale) + ")"});

        var smartScale = Math.max(Math.min(contentScale, 1), 0.75);
        $("#mobileSignInPanel").css({transform: "translate(-50%,"+ ((1 - (contentScale*0.8 )) * 50) +"%) scale(" + (contentScale*0.8 ) + ")"});
        $("#officialSitePanel").css({transform: "translate(-50%,0%) scale(" + (smartScale) + ")"});
        $("#news").css({transform: "translate(-50%," + ((1 - smartScale) * 50) + "%) scale(" + (smartScale) + ")"});
        $("#copyrightPanel").css({transform: "translate(-50%," + ((1 - smartScale) * 50) + "%) scale(" + (smartScale) + ")"});


        var smartScale = Math.max(Math.min(contentScale, 1), 0.75);
        $("#iframe_buttons_panel").css({transform: "scale(" + smartScale + ")"});
    }

    draw();
</script> 
§
Posted:

Can anyone help on this request.

Post reply

Sign in to post a reply.