FigureOnScreen型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One figure on the screen: where its lines are in FigureLines.segments, and its name's spot. The objects are reused by the next update.
インポート
import type { FigureOnScreen } from "@johnmorrisdotca/hoshi-stars/sky-labels";
定義
interface FigureOnScreen {
abbreviation: string;
start: number;
end: number;
left: number;
top: number;
right: number;
bottom: number;
x: number;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
abbreviation | string | The constellation's IAU abbreviation ( |
start | number | The figure's lines are the segments from |
end | number | |
left | number | The box the figure's lines in view take: its left, top, right and bottom edges. |
top | number | |
right | number | |
bottom | number | |
x | number | The middle of that box across: where its name is centred. |
例
import type { FigureOnScreen } from "@johnmorrisdotca/hoshi-stars/sky-labels";
const lines = (figure: FigureOnScreen): number => figure.end - figure.start;
console.log(typeof lines);function出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。