Skip to content

ChannelNodeMap

Defined in: packages/three-flatland/src/materials/channels.ts:24

Maps well-known channel names to their TSL node types. Users extend via module augmentation for custom channels:

declare module 'three-flatland' {
interface ChannelNodeMap {
roughness: Node<'float'>
emissive: Node<'vec3'>
}
}

elevation: Node <"float">

Defined in: packages/three-flatland/src/materials/channels.ts:34

World-space elevation of the fragment in [0, 1]. 0 = ground plane (floor), 1 = top-of-wall (cap). Consumed by DefaultLightEffect to compute L.z = lightHeight − elevation per fragment per light, so torches below wall caps stop lighting them. Baked into the normal atlas’s B channel; reconstructed-nz is derived at runtime from the RG channels (nz = sqrt(1 − nx² − ny²)).


normal: Node <"vec3">

Defined in: packages/three-flatland/src/materials/channels.ts:25