Skip to content
This repository was archived by the owner on Apr 6, 2020. It is now read-only.

Commit f62b210

Browse files
authored
adds ml5-boilerplate (#241)
1 parent 51738c8 commit f62b210

File tree

4 files changed

+52
-0
lines changed

4 files changed

+52
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>Getting Started with ml5.js</title>
5+
<!-- ml5 -->
6+
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js"></script>
7+
</head>
8+
9+
<body>
10+
<script src="sketch.js"></script>
11+
</body>
12+
</html>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Your code will go here
2+
// open up your console - if everything loaded properly you should see 0.3.0
3+
console.log('ml5 version:', ml5.version);
4+
5+
function setup(){
6+
createCanvas(400, 400);
7+
}
8+
9+
function draw(){
10+
background(200);
11+
12+
}

p5js/ml5_boilerplate/index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>Getting Started with ml5.js</title>
5+
<!-- p5 -->
6+
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.min.js"></script>
7+
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.dom.min.js"></script>
8+
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.sound.min.js"></script>
9+
<!-- ml5 -->
10+
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js"></script>
11+
</head>
12+
13+
<body>
14+
<script src="sketch.js"></script>
15+
</body>
16+
</html>

p5js/ml5_boilerplate/sketch.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Your code will go here
2+
// open up your console - if everything loaded properly you should see 0.3.0
3+
console.log('ml5 version:', ml5.version);
4+
5+
function setup(){
6+
createCanvas(400, 400);
7+
}
8+
9+
function draw(){
10+
background(200);
11+
12+
}

0 commit comments

Comments
 (0)