view function
How a box of `width` x `height` px sees its depth when its face is turned up by `ax` and right by `ay` (radians): the point the depth vanishes toward, in box px (y down), and the share of the way there a point at full depth goes.
import { view } from '@dioramajs/text/extrude'. At rest the back trails depth px away from the light at the box centre; turning the face toward a point moves the back away from it.
function view(
light: number,
depth: number,
ax: number,
ay: number,
width: number,
height: number,
out?: Vector3,
): Vector3Parameters
| Name | Type | Description |
|---|---|---|
light | number | |
depth | number | |
ax | number | |
ay | number | |
width | number | |
height | number | |
out? | Vector3 | Default |
Defined in packages/text/src/extrude.ts.