-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.html
227 lines (211 loc) · 7.16 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta charset="utf-8" />
<title>The Parthenon Project</title>
<meta name="description" content="Exploring the Parthenon and the Acropolis in XR" />
<script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
<script src="./components/camera-cube-env.js"></script>
<style>
html {
font-size: 14px;
}
body {
font: 400 1.1rem/1.6 Fira Sans,Helvetica,Arial,sans-serif;
}
ul {
list-style: none;
margin: 0;
padding: 0;
}
aside {
display: block;
width: 30%;
height: 100%;
max-width: 400px;
min-width: 300px;
margin-left: 0px;
background: #efa42d;
overflow-x: hidden;
}
#sideBar {
display: block;
padding: 2rem;
overflow-y: auto;
}
#Title {
font-size: 2.3rem;
color: #FFFFFF;
line-height: 110%;
margin-bottom: 3rem;
}
#subTitle {
font-size: 1.3rem;
color: rgb(180 70 10);
line-height: 110%;
text-transform: uppercase;
}
.button {
font-size: 1.1rem;
color: #000000;
padding: .5rem, .5rem, .5rem, .5rem;
height: 2rem;
margin-left: -.4rem;
}
.button:hover {
font-size: 1.1rem;
color: #FFFFFF;
background-color: rgb(230 135 40);
cursor: pointer;
}
#content {
display: block;
width: 80%;
Height: 100%;
}
#exampleIframe {
border: 0px;
display: block;
width: 100%;
height: 100%;
}
#main {
display: flex;
height: 100%;
}
a {
height: 2rem;
padding: .5rem;
text-decoration: none;
text-transform: uppercase;
}
#description {
color: #ffffff;
}
#description1 {
color: #ffffff;
}
.descriptions {
color: #ffffff;
margin-left: 1rem;
margin-right: 3rem;
}
.youtubeLink {
font-size: 1.2rem;
color: rgb(180 70 10);
cursor: pointer;
text-transform: capitalize;
margin-left: -.5rem;
}
.youtubeLink:hover {
color: #000000;
background-color: #efa42d;
}
li {
padding-bottom: .5rem;
}
@media only screen and (max-width: 1000px) {
aside {
width: 20%;
height: 100%;
max-width: 350px;
min-width: 250px;
}
#sideBar {
padding: 2rem;
}
#Title {
font-size: 1.5rem;
color: #FFFFFF;
line-height: 100%;
margin-bottom: 2rem;
}
#subTitle {
font-size: 1.1rem;
line-height: 100%;
text-transform: uppercase;
}
.button {
font-size: .9rem;
color: #000000;
padding: .3rem, .3rem, .3rem, .3rem;
height: 1.5rem;
margin-left: -.2rem;
}
.button:hover {
font-size: .9rem;
}
a {
height: 1.5rem;
padding: .3rem;
}
.descriptions {
font-size: .9rem;
margin-left: .5rem;
margin-right: 1.5rem;
}
.youtubeLink {
font-size: .9rem;
margin-left: -.2rem;
}
}
</style>
</head>
<body class="a-body ">
<script>
function loadExample(myURL) {
document.getElementById("exampleIframe").src = myURL;
if(myURL == 'https://colinfizgig.github.io/aframe_Components/Cube_Camera_Environment_Reflect.html'){
document.getElementById('description').innerHTML = "This is a example of a my cubecamera component which attaches a three.js cubeCamera to a reflective object and loads the texture from that camera as a cube environment map for reflection. For a tutorial on how it works and why it's useful check out </br></br><a class='youtubeLink' href='https://www.youtube.com/watch?v=Qkdq9JxSogg'>Aframe Materials Tutorial</a></br></br>";
document.getElementById('description1').innerHTML = '';
document.getElementById('description2').innerHTML = '';
document.getElementById('description3').innerHTML = '';
}else if(myURL == 'https://colinfizgig.github.io/aframe_Components/Cube_Camera_Environment_Refract.html'){
document.getElementById('description1').innerHTML = "This is a example of a my cubecamera component which attaches a three.js cubeCamera to a refractive object and loads the texture from that camera as a cube environment refraction map. This is useful for simulating transparent objects with refraction that warps the transparent image. Play with setting the refraction ratio lower or higher to create more or less distortion. Setting the roughness property on the material will make the object seem opaque and blurry like a marble</br></br>";
document.getElementById('description').innerHTML = '';
document.getElementById('description3').innerHTML = '';
document.getElementById('description2').innerHTML = '';
}else if(myURL == 'https://colinfizgig.github.io/aframe_Components/lightTest.html'){
document.getElementById('description2').innerHTML = "This is a example of a my light map component which attaches a baked light map to the standard material light map in aframe. This is not exposed in the material interface and requires a second set of UVs on the object. For a tutorial on how it works and why it's useful check out </br></br><a class='youtubeLink' href='https://www.youtube.com/watch?v=G0M4OBThID8'>Baked Lighting Tutorial</a></br></br>";
document.getElementById('description').innerHTML = '';
document.getElementById('description1').innerHTML = '';
document.getElementById('description3').innerHTML = '';
}else if(myURL == 'https://colinfizgig.github.io/aframe_Components/Arcade_Merged.html'){
document.getElementById('description3').innerHTML = "This is a example using an HTML5 canvas as a texture. To play the asteroids game hit the space bar on your computer and use the 'J','I','L' and 'M' KEYS to navigate the ship. Use the 'SPACE BAR' to fire at the asteroids. I'm working on a tutorial which shows ways to speed up peformance of this type of interactive texture in WebGL. For best performance use the Chrome browser which seems to render the tag with less overhead than Firefox. </br></br>";
document.getElementById('description').innerHTML = '';
document.getElementById('description1').innerHTML = '';
document.getElementById('description2').innerHTML = '';
}
}
</script>
<div id="main">
<aside>
<div id="sideBar">
<div id="Title">Colin's</br>Aframe</br>Components</br></div>
<div id="subTitle">Examples</br></div>
</br>
<div>
<ul class="links">
<li>
<div class="button"><a onclick="loadExample('https://colinfizgig.github.io/aframe_Components/Cube_Camera_Environment_Reflect.html')">Camera Cube Reflect</a></div>
<div id="description" class="descriptions"></div>
</li>
<li>
<div class="button"><a onclick="loadExample('https://colinfizgig.github.io/aframe_Components/Cube_Camera_Environment_Refract.html')">Camera Cube Refract</a></div>
<div id="description1" class="descriptions"></div>
</li>
<li>
<div class="button"><a onclick="loadExample('https://colinfizgig.github.io/aframe_Components/lightTest.html')">Baked Light Mapping</a></div>
<div id="description2" class="descriptions"></div>
</li>
<li>
<div class="button"><a onclick="loadExample('https://colinfizgig.github.io/aframe_Components/Arcade_Merged.html')">Interactive Canvas Texture</a></div>
<div id="description3" class="descriptions"></div>
</li>
</br>
</ul>
</div>
</aside>
<div id="content">
<iframe id="exampleIframe" class="example__iframe" width="100%" height="100%" allowfullscreen="yes" scrolling="no" allowvr="yes" src="./Cube_Camera_Environment_Reflect.html"></iframe>
</div>
</div>
</body></html>