-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathexample.html
38 lines (38 loc) · 1.29 KB
/
example.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example page</title>
<script type="text/javascript" src="../three.js/build/three.js"></script>
<script>module = {}</script>
<script type="text/javascript" src="../earcut/src/earcut.js"></script>
<script type="text/javascript" src="../poly2tri/dist/poly2tri.js"></script>
<script type="text/javascript" src="../libtess/libtess.min.js"></script>
<script type="text/javascript" src="../three.js_triangulation/tessy.js"></script>
<script type="text/javascript" src="../three.js_triangulation/triangulation.js"></script>
<link rel="stylesheet" type="text/css" href="css/example.css">
<script>
THREE.Triangulation.setLibrary('earcut');
THREE.Triangulation.setTimer(false);
</script>
</head>
<body>
<h1>Example Page</h1>
<p>
You can see how to set the library including the dependencies in the source of this example page.
</p>
<hr>
<p>
Set the library of your choice within the <code><script></script></code> tags:
</p>
<pre>
THREE.Triangulation.setLibrary('earcut');
</pre>
<p>
And set the timer on or off by passing true or false to the <code>setTimer</code> method:
</p>
<pre>
THREE.Triangulation.setTimer(false);
</pre>
</body>
</html>