Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#canvas').css('width', '100%');
- $(window).resize(function(){
- $('#canvas').height($('#canvas').width() / 2.031);
- });
- ctx.canvas.width = window.innerWidth;
- ctx.canvas.height = 3*window.innerWidth/4;
- $('#canvas').css('width', $(window).width());
- $('#canvas').css('height', $(window).height());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement