Reference · Where the Sun, Moon and planets are for a date, in two scales, with the camera maths
blendfunction
A frame between two others, t from 0 to 1.
Import it
import { blend } from "@johnmorrisdotca/wakusei-planets/space";
Definition
function blend(a: SpaceFrame, b: SpaceFrame, t: number): SpaceFrame
Parameters
| Name | Type | Description |
|---|---|---|
a | SpaceFrame | The earlier frame. |
b | SpaceFrame | The later frame. |
t | number | How far from |
Returns
SpaceFrame
The frame at that fraction.
Examples
import { blend, frameAt } from "@johnmorrisdotca/wakusei-planets/space";
const start = Date.UTC(2026, 10, 2);
const middle = blend(frameAt(start), frameAt(start + 1000), 0.5);
console.log(middle.ms - start);500What it prints (run when this page was built)