# inView

function in `@dioramajs/diorama/kit`

```ts
import { inView } from '@dioramajs/diorama/kit'
```

Whether `share` 0..1 of a box is in view, counted above the bottom tenth of the viewport: a
box peeking in at the edge has not been looked at yet. `top` and `height` are the box's in
viewport px (`input.y`, `input.height`), `viewport` the viewport height. An empty box never is.

```ts
function inView(
  top: number,
  height: number,
  viewport: number,
  share: number,
): boolean
```

| Parameter | Type | Description |
| --- | --- | --- |
| `top` | `number` |  |
| `height` | `number` |  |
| `viewport` | `number` |  |
| `share` | `number` |  |

Also exported from `@dioramajs/effects/kit`.

Defined in [packages/effects/src/kit.ts](https://github.com/MasterKurosava/diorama/blob/main/packages/effects/src/kit.ts#L286).
