Skip to content

Commit 609be7b

Browse files
committed
Initial commit
0 parents  commit 609be7b

File tree

8 files changed

+43910
-0
lines changed

8 files changed

+43910
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_Store

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Recurse Center - Code for Art
2+
3+
This repo contains starter code for making art (or at least doing visual things) with code, using [p5.js](https://p5js.org/).
4+
5+
If you have git on your machine, clone this repo with:
6+
7+
```git clone git@github.com:aac/rc-codeforart.git```
8+
9+
The repo contains an HTML file, `index.html`, which contains a canvas element and includes the Javascript files for p5. It also loads `sketch.js`, which contains our code for interacting with p5 and drawing things in the canvas element. In the `empty` branch, `sketch.js` just contains an empty p5.js skeleton. The various branches have different sketches. List the branches with `git branch`.
10+
11+
To see the output of your code, just load index.html in your web browser. (On macOS you can do that from the CLI by entering `open index.html` inside the git repo directory.)
12+
13+
p5.js has a lot of awesome functionality that I won't cover exhaustively. Check out [the reference page](https://p5js.org/reference/) for the full list of included features.
14+
15+
One of the best resources for beginners is Dan Shiffman's book [*The Nature Of Code*](http://natureofcode.com/book/) (featuring RC S1'17 Evan Emolo in the credits). If you're looking for ideas, it's a great place to start. The book uses the Java based Processing programming environment, but there are [p5.js versions of the examples](https://github.com/shiffman/The-Nature-of-Code-Examples-p5.js/).
16+
17+
Dan also hosts a YouTube channel called [The Coding Train](http://thecodingtrain.com/) where he walks through a wide range of visual (and other) programming concepts.

index.html

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<html>
2+
<head>
3+
<meta charset="UTF-8">
4+
5+
<script language="javascript" type="text/javascript" src="libraries/p5.js"></script>
6+
7+
<!-- uncomment lines below to include extra p5 libraries -->
8+
<script language="javascript" src="libraries/p5.dom.js"></script>
9+
<!--<script language="javascript" src="libraries/p5.sound.js"></script>-->
10+
<script language="javascript" src="libraries/chroma.js"></script>
11+
12+
<style>
13+
body {
14+
padding: 0;
15+
margin: 0;
16+
}
17+
</style>
18+
</head>
19+
20+
<body>
21+
<script
22+
language="javascript"
23+
type="text/javascript"
24+
src="sketch.js">
25+
</script>
26+
</body>
27+
</html>

0 commit comments

Comments
 (0)