/
glamskybox.html
executable file
·52 lines (46 loc) · 1.36 KB
/
glamskybox.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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="../../build/glam.min.js" ></script>
<title>glam - Scene with skybox background and environment map</title>
<style>
body{
margin: 0px;
background-color: #000;
}
#cube1 {
diffuse-color:lightgray;
cube-image-right:url(../../images/sky35/rightcity.png);
cube-image-left:url(../../images/sky35/leftcity.png);
cube-image-top:url(../../images/sky35/topcity.png);
cube-image-bottom:url(../../images/sky35/botcity.png);
cube-image-front:url(../../images/sky35/frontcity.png);
cube-image-back:url(../../images/sky35/backcity.png);
shader:phong;
}
#sb1 {
background-type:box;
cube-image-right:url(../../images/sky35/rightcity.png);
cube-image-left:url(../../images/sky35/leftcity.png);
cube-image-top:url(../../images/sky35/topcity.png);
cube-image-bottom:url(../../images/sky35/botcity.png);
cube-image-front:url(../../images/sky35/frontcity.png);
cube-image-back:url(../../images/sky35/backcity.png);
}
</style>
</head>
<body>
<!--
glam - Skybox backgrounds
-->
<div id="container" style="width:98%; height:98%;position:absolute;">
<glam>
<scene>
<background id="sb1"></background>
<box id="cube1"></box>
</scene>
</glam>
</div>
</body>
</html>