mirror of
https://github.com/seigler/generative
synced 2025-07-26 06:46:10 +00:00
Make room for future sketches
This commit is contained in:
parent
2e601c4bb1
commit
23828113b2
5 changed files with 31 additions and 6 deletions
|
@ -3,10 +3,12 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title></title>
|
||||
<title>Generative Art - seigler.github.io</title>
|
||||
<link rel="stylesheet" href="DIGEST(app.css)">
|
||||
<style>footer { position: fixed; bottom: 0; left: 0; right: 0; color: white; } </style>
|
||||
</head>
|
||||
<body>
|
||||
<footer>space or double click for a new one</footer>
|
||||
<script src="modules/p5.min.js"></script>
|
||||
<script src="modules/p5.sound.min.js"></script>
|
||||
<script src="DIGEST(app.js)"></script>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
document.addEventListener('DOMContentLoaded', function() {
|
||||
require('sketch');
|
||||
require('sketches/1');
|
||||
});
|
||||
|
|
|
@ -17,6 +17,11 @@ new p5(sketch => {
|
|||
sketch.setup = () => {
|
||||
goalInstances = 100;
|
||||
|
||||
window.onhashchange = () => {
|
||||
seed = window.location.hash.substr(1);
|
||||
generate();
|
||||
};
|
||||
|
||||
seed = window.location.hash.substr(1);
|
||||
sketch.noStroke();
|
||||
sketch.colorMode(sketch.HSB, 100);
|
||||
|
@ -36,17 +41,22 @@ new p5(sketch => {
|
|||
pass2.noStroke();
|
||||
|
||||
generate();
|
||||
}
|
||||
};
|
||||
|
||||
sketch.draw = () => {
|
||||
}
|
||||
};
|
||||
|
||||
sketch.keyPressed = () => {
|
||||
if (sketch.key == ' ') {
|
||||
seed = null;
|
||||
generate();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
sketch.doubleClicked = () => {
|
||||
seed = null;
|
||||
generate();
|
||||
};
|
||||
|
||||
function generate() {
|
||||
if (seed) {
|
10
package-lock.json
generated
10
package-lock.json
generated
|
@ -4886,6 +4886,16 @@
|
|||
"integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=",
|
||||
"dev": true
|
||||
},
|
||||
"git-directory-deploy": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/git-directory-deploy/-/git-directory-deploy-1.5.1.tgz",
|
||||
"integrity": "sha1-xPrYwnDWeNXzCfvd6sHtpgytf9I=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lodash": "^4.14.2",
|
||||
"minimist": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"glob": {
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
"name": "p5-brunch",
|
||||
"repository": "",
|
||||
"scripts": {
|
||||
"start": "brunch watch --server",
|
||||
"build": "rm -rf public/ && brunch build --production",
|
||||
"start": "brunch watch --server"
|
||||
"deploy": "npm run build && npm run push-gh-pages",
|
||||
"push-gh-pages": "git-directory-deploy --directory public/"
|
||||
},
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
|
@ -19,6 +21,7 @@
|
|||
"clean-css-brunch": "^2.10.0",
|
||||
"copycat-brunch": "^1.1.1",
|
||||
"digest-brunch": "^1.6.0",
|
||||
"git-directory-deploy": "^1.5.1",
|
||||
"uglify-js-brunch": "^2.10.0"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue