attachEffect
attachEffect<
T>(parent,self): () =>void
Defined in: packages/three-flatland/src/react/attach.ts:26
R3F attach helper for MaterialEffect instances.
Use as the attach prop when adding effects as children of a sprite2D or tileMap2D:
Type Parameters
Section titled “Type Parameters”T extends MaterialEffect
Parameters
Section titled “Parameters”parent
Section titled “parent”T
Returns
Section titled “Returns”() => void
Example
Section titled “Example”import { attachEffect } from 'three-flatland/react'
<sprite2D texture={tex}> <dissolveEffect attach={attachEffect} /></sprite2D>
<tileMap2D data={mapData}> <autoNormalProvider attach={attachEffect} /></tileMap2D>