-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
73 lines (57 loc) · 2.4 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
<!doctype html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, user-scalable=yes">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@okawa_h_">
<meta property="og:url" content="https://okawa-h.github.io/playroom-three.js/">
<meta property="og:title" content="helloworld">
<meta property="og:description" content="made by three.js and Haxe">
<meta property="og:image" content="https://okawa-h.github.io/playroom-three.js/particle-conect-line/image.jpg">
<link rel="stylesheet" href="files/css/style.css">
<title>helloworld</title>
</head>
<body>
<div class="index" id="all">
<div id="project-list"></div>
</div>
<script>
(function() {
String.prototype.capitalize = function() {
return this.charAt(0).toUpperCase() + this.slice(1);
}
function getItemHtml(category,info) {
var name = info.key;
var isImage = info.image;
var status = 'particle' == name ? ' featured' : '';
var filePath = category + '-' + name + '/';
var item = isImage ? '<figure><img src="' + filePath + 'image.jpg"><figcaption>' + name + '</figcaption></figure>':name;
return '<li class="file' + status + '"><a href="' + filePath + '">' + item + '</a></li>';
}
var data = {
'particle' : [{ key:'conect-line',image:true },{ key:'ground',image:true },{ key:'image',image:true },{ key:'image-move',image:true },{ key:'move',image:true },{ key:'sphere',image:true }],
'line' : [{ key:'ground-to-cube',image:true },{ key:'ground(BufferGeometry)',image:true },{ key:'lattice(BufferGeometry)',image:true },{ key:'simple-noise(BufferGeometry)',image:true }],
'mesh' : [{ key:'image',image:true }],
'video' : [{ key:'viewer',image:true },{ key:'viewer-mesh',image:true },{ key:'particle',image:true }],
'camera' : [{ key:'view' },{ key:'processing' },{ key:'particle' }],
'model' : [{ key:'view',image:true }]
};
var html = '';
for (var category in data) {
var infoList = data[category];
html += '<section class="' + category + '">';
html += '<h2>' + category.capitalize() + '</h2>';
html += '<ul>';
for (var i = 0; i < infoList.length; i++) {
html += getItemHtml(category,infoList[i]);
}
html += '</ul>';
html += '</section>';
}
document.getElementById('project-list').innerHTML = html;
})();
</script>
</body>
</html>