Reference · The <chikyu-space> element
setBodyPainterfunction
Change how the Sun and the planets are drawn (before the first element connects): the space view keeps their places, sizes, light, names and orbits and asks
the painter only for what to draw at each place (see BodyPainter). Left alone, they are plain spheres in the right colours.
Import it
import { setBodyPainter } from "@johnmorrisdotca/chikyu-earth/space/element";
Definition
function setBodyPainter(next: BodyPainter | undefined): void
Parameters
| Name | Type | Description |
|---|---|---|
next | BodyPainter | undefined | The painter to use, or |
Examples
import { plainPainter } from "@johnmorrisdotca/chikyu-earth/space";
import { setBodyPainter } from "@johnmorrisdotca/chikyu-earth/space/element";
setBodyPainter({ make: (three, name) => plainPainter.make(three, name) });