Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
edpe committed May 22, 2019
0 parents commit 54c5e75
Show file tree
Hide file tree
Showing 8 changed files with 3,513 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

# dependencies
/node_modules
30 changes: 30 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Untangled P5 Project template
---

### To run the Project

In your terminal window type:

```git clone ***
cd p5-template
npm install
npm run dev
```
The last command will start [browser-sync](https://browsersync.io/) which will allow you to run the project in your browser. Your terminal will tell you the address of your sketch, it will look something like this:
```
[Browsersync] Access URLs:
---------------------------------------
Local: http://localhost:3000
```
Your browser should open your sketch in a new tab automatically. If for any reason the window closes, copy and paste this address into your broswer and you should see your sketch.

If a window opens, but you don't see your sketch, hit f12 or right-click and select 'inspect' in your browser window and look for error messages in your console.

---
### To add a library

You can find libraries that work with p5.js [here](https://p5js.org/libraries/)

Of course you can install any other library you like like [Tone.js](https://tonejs.github.io/) or [Matter](http://brm.io/matter-js/)

You can do this either by importing the library files directly into your project or by installing via [NPM](https://www.npmjs.com/)
Binary file added favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>p5-template</title>
<!-- // load your library files here -->
<script src="node_modules/p5/lib/p5.js"></script>
<script src="node_modules/p5/lib/addons/p5.dom.js"></script>
<script src="node_modules/tone/build/Tone.js"></script>

<!-- // this is the sketch file you will see when you run the project -->
<script src="sketches/sketch.js"></script>
<!-- swap the above script for the one below to see the sketch from the Untangled website -->
<!-- <script src="sketches/hexagons.js"></script> -->

<style>
body {
margin:0;
padding:0;
overflow: hidden;
}
canvas {
margin:auto;
}
</style>
</head>
<body>
</body>
</html>
Loading

0 comments on commit 54c5e75

Please sign in to comment.