Skip to content

Instantly share code, notes, and snippets.

@lmccart
Last active September 14, 2018 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lmccart/73ad4a1a97e380d71a9ed6c98442bbe1 to your computer and use it in GitHub Desktop.
Save lmccart/73ad4a1a97e380d71a9ed6c98442bbe1 to your computer and use it in GitHub Desktop.
test.html
function setup() {
createCanvas(400, 400);
}
function touchEnded(e) {
console.log(e);
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- <script src="//code.jquery.com/jquery-2.2.1.min.js"></script> -->
<script src='../lib/p5.js'></script>
<script src='../lib/addons/p5.dom.js'></script>
<script src='../lib/addons/p5.sound.js'></script>
<script src='sketch.js'></script>
</head>
<body>
</body>
</html>
@lmccart
Copy link
Author

lmccart commented Sep 14, 2018

  1. make a folder inside p5.js/ called "experiments"
  2. add two files "index.html" and "sketch.js" (see above for index.html code, sketch.js is your p5.js code)
  3. to run python server:
    cd p5.js
    python -m SimpleHTTPServer
  4. visit http://localhost:8000 to run code

** note: do not commit experiments folder to github repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment