MilkyWayTexturePixels型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A painted Milky Way texture.
インポート
import type { MilkyWayTexturePixels } from "@johnmorrisdotca/hoshi-stars/milky-way";
定義
interface MilkyWayTexturePixels {
width: number;
height: number;
data: Uint8ClampedArray;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
width | number | |
height | number | |
data | Uint8ClampedArray<ArrayBufferLike> | Red, green, blue and opacity for each pixel, row by row from the top, as |
例
import { milkyWayTexture, type MilkyWayTexturePixels } from "@johnmorrisdotca/hoshi-stars/milky-way";
const texture: MilkyWayTexturePixels = milkyWayTexture({ width: 256 });
console.log(texture.data.length === texture.width * texture.height * 4); // truetrue出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。