UNPKG
extrude
Version:
latest (1.0.2)
1.0.2
1.0.1
1.0.0
turn a 2d shape into a 3d mesh with extrusion
github.com/freeman-lab/extrude
freeman-lab/extrude
extrude
/
shapes
/
hexagon.js
14 lines
(11 loc)
•
224 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var points = []
for
(var i =
0
; i <
6
; i++) { points.push([ Math.
cos
(i *
2
* Math.PI /
6
), Math.
sin
(i *
2
* Math.PI /
6
) ]) }
module
.exports = { points: points, colors:
[[0.5, 0.9, 0.1], [0.3, 1.0, 0.5]]
}