-
Notifications
You must be signed in to change notification settings - Fork 4
/
Scaffolding.html
84 lines (68 loc) · 2.54 KB
/
Scaffolding.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
<html>
<head>
<meta http-equiv='content-type' content='text/html; charset=ISO-8859-1'>
<link href='css/styles.css' type='text/css' rel='stylesheet'>
<link href='css/cars.css' type='text/css' rel='stylesheet' />
<link href='css/smoothness/jquery-ui-1.8.13.custom.css' type='text/css' rel='stylesheet' />
<!-- GUI Libraries //-->
<script type='text/javascript' src='js/gui/jquery-1.5.1.min.js'></script>
<script type='text/javascript' src='js/gui/jquery-ui-1.8.13.custom.min.js'></script>
<!-- MATH Libraries //-->
<script type='text/javascript' src='js/math/gl-matrix-min.js'></script>
<!-- WEBGL Libraries //-->
<script type='text/javascript' src='js/webgl/Globals.js'></script>
<script type='text/javascript' src='js/webgl/Utils.js'></script>
<script type='text/javascript' src='js/webgl/Program.js'></script>
<script type='text/javascript' src='js/webgl/Scene.js'></script>
<script type='text/javascript' src='js/webgl/Axis.js'></script>
<script type='text/javascript' src='js/webgl/Floor.js'></script>
<script type='text/javascript' src='js/webgl/Camera.js'></script>
<script type='text/javascript' src='js/webgl/CameraInteractor.js'></script>
<script type='text/javascript' src='js/webgl/SceneTransforms.js'></script>
<script type='text/javascript' src='js/webgl/Texture.js'></script>
<script type='text/javascript' src='js/webgl/WebGLApp.js'></script>
<script type='text/javascript' src='js/webgl/Picker.js'></script>
<script type="text/javascript">
function configure(){
gl.clearColor(0.3,0.3,0.3, 1.0);
gl.clearDepth(1.0);
gl.enable(gl.DEPTH_TEST);
gl.depthFunc(gl.LESS);
gl.blendFunc(gl.SRC_ALPHA,gl.ONE_MINUS_SRC_ALPHA);
}
function load(){
}
function render(){
gl.viewport(0, 0, c_width, c_height);
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
}
function resizeCanvas(){
c_width = $('#content').width();
c_height = $('#content').height();
$('#the-canvas').attr('width',c_width);
$('#the-canvas').attr('height',c_height);
}
$(window).resize(function(){resizeCanvas();});
var app;
function runShowRoom(){
app = new WebGLApp("the-canvas");
app.configureGLHook = configure;
app.loadSceneHook = load;
app.drawSceneHook = render;
app.run();
}
</script>
</head>
<body onLoad='runShowRoom()'>
<div id="header">
<h1>Show Room</h2>
</div>
<div id="nav">
<b>Instructions</b>
</div>
<div id="content">
<canvas id='the-canvas'></canvas>
</div>
<script type='text/javascript'>resizeCanvas();</script>
</body>
</html>