-
-
Save mwiemarc/eaca77efb45cb096b59bf5d02ba806a8 to your computer and use it in GitHub Desktop.
This is the template of html file to use for p5js projects for me
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment