Reference · Where the Sun, Moon and planets are for a date, in two scales, with the camera maths
placeSunfunction
The Sun, from the Earth's centre: in a compressed view always 44 Earth radii away, in its real direction.
Import it
import { placeSun } from "@johnmorrisdotca/wakusei-planets/space";
Definition
function placeSun(mode: ScaleMode, geo: Vec3): Vec3
Parameters
| Name | Type | Description |
|---|---|---|
mode | ScaleMode | The scale. |
geo | Vec3 | The Sun's place in astronomical units from the Earth's centre. |
Returns
Vec3
Where to draw it, in Earth radii.
Examples
import { placeSun } from "@johnmorrisdotca/wakusei-planets/space";
console.log(placeSun("compressed", [1, 0, 0]));[ 44, 0, 0 ]What it prints (run when this page was built)