Reference · Pictures of deep-sky objects and where each lies on the sky
pictureUrlfunction
The address of a picture's file: under the demo site by default, or under a folder of your own that holds a copy of the repository's pictures/ (with or without a closing slash).
Import it
import { pictureUrl } from "@johnmorrisdotca/hoshi-stars/deep-sky/pictures";
Definition
function pictureUrl(picture: DeepSkyPicture, base?: string): string
Parameters
| Name | Type | Description |
|---|---|---|
picture | DeepSkyPicture | A picture. |
base (optional) | string | The address the |
Returns
string
The file's address.
Examples
import { deepSkyPicture, pictureUrl } from "@johnmorrisdotca/hoshi-stars/deep-sky/pictures";
console.log(pictureUrl(deepSkyPicture("M31")!));
console.log(pictureUrl(deepSkyPicture("M31")!, "https://example.org/sky"));https://johnmorrisdotca.github.io/hoshi-stars/pictures/M31.webp
https://example.org/sky/pictures/M31.webpWhat it prints (run when this page was built)