LayoutStrategy
Defined in: types.ts:71
Maps a continuous depth to a pose. Must be pure and must write into out
rather than allocating. Depth 0 is the front card; negative depth is exiting.
Example
Section titled “Example”import { fan, type LayoutStrategy } from '@rpxl/riffle'
const layout: LayoutStrategy = fan({ scaleStep: 0.1 })Properties
Section titled “Properties”
readonlyname:string
Defined in: types.ts:73
The layout’s own name, for debugging. fan()’s is 'fan'.
Methods
Section titled “Methods”pose()
Section titled “pose()”pose(
depth,geometry,out):Pose
Defined in: types.ts:75
Writes out’s fields for depth and returns it.
Parameters
Section titled “Parameters”number
geometry
Section titled “geometry”Returns
Section titled “Returns”stepTravel()
Section titled “stepTravel()”stepTravel(
geometry):number
Defined in: types.ts:77
Pixels the front card travels to advance one position.
Parameters
Section titled “Parameters”geometry
Section titled “geometry”Returns
Section titled “Returns”number