-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMouseProject.html
More file actions
85 lines (67 loc) · 2.59 KB
/
Copy pathMouseProject.html
File metadata and controls
85 lines (67 loc) · 2.59 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="myStyle.css">
</link>
<title>Mouse in the Odyssey</title>
</head>
<body>
<script>
var texture_enable = false;
</script>
<div class="container">
<canvas width="1115" height="550" id="text"></canvas>>
<canvas width="1100" height="500" id="myCanvas"></canvas>
</div>
<div id="uiContainer">
<div id="LightX"></div>
<div id="LightY"></div>
<div id="LightZ"></div>
<div id="shadowOpt">
<div>
<input type="radio" id="shadowRadio" name="shadow" value="4" onclick="texture_enable=true">
<label for="shadow4">Render con ombre</label>
</div>
<div>
<input type="radio" id="shadowRadio" name="shadow" value="5" onclick="texture_enable=false" checked>
<label for="shadow5">Render senza ombre</label>
</div>
<div id="bottoni">
<div id="visuale">
<h2>Cambia Visuale </h2>
</div>
<input type="button" id="button1" value="Posteriore"
onclick="cambiaCamera=false;cameraLiberabis = false;cameraAlto=false; cameraLibera=false; camera_posteriore=true">
<input type="button" id="button2" value="Anteriore"
onclick="cambiaCamera=true;cameraLiberabis = false;cameraAlto=false;cameraLibera=false;camera_posteriore=true">
<input type="button" id="button3" value="Dall'alto" onclick="cameraAlto=true;cameraLiberabis = false;camera_posteriore=true">
</div>
</div>
</body>
<script>
var canvas = document.getElementById("myCanvas");
var text = document.getElementById("text");
var gl = canvas.getContext("webgl");
const textCanvas = document.getElementById("text");
const ctx = textCanvas.getContext("2d");
//ext serve per la depth texture, se no diventa tutto nero
var ext = gl.getExtension('WEBGL_depth_texture');
if (!ext) {
console.log("NON SUPPORTA WEBGL_depth_texture"); // eslint-disable-line
}
</script>
<script type="text/javascript" src="resources/libraries/m4.js"></script>
<script type="text/javascript" src="resources/libraries/glm_utils.js"></script>
<script type="text/javascript" src="resources/libraries/webgl-lessons-ui.js"></script>
<script type="text/javascript" src="resources/libraries/dat.gui.js"></script>
<script type="text/javascript" src="resources/libraries/webgl-utils.js"></script>
<script src="shaders.js"></script>
<script src="utils.js"></script>
<script src="Geometries.js"></script>
<script src="MouseMoviment.js"></script>
<script src="eventsHandlers.js"></script>
<script src="main.js"></script>
<script>
</script>
</html>