beamLight関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
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 { beamLight } from "@johnmorrisdotca/uchusen-rockets";
定義
function beamLight(from: Vec3, to: Vec3, narrow: number, wide: number, cam: Camera, look: LookName, id: string, still?: boolean): string
引数
| 名前 | 型 | 説明 |
|---|---|---|
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 (省略可) | boolean | True for reduced motion: the glow only, with no rings and no sparks. |
戻り値
string
SVG markup for the light. Empty when the cone has no area.
例
import { beamLight } from "@johnmorrisdotca/uchusen-rockets";
console.log(typeof beamLight);function出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。