allSkyOutlinefunction
The edge of the whole-sky picture as a closed run of points: the oval of Mollweide and Hammer, or the rectangle. Use it for the sky's background and as a clip path.
Import it
import { allSkyOutline } from "@johnmorrisdotca/hoshi-stars/all-sky";
Definition
function allSkyOutline(options: AllSkyOptions, steps?: number): AllSkyPoint[]
Parameters
| Name | Type | Description |
|---|---|---|
options | AllSkyOptions | The picture. |
steps (optional) | number | How many points to a side of the oval; 90 by default. |
Returns
AllSkyPoint[]
Points going down the left edge, then up the right, the first repeated at the end.
Examples
import { allSkyOutline } from "@johnmorrisdotca/hoshi-stars/all-sky";
const edge = allSkyOutline({ width: 1000, projection: "hammer" });
console.log(edge.length, edge[0]);183 { x: 499.99999999999994, y: 0 }What it prints (run when this page was built)