Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
117 lines (93 loc) · 3.31 KB
/
Copy pathindex.html
File metadata and controls
117 lines (93 loc) · 3.31 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
<!DOCTYPE html>
<html lang="en">
<!--
______________________________________________________________________________________________________________________
F I N A L P R O J E C T
Computer Graphics
@author Alexander Ebner
@author Fernando García
@author Hendrik Hangen
@author Marlies Wagner
This project is submitted by the abovementioned authors as their final project for 32501 Computer Graphics, Autumn 2018
The structure of the files and code is as follows:
- index.html contains the HTML-Webpage and the main Javascript application
- folder 'css' contains the css stylesheet for the HTML-Webpage
- folder 'js' contains all referenced scripts
- folder 'models' contains all the models used for the objects
- folder 'img' contains all the textures and images used for this project
_____________________________________________________________________________________________________________________
-->
<html>
<head>
<meta charset="utf-8" />
<title>Final Computer Graphics Project</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<script src="js/three.js"></script>
<script src="js/OrbitControls.js"></script>
<script src="js/PointerLockControls.js"></script>
<script src="js/PLYLoader.js"></script>
<script src="js/dat.gui.min.js"></script>
<script src="js/house.js"></script>
<script src="js/modeladder.js"></script>
<script src="js/meshOps.js"></script>
<script src="js/Selector.js"></script>
<script src="js/keyControls.js"></script>
<script src="js/movingCamera.js"></script>
<script src="js/orbitCamera.js"></script>
<script src="js/gui.js"></script>
<div id="authors">Computer Graphics: Final Project by Alexander Ebner, Fernando Garcia, Hendrik Hangen, Marlies Wagner</div>
<div id="blocker">
<div id="instructions">
<span style="font-size:40px">Press space to play</span>
<br /> (W, A, S, D = Move, MOUSE = Look around)
</div>
</div>
<script>
var scene, camera, cameraLight, renderer, controls, txtLoader;
var element = document.body;
createScene();
addMovingCamera();
addGround();
addSphere();
addFloor();
addWalls();
addDoors();
addWindows();
addLighting();
buildGui();
var resize = function () {
camera.aspect = window.innerWidth / window.innerHeight;
renderer.setSize(window.innerWidth, window.innerHeight);
camera.updateProjectionMatrix();
renderer.render(scene, camera);
}
window.addEventListener('resize', resize);
var updateLoop = function () {
requestAnimationFrame(updateLoop);
renderer.render(scene, camera);
};
requestAnimationFrame(updateLoop);
var render = function () {
requestAnimationFrame(render);
renderer.render(scene, camera);
};
function createScene() {
scene = new THREE.Scene();
scene.background = new THREE.Color(0x93C47D);
renderer = new THREE.WebGLRenderer({
antialias: true
});
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFSoftShadowMap;
document.body.appendChild(renderer.domElement);
}
function addAxisHelper() {
var axesHelper = new THREE.AxesHelper(300, 300, 300);
scene.add(axesHelper);
}
</script>
</body>
</html>