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:
Type Parameters
Section titled “Type Parameters”T extends LightEffect
Parameters
Section titled “Parameters”parent
Section titled “parent”T
Returns
Section titled “Returns”() => void
Example
Section titled “Example”import { attachLighting } from 'three-flatland/react'
<flatland ref={flatlandRef} viewSize={400}> <defaultLightEffect attach={attachLighting} /> <light2D lightType="point" position={[50, 50, 0]} color="orange" /></flatland>