Cut interface
A flat cut of the text block that folds on a hinge.
import type { Cut } from '@dioramajs/text/unfold'interface CutMembers
| Name | Type | Description |
|---|---|---|
readonly corners | readonly [number, number, number, number, number, number, number, number] | Corners in box px (y down): top left, top right, bottom left, bottom right; a triangle repeats its last. |
readonly edges | readonly [number, number, number, number] | Across each edge (top, bottom, left, right): the cut whose hinge it is, -1 for none. |
readonly hinge | readonly [number, number, number, number] | A point on the hinge and the unit direction across it into this cut, box px, y down. |
readonly layer | number | Paper thicknesses it lies above its parent when folded: the cuts folded in under it. |
readonly parent | number | The cut it hangs from, always an earlier one; -1 hangs it from the page. |
readonly unit | number | The timing unit that opens it; -1 never moves. |
Defined in packages/text/src/unfold.ts.