Reference · Map projections for sky charts
ProjectionOptionstype
How to place and size the chart.
Import it
import type { ProjectionOptions } from "@johnmorrisdotca/hoshi-stars/projection";
Definition
interface ProjectionOptions {
centre: SkyPoint;
scale?: number;
rotation?: number;
mirror?: boolean;
}
Members
| Name | Type | Description |
|---|---|---|
centre | SkyPoint | The point of the sky that lands at (0, 0). With north up, it is the middle of the chart. |
scale (optional) | number | undefined | The radius of the celestial sphere in drawing units; default 1. |
rotation (optional) | number | undefined | Turns the finished chart anticlockwise by this many degrees (as drawn with y up); default 0. |
mirror (optional) | boolean | undefined | True for the map convention, east to the right. Default false: the sky seen looking up, east to the left. |
Examples
import type { ProjectionOptions } from "@johnmorrisdotca/hoshi-stars/projection";
const options: ProjectionOptions = { centre: { rightAscension: 83.8, declination: -5.4 }, scale: 300 };
console.log(options.scale);300What it prints (run when this page was built)