Skip to content

@graphty/layout / positions / toPositionColumn

Function: toPositionColumn() ​

toPositionColumn(r, scale, center, out?): F32

Defined in: positions.ts:76

The stride-3 scene-unit column of a layout result: v * scale + center[k] per component; a 2D row's z is the centre's z (0 without a centre).

Parameters ​

r ​

LayoutResult

the layout result

scale ​

number

scene units per layout unit

center ​

ArrayLike<number> | null

the scene-unit centre (missing components are 0), or null for the origin

out? ​

F32

the owner's array to write into (at least 3 * n long); a new one when absent

Returns ​

F32

the column