Reference · Rockets, variants, parts and the fit check
revealDelayfunction
How long to wait, once the 3D view is ready at readyAt, before it takes over from a drawing first seen at shownAt (0 under reduced motion).
Import it
import { revealDelay } from "@johnmorrisdotca/uchusen-rockets";
Definition
function revealDelay(shownAt: number, readyAt: number, reducedMotion: boolean): number
Parameters
| Name | Type | Description |
|---|---|---|
shownAt | number | When the drawing first came on screen, in milliseconds. |
readyAt | number | When the 3D view became ready, on the same clock. |
reducedMotion | boolean | True when the reader asked for reduced motion. |
Returns
number
The milliseconds to wait before the 3D view takes over.
Examples
import { revealDelay } from "@johnmorrisdotca/uchusen-rockets";
console.log(revealDelay(0, 300, false), revealDelay(0, 300, true));900 0What it prints (run when this page was built)