CuboidViewEventstype
What a cuboid tells the listeners on adds: a turn a person made, with the stickers after it; and the view turned, in degrees.
Import it
import type { CuboidViewEvents } from "@johnmorrisdotca/kyuubu/cuboid/draw";
Definition
type CuboidViewEvents = {
turn: (move: CuboidMove, state: string) => void;
look: (yaw: number, pitch: number) => void;
};
Members
| Name | Type | Description |
|---|---|---|
turn | (move: CuboidMove, state: string) => void | |
look | (yaw: number, pitch: number) => void |
Examples
import type { CuboidViewEvents } from "@johnmorrisdotca/kyuubu/cuboid/draw";
const value: CuboidViewEvents = { turn: (move, state) => console.log(move, state), look: (yaw, pitch) => console.log(yaw, pitch) };
console.log(Object.keys(value));[ 'turn', 'look' ]What it prints (run when this page was built)