-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
113 lines (107 loc) · 2.51 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>A simple rendering pipeline</title>
<meta name="description" content="The assignment shows the object read from file and transforms it by users input.">
<meta name="Tadej Hiti" content="3D model viewer">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="script.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gl-matrix/2.3.2/gl-matrix-min.js" type="text/javascript" ></script>
<style>
#container {
display: flex;
}
#UI {
width: 45vw;
text-align: center;
font-family: Monospace;
padding-top: 5vh;
}
#main {
flex-grow: 1;
}
#UI_div {
display: flex;
margin-right: 25%;
margin-bottom: -10px;
}
#UI_p {
flex-grow: 1;
text-align: right;
}
#UI_div2 {
display: flex;
text-align: center;
margin-right: 5%;
}
#UI_p2 {
flex-grow: 1;
text-align: right;
}
#fileRead {
text-align: left;
padding-left: 40px;
margin-top: 12px;
margin-right: -35px;
margin-bottom: 70px;
}
#dropdown {
text-align: left;
padding: 1px 10px 0 20px;
margin-top: 10px;
}
#controls {
text-align: center;
font-family: Monospace;
}
#file {
}
#alert {
color: red;
}
#canvas {
margin-top: 1vh;
border-style: dotted;
border-color: #b7b7b7;
border-width: 2px;
}
</style>
</head>
<body>
<div id="container">
<div id="UI">
<div id="UI_div">
<p id = "UI_p">Select a predefined model: </p>
<div id="dropdown">
<form>
<select id="myList">
<option id="default" value="pyramid.txt">Pyramid</option>
<option value="teapot.txt">Teapot</option>
</select>
<form>
</div>
</div>
<div id="UI_div2">
<p id="UI_p2">..or upload your own:</p>
<div id="fileRead">
<input type="file" id="file" onchange="readFile(this)">
</div>
</div>
<p id="controls">Controls: </p>
<p> Rotation X axis: <b>W, S</b> keys </p>
<p> Rotation Y axis: <b>A, D</b> keys </p>
<p> Rotation Z axis: <b>Q, E</b> keys </p>
<p> Translate X axis: <b>left, right</b> keys </p>
<p> Translate Y axis: <b>up, down</b> keys </p>
<p> Translate Z axis: <b>ALT + up, down</b> keys </p>
<p> Scale: <b>SHIFT + up, down</b> keys </p>
<br>
<p id="alert"></p>
</div>
<div id="main">
<canvas id="canvas" name="canvas"></canvas>
</div>
</div>
</body>
</html>