Caelus3,462 checksGitHubv0.25.0MIT
API Reference / SkyConstraint · type

Type Alias: SkyConstraint

type SkyConstraint = 
  | 
  | {
  body: BodyId;
}
  | {
  elongation: [BodyId, BodyId];
} & SkyArc & {
  pad?: number;
}
  | {
  visibility: SkyVisibility;
  within?: number;
};

One constraint for dateSky: a quantity and the arc it must lie in. The quantity is a body's ecliptic longitude, or the elongation of one body from another (["moon", "sun"] is the Moon's longitude minus the Sun's, so 0–180 is waxing and 180–360 is waning).

Union Members

| { body: BodyId; } | { elongation: [BodyId, BodyId]; } & SkyArc & { pad?: number; }


Type Literal

{
  visibility: SkyVisibility;
  within?: number;
}
NameTypeDescription
visibilitySkyVisibilityA first or last visibility at a place, in place of a position.
within?numberDays to widen the event's window of dates on each side.

Start building

Quickstart →