UNPKG

molstar

Version:

A comprehensive macromolecular library.

17 lines 682 B
/** * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose <alexander.rose@weirdbyte.de> */ import { Polyhedron } from './polyhedron'; import { Icosahedron } from './icosahedron'; var _a = Icosahedron(), vertices = _a.vertices, indices = _a.indices; /** Calculate vertex count for subdived icosahedron */ export function sphereVertexCount(detail) { return 10 * Math.pow(Math.pow(2, detail), 2) + 2; } /** Create sphere by subdividing an icosahedron */ export function Sphere(detail) { return Polyhedron(vertices, indices, { detail: detail, radius: 1 }); } //# sourceMappingURL=sphere.js.map