-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample03.html
67 lines (56 loc) · 2.55 KB
/
example03.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>WebGL Introduction 2</title>
<link rel="stylesheet" type="text/css" href="../style/bootstrap.css">
</head>
<body>
<!-- This is the navigation bar at the top of the page -->
<!-- This is populated by loading the common functions script -->
<div id="myNavBar"></div>
<!-- This is for displaying errors caused by our JavaScript -->
<!-- This will only be populated when an error on the JavaScript side occurs -->
<div id="webglError"></div>
<!-- This is a container for our content -->
<div class="row">
<div class="col">
<div class="mx-auto text-center my-3">
<!-- Title -->
<p>Viewing .obj files</p>
</div>
<div class="mx-auto text-center">
<!-- This is our canvas for the example -->
<!-- Our script will find this tag and populate it with our drawing -->
<canvas id="exampleCanvas" width="640" height="480"></canvas>
</div>
<div class="mx-auto text-center my-3">
<!-- Challenge -->
<p>Task: Upload an .obj file</p>
<fieldset>
<!-- File chooser form -->
<div class="form-group">
<div class="input-group mb-3">
<input type="file" class="form-control-file" id="objInputFile" accept="*.obj">
<label for="objInputFile">Choose file</label>
</div>
<div class="input-group-append">
<span class="input-group-text" id="fileSubmitButton">Upload</span>
</div>
</div>
</fieldset>
</div>
</div>
</div>
<!-- This is a third party library for matrix math needed for WebGL caluculations -->
<!-- See http://glmatrix.net/ for documentation -->
<script src="../lib/gl-matrix.js" type="text/javascript"></script>
<!-- This is a modified third part library for parsing .obj files -->
<!-- See https://github.com/sohamkamani/three-object-loader -->
<script src="../lib/three-object-loader.js" type="text/javascript"></script>
<!-- This script contains helper functions used in the examples -->
<script src="../commonFunctions.js" type="text/javascript"></script>
<!-- This is our example -->
<script src="../examples/example03.js" type="text/javascript"></script>
</body>
</html>