UNPKG

418 BJavaScriptView Raw
1import {atan, degrees, sqrt1_2} from "../math.js";
2
3var phi1 = atan(sqrt1_2) * degrees;
4
5var cube = [
6 [0, phi1], [90, phi1], [180, phi1], [-90, phi1],
7 [0, -phi1], [90, -phi1], [180, -phi1], [-90, -phi1]
8];
9
10export default [
11 [0, 3, 2, 1], // N
12 [0, 1, 5, 4],
13 [1, 2, 6, 5],
14 [2, 3, 7, 6],
15 [3, 0, 4, 7],
16 [4, 5, 6, 7] // S
17].map(function(face) {
18 return face.map(function(i) {
19 return cube[i];
20 });
21});