Skip to content

Types

ScrollSceneSetup<S> ​

ts
type ScrollSceneSetup<S> = (context) => void | (() => void);

Defined in: use-scroll-scene.ts:36

Builds the GL content for a scene. Runs once when the scene is created - after the ScrollScene is constructed (so its auto-managed uniforms are available) and before it is registered with the renderer.

Like a useEffect callback, it may return a cleanup function, which is called when the scene is removed - free any GL resources you created there.

Type Parameters ​

Type ParameterDefault type
S extends ScrollSceneScrollScene

Parameters ​

ParameterType
contextScrollSceneSetupContext<S>

Returns ​

void | (() => void)