stlviewer.html

Thu, 06 Apr 2017 17:18:24 +0200

author
mdd
date
Thu, 06 Apr 2017 17:18:24 +0200
changeset 19
32de35694e56
parent 18
ff1941c85fd3
permissions
-rw-r--r--

finishing first release

8
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
1 <!DOCTYPE html>
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
2 <html lang="en"><head>
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
3 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
4 <title>ScubaTools Object Viewer</title>
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
5 <meta charset="utf-8">
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
6 <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
7
16
800e8da193a7 added dependencies to local repo
mdd
parents: 14
diff changeset
8 <link rel="stylesheet" href="js/jquery-ui.css" />
11
098335a1d510 web viewer 3d finished
mdd
parents: 8
diff changeset
9 <link rel="stylesheet" href="stlviewer.css" />
16
800e8da193a7 added dependencies to local repo
mdd
parents: 14
diff changeset
10 <script src="js/jquery-1.12.4.min.js"></script>
800e8da193a7 added dependencies to local repo
mdd
parents: 14
diff changeset
11 <script src="js/jquery-ui.min.js"></script>
8
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
12
16
800e8da193a7 added dependencies to local repo
mdd
parents: 14
diff changeset
13 <script src="js/three.min.js"></script>
800e8da193a7 added dependencies to local repo
mdd
parents: 14
diff changeset
14 <script src="js/Detector.js"></script>
800e8da193a7 added dependencies to local repo
mdd
parents: 14
diff changeset
15 <script src="js/STLLoader.js"></script>
800e8da193a7 added dependencies to local repo
mdd
parents: 14
diff changeset
16 <script src="js/OrbitControls.js"></script>
8
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
17
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
18 </head>
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
19 <body>
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
20 <div id="info">
11
098335a1d510 web viewer 3d finished
mdd
parents: 8
diff changeset
21 <div class="listcontainer">
098335a1d510 web viewer 3d finished
mdd
parents: 8
diff changeset
22 <h2>Available:</h2>
13
39fb313ba27c finished viewer again, giving up with texturing mesh without uv mapping
mdd
parents: 12
diff changeset
23 move to selected
11
098335a1d510 web viewer 3d finished
mdd
parents: 8
diff changeset
24 <ul id="sortable1">
098335a1d510 web viewer 3d finished
mdd
parents: 8
diff changeset
25 <!-- PLACEHOLDER CYLINDERS -->
098335a1d510 web viewer 3d finished
mdd
parents: 8
diff changeset
26 </ul>
098335a1d510 web viewer 3d finished
mdd
parents: 8
diff changeset
27 </div>
098335a1d510 web viewer 3d finished
mdd
parents: 8
diff changeset
28 <div class="listcontainer">
098335a1d510 web viewer 3d finished
mdd
parents: 8
diff changeset
29 <h2>Selected:</h2>
13
39fb313ba27c finished viewer again, giving up with texturing mesh without uv mapping
mdd
parents: 12
diff changeset
30 <a href="#" id="clearselected">clear list</a>
11
098335a1d510 web viewer 3d finished
mdd
parents: 8
diff changeset
31 <ul id="sortable2">
098335a1d510 web viewer 3d finished
mdd
parents: 8
diff changeset
32
098335a1d510 web viewer 3d finished
mdd
parents: 8
diff changeset
33 </ul>
098335a1d510 web viewer 3d finished
mdd
parents: 8
diff changeset
34 </div>
098335a1d510 web viewer 3d finished
mdd
parents: 8
diff changeset
35
18
ff1941c85fd3 added 2d image to 3d viewer
mdd
parents: 17
diff changeset
36 <div class="infocontainer">
ff1941c85fd3 added 2d image to 3d viewer
mdd
parents: 17
diff changeset
37 <div id="infocontainer"></div>
ff1941c85fd3 added 2d image to 3d viewer
mdd
parents: 17
diff changeset
38 <img src="" id="image2d" />
17
dee15870206a added text info box
mdd
parents: 16
diff changeset
39 </div>
11
098335a1d510 web viewer 3d finished
mdd
parents: 8
diff changeset
40
17
dee15870206a added text info box
mdd
parents: 16
diff changeset
41 <div>
dee15870206a added text info box
mdd
parents: 16
diff changeset
42 <a href="https://neo-soft.org" target="_blank">NeoSoft</a> ScubaTools -
dee15870206a added text info box
mdd
parents: 16
diff changeset
43 <a href="https://threejs.org/" target="_blank">three.js</a> -
dee15870206a added text info box
mdd
parents: 16
diff changeset
44 STL loader by <a href="https://github.com/aleeper" target="_blank">aleeper</a>.
dee15870206a added text info box
mdd
parents: 16
diff changeset
45 <br/>
dee15870206a added text info box
mdd
parents: 16
diff changeset
46 Left mouse: rotate camera, right mouse: move camera, middle mouse or wheel: zoom
dee15870206a added text info box
mdd
parents: 16
diff changeset
47 </div>
11
098335a1d510 web viewer 3d finished
mdd
parents: 8
diff changeset
48
8
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
49 </div>
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
50
13
39fb313ba27c finished viewer again, giving up with texturing mesh without uv mapping
mdd
parents: 12
diff changeset
51 <div id="rendercontainer"></div>
39fb313ba27c finished viewer again, giving up with texturing mesh without uv mapping
mdd
parents: 12
diff changeset
52
11
098335a1d510 web viewer 3d finished
mdd
parents: 8
diff changeset
53 <script src="stlviewer.js"></script>
098335a1d510 web viewer 3d finished
mdd
parents: 8
diff changeset
54
8
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
55 <script>
12
b3cf0176512e finished webrenderer
mdd
parents: 11
diff changeset
56 if ( ! Detector.webgl ) Detector.addGetWebGLMessage();
8
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
57 var container;
13
39fb313ba27c finished viewer again, giving up with texturing mesh without uv mapping
mdd
parents: 12
diff changeset
58 var controls;
8
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
59 var camera, cameraTarget, scene, renderer;
12
b3cf0176512e finished webrenderer
mdd
parents: 11
diff changeset
60 var m_spacer = new THREE.MeshPhongMaterial( {
b3cf0176512e finished webrenderer
mdd
parents: 11
diff changeset
61 color: 0x736f6e, specular: 0x111111, shininess: 100 } );
13
39fb313ba27c finished viewer again, giving up with texturing mesh without uv mapping
mdd
parents: 12
diff changeset
62
12
b3cf0176512e finished webrenderer
mdd
parents: 11
diff changeset
63 var m_cylinder = new THREE.MeshPhongMaterial( {
b3cf0176512e finished webrenderer
mdd
parents: 11
diff changeset
64 color: 0x4682b4, specular: 0x111111, shininess: 200 } );
13
39fb313ba27c finished viewer again, giving up with texturing mesh without uv mapping
mdd
parents: 12
diff changeset
65
12
b3cf0176512e finished webrenderer
mdd
parents: 11
diff changeset
66 init();
8
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
67 animate();
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
68
14
ba3d8c56e6f5 code cleanup
mdd
parents: 13
diff changeset
69 </script>
8
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
70
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
71
63b6f80e09ef added threejs stl viewer html testing
mdd
parents:
diff changeset
72 </body></html>

mercurial