← Back to Docs
  • index.html
  • Clayground
  • Clayground.Canvas3D
  • LineStyleTextureData
  • Clayground 2026.2
  • LineStyleTextureData QML Type

    Bakes a list of line styles into a small RGBA32F lookup texture. More...

    Import Statement: import Clayground.Canvas3D

    Properties

    Detailed Description

    LineStyleTextureData turns the declarative styles list into a one-pixel-tall RGBA32F texture, one texel column per style. LineBatch3D's fragment shader samples the column selected by a line's styleId (carried in the instance table) and decodes it. The texture is kTableRows RGBA32F rows tall (a versioned constant, so adding a row is a non-breaking format bump); the rows are:

    There is always at least one style: index 0 defaults to a solid, round-capped, fully opaque line, so styleId 0 works without configuring any styles.

    This type is used internally by LineBatch3D.

    See also LineBatch3D.

    Property Documentation

    styleCount : int [read-only]

    The number of style columns in the texture (always at least 1).


    styles : list

    The declarative list of line styles baked into the texture.

    Each element is an object { dash: [dashLen, gapLen], capRound: <bool>, opacity: <real>, pattern: <string>, patternUnits: <string>, flow: <real>, glow: <real>, pulse: <real>, head: [length, width] }. All keys past opacity are optional and default to the plain solid/dashed v1 behaviour.