entering function
Scroll progress of a box coming into view, 0..1: 0 while less than `share` of it shows, 1 once it is centred in the viewport.
import { entering } from '@dioramajs/diorama/kit'. progress is input.progress, height the box height and viewport the viewport height in px.
function entering(
progress: number,
height: number,
viewport: number,
share: number,
): numberParameters
| Name | Type | Description |
|---|---|---|
progress | number | |
height | number | |
viewport | number | |
share | number |
Also exported from @dioramajs/effects/kit.
Defined in packages/effects/src/kit.ts.