Reference · SVG faces and looks
directionOffunction
The direction a view draws in.
Import it
import { directionOf } from "@johnmorrisdotca/jarajara/faces";
Definition
function directionOf(mirror: TileMirror | undefined): BlockDirection
Parameters
| Name | Type | Description |
|---|---|---|
mirror | "none" | "horizontal" | "vertical" | "both" | undefined | The native mirrored tile orientation. |
Returns
BlockDirection
The direction a view draws in.
Examples
import { directionOf } from "@johnmorrisdotca/jarajara/faces";
console.log(directionOf("horizontal"));{ x: -1, y: 1 }What it prints (run when this page was built)