API

Interface GreasedLineMeshOptions

Options for creating a GreasedLineMesh

interface GreasedLineMeshOptions {
    colorPointers?: number[];
    instance?: GreasedLineBaseMesh;
    lazy?: boolean;
    points: GreasedLinePoints;
    pointsOptions?: GreasedLinePointsOptions;
    ribbonOptions?: GreasedLineRibbonOptions;
    updatable?: boolean;
    uvs?: FloatArray;
    widths?: number[];
}

Hierarchy (View Summary)

Index
colorPointers?: number[]

You can manually set the color pointers so you can control which segment/part will use which color from the colors material option

If instance is specified, lines are added to the specified instance. Defaults to undefined.

lazy?: boolean

Use when

  • instance is specified. If true, the line will be rendered only after calling instance.updateLazy(). If false, line will be rerendered after every call to
  • CreateGreasedLine Defaults to false.

Points of the line.

pointsOptions?: GreasedLinePointsOptions

Options for converting the points.

ribbonOptions?: GreasedLineRibbonOptions

The options for the ribbon which will be used as a line. If this option is set the line switches automatically to a non camera facing mode.

updatable?: boolean

If true, offsets and widths are updatable. Defaults to false.

UVs for the mesh

widths?: number[]

Each line segment (from point to point) can have it's width multiplier. Final width = widths[segmentIdx] * width. Defaults to empty array.