MilkyWayTextureOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What texture to paint.
インポート
import type { MilkyWayTextureOptions } from "@johnmorrisdotca/hoshi-stars/milky-way";
定義
interface MilkyWayTextureOptions extends MilkyWayDetailOptions {
width?: number;
frame?: "equatorial" | "galactic";
ramp?: readonly MilkyWayRampStop[];
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
width (省略可) | number | undefined | Pixels across: an even whole number from 16 to 4096 (the family's largest texture side), default 2048. The height is half of it. |
frame (省略可) | "galactic" | "equatorial" | undefined |
|
ramp (省略可) | readonly MilkyWayRampStop[] | undefined | The colours, at least two stops in rising order of level, the first at 0 and the last at 1. Default |
detail (省略可) | number | undefined | 0 reads the grid in straight lines between its points (the default for |
例
import { milkyWayTexture, type MilkyWayTextureOptions } from "@johnmorrisdotca/hoshi-stars/milky-way";
const options: MilkyWayTextureOptions = { width: 1024, frame: "galactic", detail: 1.5 };
console.log(milkyWayTexture(options).height); // 512512出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。