lineupFocus関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The body whose size the camera frames at a zoom: the nearest in the logarithmic scale of radius.
インポート
import { lineupFocus } from "@johnmorrisdotca/wakusei-planets";
定義
function lineupFocus(places: readonly LineupPlace[], zoom: number): LineupPlace | undefined
引数
| 名前 | 型 | 説明 |
|---|---|---|
places | readonly LineupPlace[] | The places, smallest first. |
zoom | number | 0 to 1. |
戻り値
LineupPlace | undefined
The place, or undefined for an empty line-up.
例
import { lineupBodies, lineupFocus, placeLineup } from "@johnmorrisdotca/wakusei-planets";
console.log(lineupFocus(placeLineup(lineupBodies(), "row"), 0.5)?.body.id);aldebaran出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。