Reference · A star drawn from its numbers as SVG, and next to the Sun
portraitLookfunction
The look a profile is drawn with, or undefined where it has no temperature to draw.
Import it
import { portraitLook } from "@johnmorrisdotca/hoshi-stars/portrait";
Definition
function portraitLook(profile: StarProfile): PortraitLook | undefined
Parameters
| Name | Type | Description |
|---|---|---|
profile | StarProfile | A star's profile. |
Returns
PortraitLook | undefined
The look, or undefined where the profile has no temperature.
Examples
import { starByName } from "@johnmorrisdotca/hoshi-stars";
import { starProfile } from "@johnmorrisdotca/hoshi-stars/profile";
import { portraitLook } from "@johnmorrisdotca/hoshi-stars/portrait";
console.log(portraitLook(starProfile(starByName("Betelgeuse")!)), portraitLook(starProfile(starByName("Sirius")!)));supergiant hotWhat it prints (run when this page was built)