forked from arscan/hexasphere.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
71 lines (59 loc) · 3.19 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Hexasphere.js</title>
<meta name="Description" content="Javascript library to generate a sphere covered in hexagons." />
<meta name="Keywords" content="hexasphere, hexasphere.js, geodesic sphere, geodesic polyhedron, javascript, hexagons" />
<script src="//code.jquery.com/jquery-2.0.3.min.js"></script>
<!-- these are just for the demo page / options -->
<link href="styles.css" rel="stylesheet" type="text/css" />
<!-- required for the application -->
<script src="include/three.min.js"></script>
<script src="include/FileSaver.min.js"></script>
<script src="build/hexasphere.js"></script>
<script src="main.js"></script>
</head>
<body>
<div id="infobox">
<div id="banner">Hexasphere.js</div>
<p>
A small, configurable javascript library that covers a sphere with hexagonal tiles.
The technical term for this structure is a <a href="https://en.wikipedia.org/wiki/Geodesic_polyhedron">geodesic polyhedron</a>,
with triangles grouped into hexagons (and a few of pentagons).
This page uses WebGL and Three.js to display the hexasphere, but the library
itself does not have any external dependencies.
</p>
<p>
Used to create the <a href="https://robscanlon.com/encom-globe/">Encom Globe</a>.
Visit the <a href="https://github.com/arscan/hexasphere.js">Github Repo</a>
for methodology and programmatic usage information.
</p>
<p>
You may also generate and download a hexasphere as either a json file or a wavefront (.obj) model below.
Subdivisions determines the number of tiles in the hexasphere. Tile size allows you to add a buffer between
the tiles.
</p>
<div class="generateForm">
<div id="generateError" style="display:none">
Error: values must be numeric.
</div>
<div class="generateTitle">Generate Hexasphere</div>
<div><label class='generateLabel' for='radius'>Radius:</label><input id='radius' type='text' name='radius' value='30'/></div>
<div><label class='generateLabel' for='subdivisions'>Subdivisions:</label><input id='subdivisions' type='text' name='subdivisions' value='25'/></div>
<div><label class='generateLabel' for='tileSize'>TileSize:</label><input id='tileSize' type='text' name='tileSize' value='0.95'/></div>
<button class='generateButton' id='preview'>Preview</button>
<button class='generateButton' id='generateJson'>Download .json</button>
<button class='generateButton' id='generateObj'>Download .obj</button>
</div>
</div>
<div id="ident">
Created by <a href="http://twitter.com/arscan">@arscan</a>
</div>
<div id="container">
</div>
<img id="projection" src="equirectangle_projection.png" />
<!-- ref:include analytics -->
<!-- endref -->
</body>
</html>