Skip to content

Instantly share code, notes, and snippets.

@mwiemarc
Forked from iashris/index.html
Created April 25, 2024 21:20
Show Gist options
  • Select an option

  • Save mwiemarc/eaca77efb45cb096b59bf5d02ba806a8 to your computer and use it in GitHub Desktop.

Select an option

Save mwiemarc/eaca77efb45cb096b59bf5d02ba806a8 to your computer and use it in GitHub Desktop.

Revisions

  1. @iashris iashris created this gist Nov 24, 2016.
    41 changes: 41 additions & 0 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,41 @@
    <!DOCTYPE html>
    <html>
    <head>
    <title>p5js fullscreen template</title>
    </head>
    <style type="text/css">
    canvas {
    position: fixed;
    top: 0; left: 0;
    z-index: 1;
    }
    #content{
    position: relative;
    z-index: 2;
    }
    </style>
    <body>
    <div id = "content"></div>
    </body>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.4/p5.min.js"></script>
    <script type="text/javascript">

    function setup() {

    createCanvas(windowWidth, windowHeight);


    }

    function draw() {

    }

    function windowResized() {
    resizeCanvas(windowWidth, windowHeight);
    }



    </script>
    </html>