-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdraw.html
More file actions
194 lines (169 loc) · 7.05 KB
/
draw.html
File metadata and controls
194 lines (169 loc) · 7.05 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Computer Graphics - Drawing</title>
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
<meta property="og:title" content="Computer Graphics - Drawing" />
<meta property="og:description"
content="This site delves into the captivating world of computer graphics, specifically designed for a university course at the Federal University of Maranhão (UFMA)." />
<meta property="og:image"
content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMcXFSjAYBUubJ-oq_i30FNAXJdu9Q5iw9BFNoSlFxkY0icbspLi3b9Re-gwMxlh7bhlurLvxt81AjbKsCTDV_J9y4z4Lc_Lr_XdGTemj7BC5jAseLZk7hqDrxaaUgP_FHi_hGk8DeQto/s768/%25E2%2580%2598Escola+de+Atenas%25E2%2580%2599%252C+de+Rafael+Sanzio+-+Musei+Vaticani+-+Destaque%252C++Out20.jpg" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="628" />
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:title" content="Computer Graphics - Drawing" />
<meta property="twitter:description"
content="This site delves into the captivating world of computer graphics, specifically designed for a university course at the Federal University of Maranhão (UFMA)." />
<meta property="twitter:image"
content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMcXFSjAYBUubJ-oq_i30FNAXJdu9Q5iw9BFNoSlFxkY0icbspLi3b9Re-gwMxlh7bhlurLvxt81AjbKsCTDV_J9y4z4Lc_Lr_XdGTemj7BC5jAseLZk7hqDrxaaUgP_FHi_hGk8DeQto/s768/%25E2%2580%2598Escola+de+Atenas%25E2%2580%2599%252C+de+Rafael+Sanzio+-+Musei+Vaticani+-+Destaque%252C++Out20.jpg" />
<meta property="twitter:image:width" content="1200" />
<meta property="twitter:image:height" content="628" />
<link rel="icon" type="image/x-icon"
href="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRoiAWpT1lgisOqQNDtKuYgmIRKlAqZjQgW8g&s" />
<meta name="description"
content="This site delves into the captivating world of computer graphics,
specifically designed for a university course at the Federal University of Maranhão (UFMA).
Here, you'll embark on an exciting exploration of the techniques used to create the stunning visuals and
animations that captivate us in movies, games, and beyond.
Prepare to unlock the secrets behind these digital marvels and develop the skills to bring your own creative vision to life!" />
<link rel="stylesheet" type="text/css" href="style.css" />
<meta charset="UTF-8" />
<script id="vertex-shader" type="x-shader/x-vertex">
attribute vec4 vPosition;
attribute vec4 vColor;
varying vec4 fColor;
void main()
{
gl_Position = vPosition;
gl_PointSize = 10.0;
fColor = vColor;
}
</script>
<script id="point-vertex-shader" type="x-shader/x-vertex">
attribute vec4 vPosition;
attribute vec4 vColor;
varying vec4 fColor;
void main() {
gl_Position = vPosition;
fColor = vColor;
gl_PointSize = 7.0;
}
</script>
<script id="line-vertex-shader" type="x-shader/x-vertex">
attribute vec4 vPosition;
attribute vec4 vColor;
varying vec4 fColor;
void main() {
gl_Position = vPosition;
fColor = vColor;
}
</script>
<script id="triangle-vertex-shader" type="x-shader/x-vertex">
attribute vec4 vPosition;
attribute vec4 vColor;
varying vec4 fColor;
void main() {
gl_Position = vPosition;
fColor = vColor;
}
</script>
<script id="polygon-vertex-shader" type="x-shader/x-vertex">
attribute vec4 vPosition;
attribute vec4 vColor;
varying vec4 fColor;
void main() {
gl_Position = vPosition;
fColor = vColor;
}
</script>
<script id="fragment-shader" type="x-shader/x-fragment">
precision mediump float;
varying vec4 fColor;
void main()
{
gl_FragColor = fColor;
}
</script>
<script type="text/javascript" src="./Common/webgl-utils.js"></script>
<script type="text/javascript" src="./Common/initShaders.js"></script>
<script type="text/javascript" src="./Common/MV.js"></script>
<script type="text/javascript" src="./p2/script.js"></script>
</head>
<body style="margin: 0;">
<header>
<div class="container">
<a href="#" class="logo">Computer Graphics</a>
<nav>
<ul>
<li><a href="./index.html">Home</a></li>
<li><a href="./stars.html">Stars</a></li>
<li><a href="./pyramids.html">Pyramids</a></li>
<li><a target="_blank" href="https://github.com/felipersteles/computer-graphics">Source code</a></li>
<li><a target="_blank" href="https://felipersteles.netlify.app">About me</a></li>
</ul>
</nav>
</div>
</header>
<section class="flex padding center">
<div class="menu" style="display: flex; flex-direction: column">
<div style="display: flex; align-items: center; gap: 15px" class="center">
<h1 id="mode">Drawing:</h1>
<div>
<h3 id="object">points</h3>
</div>
</div>
<div class="buttons padding column">
<button type="button" id="draw">Draw</button>
<button type="button" id="clear">Clear</button>
<button type="button" id="move">Move</button>
<button type="button" id="rotate">Rotate</button>
</div>
</div>
<div id="canvas-sec">
<canvas style="
margin: 0 15px;
border: 1px solid gray;
width: fit-content;
height: fit-content;
" id="gl-canvas" width="512" height="512">
Oops ... your browser doesn't support the HTML5 canvas element
</canvas>
</div>
<div style="display: flex; gap: 15px" class="center padding">
<div>
<div style="display: flex; width: 100px; flex-direction: column; gap: 6px">
<button id="point">Point</button>
<button id="line">Line</button>
<button id="triangles">Triangle</button>
<button id="polygon">Square</button>
</div>
<div>
<select style="margin-top: 10px" id="color-menu" size="7">
<option value="0">Black</option>
<option value="1">Red</option>
<option value="2">Yellow</option>
<option value="3">Green</option>
<option value="4">Blue</option>
<option value="5">Magenta</option>
<option value="6">Cyan</option>
</select>
</div>
<div id="rotate-menu" style="margin-top: 10px; display: none; max-width: 50px">
<div style="display: flex; flex-direction: column; gap: 5px">
<span id="infoAngle"></span>
<input style="border: 1px solid blue" id="sense" type="number" />
</div>
</div>
</div>
</div>
</section>
<footer>
<p class="copyright">© 2024 <a href="https://github.com/felipersteles">Felipe Teles</a>. All rights reserved.
</p>
</footer>
</body>
</html>