Hooks
useSceneProgress
Returns scene-level scroll progress for a specific element.
Overview
useSceneProgress(ref, durationPx) returns scene-level scroll progress for a specific element. Useful when building custom scroll-driven components outside of <Scene>.
Usage
Parameters
| Param | Type | Description |
|---|---|---|
spacerRef | RefObject<HTMLElement | null> | Ref to the spacer/container element |
durationPx | number | Total scroll distance in pixels |
Returns
| Type | Description |
|---|---|
number | Progress from 0 to 1 |