Skip to content

WithRequiredChannels

WithRequiredChannels<C> = { [K in C[number]]: K extends keyof ChannelNodeMap ? ChannelNodeMap[K] : Node }

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

Narrows a type by adding required channel properties. Known channels use mapped types; unknown channels fall back to Node.

Used by createLightEffect to type the light callback context — if requires: [‘normal’], then ctx.normal is Node<‘vec3’> (guaranteed).

C extends readonly string[]