Skip to content

attachLighting

attachLighting<T>(parent, self): () => void

Defined in: packages/three-flatland/src/react/attach.ts:44

R3F attach helper for LightEffect instances. Use as the attach prop when adding a light effect as a child of a flatland:

T extends LightEffect

Flatland

T

() => void

import { attachLighting } from 'three-flatland/react'
<flatland ref={flatlandRef} viewSize={400}>
<defaultLightEffect attach={attachLighting} />
<light2D lightType="point" position={[50, 50, 0]} color="orange" />
</flatland>