Reference · Rockets, variants, parts and the fit check
beamLightfunction
The beam as light in a drawing. Painted is a blue-violet cone with a white core, rings and a flare at the drone. A line look is the same cone in strokes. Reduced motion is the glow with no rings.
Import it
import { beamLight } from "@johnmorrisdotca/uchusen-rockets";
Definition
function beamLight(from: Vec3, to: Vec3, narrow: number, wide: number, cam: Camera, look: LookName, id: string, still?: boolean): string
Parameters
| Name | Type | Description |
|---|---|---|
from | Vec3 | The drone end. |
to | Vec3 | The part end, where the light is brightest. |
narrow | number | The radius at the drone. |
wide | number | The radius at the part. |
cam | Camera | The picture's camera. |
look | "line" | "thick" | "painted" | Painted fills the light. Anything else draws strokes. |
id | string | A prefix so two pictures on one page do not share a gradient. |
still (optional) | boolean | True for reduced motion: the glow only, with no rings and no sparks. |
Returns
string
SVG markup for the light. Empty when the cone has no area.
Examples
import { beamLight } from "@johnmorrisdotca/uchusen-rockets";
console.log(typeof beamLight);functionWhat it prints (run when this page was built)