@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
106 lines (105 loc) • 2.2 kB
JavaScript
"use strict";
import { Vector3 } from "three";
export const TET_FACE_POINT_INDICES = [
[],
[],
[],
[]
];
export const TET_FACE_OPPOSITE_POINT_INDICES = [3, 2, 0, 1];
export const TET_VERTICES_BASE = [
[],
[-1, -1, 1],
[-1, 1, -1],
[]
];
export const TET_VERTICES0 = [
[-1, 0, -1],
[],
[],
[]
];
export const TET_VERTICES1 = [
[],
[-1, 1, 1],
[-1, -1, 1],
[]
];
export const TET_VERTICES2 = [
[-1, 0, -1],
[],
[],
[]
];
export const TET_VERTICES3 = [
[],
[],
[],
[-1, 0, 1]
];
export const TET_VERTICES4 = [
[-1, -1, -1],
[-1, 1, -1],
[],
[]
];
export const TET_VERTICES5 = [
[-1, 0, 1],
[],
[],
[]
];
export const TET_VERTICES6 = [
[-1, -1, -1],
[],
[],
[]
];
export const TET_VERTICES7 = [
[],
[],
[-1, 1, 1],
[]
];
export const TET_VERTICES8 = [
[],
[],
[-1, -1, 1],
[]
];
export const TET_VERTICES9 = [
[],
[],
[-1, 1, -1],
[]
];
function _toVectors(a) {
return a.map((v) => new Vector3().fromArray(v));
}
export const TET_VERTICES_V_BASE = _toVectors(TET_VERTICES_BASE);
export const TET_VERTICES_V0 = _toVectors(TET_VERTICES0);
export const TET_VERTICES_V1 = _toVectors(TET_VERTICES1);
export const TET_VERTICES_V2 = _toVectors(TET_VERTICES2);
export const TET_VERTICES_V3 = _toVectors(TET_VERTICES3);
export const TET_VERTICES_V4 = _toVectors(TET_VERTICES4);
export const TET_VERTICES_V5 = _toVectors(TET_VERTICES5);
export const TET_VERTICES_V6 = _toVectors(TET_VERTICES6);
export const TET_VERTICES_V7 = _toVectors(TET_VERTICES7);
export const TET_VERTICES_V8 = _toVectors(TET_VERTICES8);
export const TET_VERTICES_V9 = _toVectors(TET_VERTICES9);
export const VERTICES_X = [
TET_VERTICES_V0,
TET_VERTICES_V1,
TET_VERTICES_V2,
TET_VERTICES_V3,
TET_VERTICES_V4,
TET_VERTICES_V5
];
export const VERTICES_Y = [
TET_VERTICES_V0,
TET_VERTICES_V6,
TET_VERTICES_V7,
TET_VERTICES_V3,
TET_VERTICES_V8,
TET_VERTICES_V9
];