API

Interface GreasedLineMeshBuilderOptions

Line mesh options for GreasedLineBuilder

interface GreasedLineMeshBuilderOptions {
    colorPointers?: number[];
    instance?: GreasedLineBaseMesh;
    lazy?: boolean;
    points: GreasedLinePoints;
    pointsOptions?: GreasedLinePointsOptions;
    ribbonOptions?: GreasedLineRibbonOptions;
    updatable?: boolean;
    uvs?: FloatArray;
    widthDistribution?: GreasedLineMeshWidthDistribution;
    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

Distribution of the widths if the width table contains fewer entries than needed. Defaults to GreasedLineMeshWidthDistribution.WIDTH_DISTRIBUTION_START

CompleteGreasedLineWidthTable

widths?: number[]

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