-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.html
100 lines (88 loc) · 3.17 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Nature of code 3D - Chapter 6. Autonomous Agents</title>
<meta property="og:title" content="Nature of code 3D - Chapter 6. Autonomous Agents">
<meta property="og:description"
content="Daniel Shiffman's Nature of code examples examples in 3D, ported to javascript (ES6). The chapter on Autonomous Agents.">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<style>
body {
background-color: #848484;
color: #FFF;
font-family: Helvetica, Arial, sans-serif;
font-size: 13px;
padding: 30px;
margin: 0;
}
a {
color: #FFF;
}
li {
text-transform: uppercase;
padding: 5px 0;
}
li a:hover {
font-weight: bold;
color: #FFF !important;
}
li strong {
color: white;
font-size: 16px;
font-weight: bold;
padding: 2px 4px;
background-color: red;
margin-left: 10px;
}
</style>
</head>
<body>
<h1>Nature of code 3D<br>Chapter 6. Autonomous Agents</h1>
<p>
Daniel Shiffman's <a href="http://natureofcode.com/">Nature of Code</a> examples in 3D, ported to javascript (ES6).
</p>
<p>
<strong>Note 1:</strong> Click and drag to move camera, mousewheel to zoom
<br>
<strong>Note 2:</strong> Click INFO for options
</p>
<ol id="pages">
<li><a href="NOC_6_01_Seek/public/index.html">Seek</a></li>
<li><a href="NOC_6_01_Seek_trail/public/index.html">Seek with trail</a></li>
<li><a href="NOC_6_01_Seek_trail_MeshLine/public/index.html">Seek with 3d mesh line trail</a> <strong>NEW!</strong></li>
<li><a href="NOC_6_02_Arrive/public/index.html">Seek and arrive</a></li>
<li><a href="NOC_6_03_StayWithinWalls/public/index.html">Stay within walls</a></li>
<li><a href="NOC_6_04_Flowfield/public/index.html">Flow field</a></li>
<li><a href="NOC_6_05_PathFollowingSimple/public/index.html">Follow a path (simple)</a></li>
<li><a href="NOC_6_06_PathFollowing/public/index.html">Follow a path (advanced)</a></li>
<li><a href="NOC_6_06_PathFollowing_MeshLine/public/index.html">Follow a path (3d mesh lines)</a> <strong>NEW!</strong></li>
<li><a href="NOC_6_07_Align-Separate/public/index.html">Alignment and separation</a></li>
<li><a href="NOC_6_08_SeparationAndSeek/public/index.html">Separation and seek</a></li>
<li><a href="NOC_6_09_Flocking/public/index.html">Flocking</a></li>
<li><a href="NOC_6_13_CrowdPathFollowing/public/index.html">Crowd following a path</a></li>
</ol>
<script>
var colors = [
'#CFF09E',
'#A8DBA8',
'#79BD9A',
'#3B8686',
'#0B486B',
'#69D2E7',
'#A7DBD8',
'#E0E4CC',
'#F38630',
'#FA6900'
]
var li = document.querySelectorAll('#pages li')
var a = document.querySelectorAll('#pages a')
li.forEach(function (li, i) {
var color = colors[i % colors.length]
li.style.color = color
a[i].style.color = color
})
</script>
</body>
</html>