-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.html
132 lines (105 loc) · 4.98 KB
/
main.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!doctype html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<html>
<head>
<title>66.71 WebGL FrameWork</title>
<style>
body {
background-color: grey;
}
canvas {
background-color: white;
}
textarea {
background-color: black;
foreground-color: white;
}
</style>
</head>
<body>
<center>
<h1>Sistemas Gráficos - 66.71</h1>
<h2>WebGL - Tp1</h2>
<canvas id="my-canvas" width="900" height="500">
Your browser does not support the HTML5 canvas element.
</canvas>
</center>
<script type="text/javascript" src="./lib/gl-matrix-min.js"></script>
<script type="text/javascript" src="./lib/underscore-min.js"></script>
<script type="text/javascript" src="./lib/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="./lib/dat.gui.min.js"></script>
<script type="text/javascript" src="./animadorMain.js"></script>
<script type="text/javascript" src="./objetos/index_array.js"></script>
<script type="text/javascript" src="./objetos/objeto3d.js"></script>
<script type="text/javascript" src="./objetos/cubo/cubo.js"></script>
<script type="text/javascript" src="./objetos/cilindro/cilindro.js"></script>
<script type="text/javascript" src="./objetos/silla/silla.js"></script>
<script type="text/javascript" src="./objetos/barrido_y_revolucion.js"></script>
<script type="text/javascript" src="./curvas/curva.js"></script>
<script type="text/javascript" src="./curvas/rectas.js"></script>
<script type="text/javascript" src="./curvas/curvaCubica.js"></script>
<script type="text/javascript" src="./curvas/bezier.js"></script>
<script type="text/javascript" src="./curvas/bspline.js"></script>
<script type="text/javascript" src="./objetos/formas/formas.js"></script>
<script type="text/javascript" src="./objetos/figuraCarro/figuraMontania.js"></script>
<script type="text/javascript" src="./menu_animador.js"></script>
<script type="text/javascript" src="./objetos/cono/cono.js"></script>
<script type="text/javascript" src="./objetos/sillas/sillas.js"></script>
<script type="text/javascript" src="./objetos/sillas/cilindroSilla.js"></script>
<script type="text/javascript" src="./objetos/sillas/conoSilla.js"></script>
<script type="text/javascript" src="./objetos/figuraCarro/figuraCuerpoCarro.js"></script>
<script type="text/javascript" src="./objetos/figuraCarro/figuraExtremoCarro.js"></script>
<script type="text/javascript" src="./objetos/figuraCarro/figuraSillaCarro.js"></script>
<script type="text/javascript" src="./objetos/carroP1/extremoCarro.js"></script>
<script type="text/javascript" src="./objetos/carroP1/sillaCarro.js"></script>
<script type="text/javascript" src="./objetos/carroP1/cuerpoCarro.js"></script>
<script type="text/javascript" src="./objetos/carroP1/cuerpoCarro.js"></script>
<script type="text/javascript" src="./objetos/esfera/esfera.js"></script>
<script type="text/javascript" src="./objetos/farol/farol.js"></script>
<script type="text/javascript" src="./objetos/piso/piso.js"></script>
<script type="text/javascript" src="./objetos/skybox/skybox.js"></script>
<script type="text/javascript" src="./objetos/carroP1/montania.js"></script>
<script type="text/javascript" src="./objetos/skyboxSphere/skyboxSphere.js"></script>
<script>
function iniciarObjectos3D() {
var h = 2.19;
posicionFarol1 = vec3.fromValues(15.0, 22.0, h);
posicionFarol2 = vec3.fromValues(8.0, 10.0, h);
posicionFarol3 = vec3.fromValues(-8.0, -10.0, h);
posicionFarol4 = vec3.fromValues(-9.0, -20.0, h);
posicionFarol5 = vec3.fromValues(3.0, -10.0, h);
posicionFarol6 = vec3.fromValues(-5.0, 18.0, h);
posicionFarol7 = vec3.fromValues(0.0, 10.0, h);
posicionFarol8 = vec3.fromValues(0.0, -15.0, h);
farol = new Farol();
farol1 = new Farol();
farol2 = new Farol();
farol3 = new Farol();
farol4 = new Farol();
farol5 = new Farol();
farol6 = new Farol();
farol7 = new Farol();
farol8 = new Farol();
piso = new Piso();
earth = new TexturedSphere(128, 128);
farol1.transladar(posicionFarol1[0], posicionFarol1[1], 0.0);
farol2.transladar(posicionFarol2[0], posicionFarol2[1], 0.0);
farol3.transladar(posicionFarol3[0], posicionFarol3[1], 0.0);
farol4.transladar(posicionFarol4[0], posicionFarol4[1], 0.0);
farol5.transladar(posicionFarol5[0], posicionFarol5[1], 0.0);
farol6.transladar(posicionFarol6[0], posicionFarol6[1], 0.0);
farol7.transladar(posicionFarol7[0], posicionFarol7[1], 0.0);
farol8.transladar(posicionFarol8[0], posicionFarol8[1], 0.0);
montaniaRusa = new Montania();
sillas = new Sillas(app.alturaSillas, app.cantidadSillas);
//cilindro = new CilindroSilla(false, true, 1.0, 1.0);
//cilindro = new ConoSilla();
//cielo = new Skybox();
sillas.rotar(Math.PI/2, vec3.fromValues(1.0,0.0,0.0));
sillas.transladar(-5.0, -15.0, 0.0);
montaniaRusa.transladar(10.0, 20.0, 0.0);
animados = [montaniaRusa, sillas, piso, earth, farol, farol1, farol2, farol3, farol4, farol5, farol6, farol7, farol8];
}
</script>
</body>
</html>