🐣 Brunch P5 skeleton

This commit is contained in:
Joshua Seigler 2019-11-03 10:11:03 -05:00 committed by Joshua Seigler
commit 3402feb22c
9 changed files with 7607 additions and 0 deletions

14
app/assets/index.html Normal file
View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<link rel="stylesheet" href="DIGEST(app.css)">
</head>
<body>
<script src="modules/p5.min.js"></script>
<script src="modules/p5.sound.min.js"></script>
<script src="DIGEST(app.js)"></script>
</body>
</html>

3
app/initialize.js Normal file
View file

@ -0,0 +1,3 @@
document.addEventListener('DOMContentLoaded', function() {
require('sketch');
});

14
app/sketch.js Normal file
View file

@ -0,0 +1,14 @@
new p5(sketch => {
sketch.preload = () => {
/* load images and music */
}
sketch.setup = () => {
sketch.createCanvas(640, 480);
sketch.background('#fff');
}
sketch.draw = () => {
//
}
});

12
app/styles.css Normal file
View file

@ -0,0 +1,12 @@
html, body {
height: 100%;
}
body {
background-color: #000;
margin: 0;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
}