Skip to content
pixi-silk
GitHub repository
Function

lineOfIndex

import { lineOfIndex } from 'pixi-silk/text';
function lineOfIndex(
   layout: TextLayout, 
   index: number, 
   upstream?: boolean
): number;

The line a caret at index is on. At a wrap, upstream picks the end of the first line over the start of the next.

Parameters#

ParameterTypeDefault value
layoutTextLayoutundefined
indexnumberundefined
upstreambooleanfalse

Returns#

number