UNPKG

molstar

Version:

A comprehensive macromolecular library.

44 lines 1.35 kB
/** * Copyright (c) 2018-2019 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose <alexander.rose@weirdbyte.de> */ import { createPrimitive } from './primitive'; import { createCage } from './cage'; export var octahedronVertices = [ 0.5, 0, 0, -0.5, 0, 0, 0, 0.5, 0, 0, -0.5, 0, 0, 0, 0.5, 0, 0, -0.5 ]; export var octahedronIndices = [ 0, 2, 4, 0, 4, 3, 0, 3, 5, 0, 5, 2, 1, 2, 5, 1, 5, 3, 1, 3, 4, 1, 4, 2 ]; export var perforatedOctahedronIndices = [ 0, 2, 4, 0, 4, 3, // 0, 3, 5, 0, 5, 2, 1, 2, 5, 1, 5, 3, // 1, 3, 4, 1, 4, 2 ]; var octahedronEdges = [ 0, 2, 1, 3, 2, 1, 3, 0, 0, 4, 1, 4, 2, 4, 3, 4, 0, 5, 1, 5, 2, 5, 3, 5, ]; var octahedron; export function Octahedron() { if (!octahedron) octahedron = createPrimitive(octahedronVertices, octahedronIndices); return octahedron; } var perforatedOctahedron; export function PerforatedOctahedron() { if (!perforatedOctahedron) perforatedOctahedron = createPrimitive(octahedronVertices, perforatedOctahedronIndices); return perforatedOctahedron; } var octahedronCage = createCage(octahedronVertices, octahedronEdges); export function OctahedronCage() { return octahedronCage; } //# sourceMappingURL=octahedron.js.map