Skip to the content

Hoshi Stars星

The stars you can see without a telescope, with names, colours and distances; the 88 constellations with their lines and boundaries; the Messier objects; and seven map projections to draw them on.

Hoshi is the Japanese word 星 for a star. About the name

Contents

Reference · The Milky Way: a brightness map and soft bands to draw

MilkyWayTexturePixelstype

A painted Milky Way texture.

Import it

import type { MilkyWayTexturePixels } from "@johnmorrisdotca/hoshi-stars/milky-way";

Definition

interface MilkyWayTexturePixels {
    width: number;
    height: number;
    data: Uint8ClampedArray;
}

Members

NameTypeDescription
widthnumber
heightnumber
dataUint8ClampedArray<ArrayBufferLike>

Red, green, blue and opacity for each pixel, row by row from the top, as ImageData and a WebGL texture take them. The colour is not multiplied by the opacity.

Examples

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); // true
true

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hoshi-stars 0.47.0.