-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
87 lines (80 loc) · 3.27 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
<html>
<head>
<meta charset='utf-8'>
<title>Air Hockey</title>
<script type="text/javascript" src="utils.js"></script>
<script type="text/javascript" src="webgl-lessons-ui.js"></script>
<script type = "text/javascript" src="webgl-utils.js"></script>
<script type="text/javascript" src="drawing.js"></script>
<style>
/* remove the border */
body {
border: 0;
background-color: white;
}
/* make the canvas the size of the viewport */
canvas {
width: 80%;
height: 100%;
overflow: hidden;
}
#options {
float: left;
}
</style>
</head>
<body onLoad="main();">
<canvas id="c">
Your browser does not support the HTML5 canvas element.
</canvas>
<audio id="hit" src="audio/hit.ogg" ></audio>
<audio id="goal" src="audio/goal.ogg" ></audio>
<audio id="edge" src="audio/edge.ogg" ></audio>
<table id="options">
<tr>
<td style="background-color: white; font-family: courier; padding: 5px;">
<!--<button name="reset" onclick="reset()">Reset</button>-->
<p><h2> Options </h2></p>
<p><b> Camera View </b></p>
<button name="front" value="0" onclick="updateCamera(this.value)">FRONT</button>
<button name="top" value="1" onclick="updateCamera(this.value)">TOP</button>
<button name="back" value="2" onclick="updateCamera(this.value)">BACK</button>
<p><b> Animation </b></p>
<button name="startAnimation" onclick="startAnimation()">Start</button>
<br><br>
<div id="cameraAngle"></div>
<div id="cameraElevation"></div>
<div id="fieldOfView"></div>
<p><b> Light Source </b></p>
<form>
<input type="radio" name="light" id="yesl" onchange="updateLightType(this.value);" value="1" checked> Directional <br/>
<input type="radio" name="light" onchange="updateLightType(this.value);" value="2" > Point <br/>
<input type="radio" name="light" onchange="updateLightType(this.value);" value="3" > Point w. Decay <br/>
<input type="radio" name="light" onchange="updateLightType(this.value);" value="4" > Spot <br/>
<input type="radio" name="light" id="nol" onchange="updateLightType(this.value);" value="5" > [NO Light] <br/>
</form>
<p><b> Light Computation </b></p>
<form>
<input type="radio" name="type" onchange="updateShader(this.value);" value="1" > Per Vertex <br/>
<input type="radio" name="type" onchange="updateShader(this.value);" value="0" checked> Per Fragment <br/>
</form>
<form>
<input type="radio" name="type" onchange="updateSpecRefl(this.value);" value="1" checked> Phong <br/>
<input type="radio" name="type" onchange="updateSpecRefl(this.value);" value="0" > Blinn <br/>
</form>
<p><b> Texture Influence </b></p>
<div id="slider1"> 0
<input id="slide1" type="range" min="0" max="1" step="0.1" value="1" onchange="updateTextureInfluence(this.value);"/> 1 <br/>
</div>
<p><b> Ambient Light Influence </b></p>
<div id="slider1"> 0
<input id="slide2" type="range" min="0" max="1" step="0.1" value="0" onchange="updateAmbientLightInfluence(this.value);"/> 1 <br/>
<p><b> Ambient Light Color </b></p>
<p>
<input id="colorPicker" type="color" value="#FFFFFF" onchange="updateAmbientLightColor(this.value);"/>
</p>
</div>
<tr>
</table>
</body>
</html>