-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
196 lines (157 loc) · 5.79 KB
/
index.html
File metadata and controls
196 lines (157 loc) · 5.79 KB
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
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0"> -->
<title>Webgl</title>
<!-- <script src="https://webgl2fundamentals.org/webgl/resources/webgl-utils.js"></script> -->
<script src="webgl-utils.js"></script>
<script src="webgl.js"></script>
<script src="testAlgori.js"></script>
<style>
html,
body {
overflow: hidden;
width: 100%;
height: 100%;
background-image: url("src/bg.jpg");
background-size: 100% 100%;
/* background-color: black; */
margin: 0;
padding: 0;
color: white;
}
#bigbox {
position: absolute;
top: 10%;
left: 10%;
/* transform: translate(-50%, 0%); */
width: 80%;
height: 80%;
background-color: rgba(59, 58, 58, 0.8);
border-radius: 10px;
}
#canvasBox {
position: relative;
width: 60%;
height: 100%;
/* margin: 0; */
float: left;
}
#inCanvasBox {
background-color: white;
width: 500px;
height: 500px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
#renderCanvas {
width: 500px;
height: 500px;
/* position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%); */
touch-action: none;
}
#ctrlBox {
/* background-color: black; */
width: 40%;
height: 100%;
/* margin: 0 0; */
float: right;
}
#innerbox {
margin: 50px 50px;
}
input {
width: 80;
margin: 15 0;
}
.selector {
/* margin: 20 0; */
float: left;
}
.paraFram {
display: none;
}
#draw {
margin: 30px 0;
/* font-size: 60px; */
/* line-height: 60px; */
}
.parameter div:first-child {
margin-top: 25;
}
</style>
</head>
<body>
<div id="bigbox">
<div id="canvasBox">
<div id="inCanvasBox">
<canvas id="renderCanvas">你的浏览器似乎不支持或者禁用了HTML5 <code><canvas></code> 元素.</canvas>
</div>
</div>
<div id="ctrlBox">
<div id="innerbox">
<div style="display: block; height: 30;">
<!-- selector box -->
<div class="selector" id="examSelect">
<select id="exam">
<option value="exam2">填充与裁剪</option>
<option value="exam1">画二维图元</option>
</select></div>
<div class="selector" id="methosdSelect">
<select id="method">
</select>
</div>
</div>
<div class="paraFram" id="exam1">
<div id="drawline" class="parameter">
<div>起点的坐标:
<input id="x1" type="number" value="1" placeholder="x">
<input id="y1" type="number" value="2" placeholder="y">
</div>
<div>终点的坐标:
<input id="x2" type="number" value="55" placeholder="x">
<input id="y2" type="number" value="66" placeholder="y">
</div>
</div>
<div id="drawcircle" class="parameter">
<div>圆心的坐标:
<input id="ox" type="number" placeholder="x">
<input id="oy" type="number" placeholder="y">
</div>
<div> 半         径 :
<input id="r" type="number">
</div>
</div>
<div id="drawEllipe" class="parameter">
<!-- <div>圆心的坐标:
<input id="ox2" type="number" placeholder="x">
<input id="oy2" type="number" placeholder="y">
</div> -->
<div>椭圆的轴长:
<input id="a" type="number" placeholder="a">
<input id="b" type="number" placeholder="b">
</div>
</div>
</div>
<div class="paraFram" id="exam2">
<label style="display: block;"><input name="element" type="radio" value="Lines" />直线 </label>
<label style="display: block;"><input name="element" type="radio" value="Polygon" />多边形 </label>
<label style="display: block;"><input name="element" type="radio" value="Rectangle" />矩形 </label>
<button id="clearALL">清除所有</button>
</div>
<div id="draw">
<button id="drawbtn">Draw</button>
</div>
</div>
</div>
</div>
</body>
<script src="contrl.js"></script>
<script src="algorithm.js"></script>
<script src="index.js"></script>
</html>