mirror of
https://github.com/seigler/generative
synced 2025-07-26 22:56:10 +00:00
🐣 Brunch P5 skeleton
This commit is contained in:
commit
3402feb22c
9 changed files with 7607 additions and 0 deletions
14
app/assets/index.html
Normal file
14
app/assets/index.html
Normal 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
3
app/initialize.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
document.addEventListener('DOMContentLoaded', function() {
|
||||
require('sketch');
|
||||
});
|
14
app/sketch.js
Normal file
14
app/sketch.js
Normal 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
12
app/styles.css
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue