-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
183 lines (172 loc) · 4.44 KB
/
index.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
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<html>
<head>
<base href='/'>
<title>Three STL Viewer</title>
<link href="https://use.fontawesome.com/releases/v5.0.8/css/all.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<link href='https://cdnjs.cloudflare.com/ajax/libs/prism/1.11.0/themes/prism-okaidia.min.css' rel='stylesheet'>
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: Montserrat;
}
header {
background-color: #2b2c36;
height: 320px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: #fff;
}
header h1 {
}
header h3 {
}
header a {
color: #E86C0C;
}
header hr {
margin: auto;
border: none;
width: 25px;
border-bottom: 1px solid rgba(230, 230, 230, .8);
margin-top: 15px;
margin-bottom: 15px;
}
a, a:hover {
color: #E86C0C;
text-decoration: none;
}
a.btn {
background-color: #fff;
color: #000;
padding: 5px 10px;
}
header img.logo-threejs {
height: 40px;
}
.row {
display: flex;
flex-direction: column;
padding: 24px;
}
.content .title {
margin-bottom: 20px;
font-size: 25px;
}
.content p {
line-height: 24px;
}
.content ul {
padding: 0 30px;
}
.flex-row {
display: flex;
flex-direction: row;
}
.flex-row .col-50 {
width: 50%;
margin: 5px;
}
@media (max-width: 480px) {
.flex-row {
flex-direction: column;
}
.flex-row .col-50 {
margin: 0;
margin-bottom: 15px;
width: 100%;
}
}
footer {
display: block;
width: 100%;
float: left;
border-top: 15px solid rgba(180, 180, 180, .8);
height: 85px;
background-color: rgba(230, 230, 230, 1);
}
.con-footer {
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
}
</style>
</head>
<body>
<header>
<h1>Three STL Viewer</h1>
<h3>created by <a href='https://github.com/ohpyupi' target='_blank'>ohpyupi</a></h3>
<hr/>
<a class='btn' href='https://github.com/ohpyupi/three-stl-viewer' target='_blank'>
<i class="fab fa-github"></i>
Github
</a>
<a href='https://threejs.org/' target='_blank'>
<img class='logo-threejs' src='https://www.digitaltactics.co.uk/wp-content/uploads/sites/2/2015/11/three-js-logo-480x368.png'/>
</a>
</header>
<section class='content'>
<div class='row'>
<h3 class='title'>Introduction</h3>
<p>
Three STL Viewer is designed to provide a widget to easily render 3D models out of STL objects based on STLLoader from <a href='https://threejs.org/' target='_blank'>Three.js</a>.
Visit <a href='https://www.thingiverse.com/' target='_blank'>Thingiverse</a> to get a lot of STL files and test the visualization of those STL objects with Three STL Viewer!
</p>
</div>
<div class='row'>
<h3 class='title'>Dependencies</h3>
<ul>
<li>
<a target='_blank' href='https://jquery.com/'>jQuery</a>
</li>
<li>
<a target='_blank' href='https://bgrins.github.io/spectrum/'>jQuery Spectrum</a>
</li>
<li>
<a target='_blank' href='https://threejs.org/'>Three.js</a>
</li>
</ul>
</div>
<div class='row'>
<h3 class='title'>Download</h3>
<pre>
<code class='language-basic'>
npm install three-stl-viewer
</code>
</pre>
</div>
<div class='row'>
<h3 class='title'>Get Started</h3>
<pre>
<code class='language-javascript'>
// jQuery or $ should exist in global scope
import 'spectrum-colorpicker';
import 'spectrum-colorpicer/spectrum.css';
import ThreeSTLViewer from 'three-stl-viewer';
...
let viewer = new ThreeSTLViewer({
selector: '#pikachu.stl-viewer',
urlToSTL: '/stl/pikachu.stl',
});
</code>
</pre>
</div>
<div class='row'>
<h3 class='title'>Examples</h3>
<div class='flex-row'>
<div id='pikachu' class='col-50 stl-viewer'></div>
<div id='balloon' class='col-50 stl-viewer'></div>
</div>
</div>
</section>
<footer>
</footer>
<script src='https://cdnjs.cloudflare.com/ajax/libs/prism/1.11.0/components/prism-core.js'></script>
<script type='text/javascript' src='/app.js'></script>
</body>
</html>