Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Wallpaper</title>
- <script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.js"></script>
- <script type="text/javascript">
- function ResizeCanvas()
- {
- var can = $("canvas")[0];
- if(($(window).width() * 0.5625) > $(window).height())
- {
- $(can).css("max-width", "100%");
- $(can).css("max-height", "");
- }
- else
- {
- $(can).css("max-width", "");
- $(can).css("max-height", "100%");
- }
- }
- $(document).ready(function()
- {
- ResizeCanvas();
- $(window).resize(ResizeCanvas);
- function GetTime()
- {
- var d = new Date();
- var n = d.getTime();
- return n / 1000;
- }
- var time = GetTime();
- var S = Math.sin;
- var C = Math.cos;
- var T = Math.tan;
- var R = function(r, g, b, a)
- {
- if(typeof(a) == "undefined")
- a = 1.0;
- return "rgba(" + parseInt(r) + ", " + parseInt(g) + ", " + parseInt(b) + ", " + a + ")";
- }
- var c = $("canvas")[0];
- var x = c.getContext("2d");
- setInterval(function()
- {
- u(GetTime() - time);
- }, 1000/60);
- /* Paste the dweet here */
- });
- </script>
- <style>
- html,body{
- width:100%;
- height:100%;
- padding:0px;
- margin:0px;
- overflow:hidden;
- }
- canvas{
- object-fit: contain;
- }
- </style>
- </head>
- <body>
- <canvas id="c" width="1920" height="1080"></canvas>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment