Interface NormalisedHatchPattern

Canonical representation of a hatch pattern, suitable for forwarding to a downstream consumer (or for inspection by tools).

Layout:

  • families is exactly MAX_HATCH_FAMILIES × HATCH_FAMILY_FLOAT_STRIDE floats long, zero-padded after count. Each family occupies 8 consecutive slots:

    [cos(θ), sin(θ), spacing, lineWidth,
    typeId, phase, param1, param2 ]

    typeId is 0=line, 1=dot, 2=wavy, 3=brick. param1 and param2 encode the type-specific extras (amplitude / wavelength for wavy; brickHeight / courseOffset for brick).

  • count is the number of in-use families (0..4). 0 means "no hatch" — consumers short-circuit and render the surface without overlay.

  • color is exactly 4 floats long: (r, g, b, opacity), opacity = 0 collapses to no-visible-hatch.

interface NormalisedHatchPattern {
    color: Float32Array<any>;
    count: number;
    families: Float32Array<any>;
    space: number;
}

Properties

color: Float32Array<any>
count: number
families: Float32Array<any>
space: number

Coordinate-space flag — 0 for "screen", 1 for "world", 2 for "tangent". Plain number rather than the named-string type so downstream consumers (GPU encoder, shader) can read it as an integer flag without a string compare.