Reference · Rockets, variants, parts and the fit check
playFromfunction
Whether the address asked for the build, and how far through it. A missing or wild at is the start.
Import it
import { playFrom } from "@johnmorrisdotca/uchusen-rockets";
Definition
function playFrom(params: URLSearchParams): { on: boolean; at: number; }
Parameters
| Name | Type | Description |
|---|---|---|
params | URLSearchParams | The page address's query. |
Returns
{ on: boolean; at: number; }
on when build=on, and at from 0 to 1.
Examples
import { playFrom } from "@johnmorrisdotca/uchusen-rockets";
console.log(playFrom(new URLSearchParams("build=on&at=0.5")).at);0.5What it prints (run when this page was built)