forked from neontribe/untangled-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 54c5e75
Showing
8 changed files
with
3,513 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
# dependencies | ||
/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Oops, something went wrong.