Reference · Bodies as objects for your own three.js scene
Paintingtype
One body made by the painter: an object of radius 1 at the origin for the caller to move and scale.
Import it
import type { Painting } from "@johnmorrisdotca/wakusei-planets/painter";
Definition
interface Painting {
object: THREE.Object3D;
billboard?: boolean;
update(info: PaintInfo): void;
dispose(): void;
}
Members
| Name | Type | Description |
|---|---|---|
object | THREE.Object3D<THREE.Object3DEventMap> | |
billboard (optional) | boolean | undefined | True to have the caller turn the object to face the camera (the Sun, which carries a glow). |
update | (info: PaintInfo): void | Call at each draw, after the object has been placed and scaled. |
dispose | (): void |
Examples
import type { Painting } from "@johnmorrisdotca/wakusei-planets/painter";
const stop = (painting: Painting): void => painting.dispose();
console.log(typeof stop);