Documentation
    Preparing search index...

    Interface PolylineOptions<M>

    Options of Polyline (§50 "polyline").

    interface PolylineOptions<M extends Material = SurfaceMaterial> {
        castShadow?: boolean;
        clip?: boolean;
        fill?: ShapeFill;
        frustumCulled?: boolean;
        material?: M;
        points: readonly Point2D[];
        receiveShadow?: boolean;
        renderLayer?: number;
        renderOrder?: number;
        scissor?: ScissorRect | null;
        stroke: StrokeStyle;
        tolerance?: number;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index
    castShadow?: boolean

    Initial Renderable.castShadow; defaults to true (§69).

    clip?: boolean

    Initial Node.clip; defaults to false (§67).

    Here rather than on a Node options record because a clip is only meaningful on a node that draws — the mask is the node's own geometry — and this is the options record every drawable funnels through. It is also what gives the §79 readers one spelling for the field beside the three §49 flags above.

    fill?: ShapeFill

    Initial Shape2D.fill; defaults to "none".

    frustumCulled?: boolean

    Initial Renderable.frustumCulled; defaults to true (§87).

    material?: M

    Surface appearance (§57). Required unless a §58 object paint derives one — a shape without either draws nothing, and that mistake is refused at construction (§85) rather than hidden behind an invisible node.

    The two states are exclusive, both ways (§85, refused loudly):

    • material, no object paint — R-16's tier: solid paints travel as per-vertex colour through this material, which must multiply them (vertexColors: true).
    • object paint, no material — the paint-object tier: the shape derives a §60 NodeMaterial from its paints and wears it as Renderable.material (typed by M, which stays at its default — the derived material is the one place the family's parameter is wider than its type; see Paint). Passing a material and an object paint is refused: the material would be silently ignored, which is "accepted and ignored" wearing a disguise.

    §50's example writes fill: "#4466ff" instead of a material, and at the solid tier that stays unsupported for R-16's recorded reasons (an invented material is an undisclosed §83 liability and §79 has no key for it). At the object tier both objections dissolve — the derived material owns nothing the application must dispose, and §79 writes the paint itself — which is exactly why the object tier is spelled without a material.

    points: readonly Point2D[]

    Initial Polyline.points; required, at least two, copied into the shape's own records.

    receiveShadow?: boolean

    Initial Renderable.receiveShadow; defaults to true (§69).

    renderLayer?: number

    Initial Renderable.renderLayer; defaults to 0.

    renderOrder?: number

    Initial Renderable.renderOrder; defaults to 0.

    scissor?: ScissorRect | null

    Initial Renderable.scissor; defaults to null (§67).

    A per-draw axis-aligned rectangle in drawing-buffer pixels. null (the default) leaves the view scissor alone, so existing scenes stay transcript-identical. See scissor.ts.

    stroke: StrokeStyle

    How the chain is drawn (§58). Required, for Line's reason.

    tolerance?: number

    Initial Shape2D.tolerance in world units; defaults to §51's DEFAULT_FLATTEN_TOLERANCE.