# `Input.pick`

> Contract 2.0.0 · package sha256 `a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e` · generated from `configurator-runtime.d.ts` by `services/onsite-scripter/scripts/build-contract-docs.mjs`; edit the source, not this file.

Method of [`Input`](Input.md) · stable · since 2.0.0 · called as `session.input.pick`

```ts
pick(at: ScreenPoint, options?: PickOptions): Promise<Hit | null>;
```

Observed (GPU or BVH work). The nearest hit under a point, or null. `at` is CSS px from the
element's top-left corner.
Errors: rejects HoloInputError on invalid input; AbortError on [`destroy()`](Session.destroy.md).

## Options

Through [`Session`](Session.md):

| Option | Type | Default | What it does |
| --- | --- | --- | --- |
| `includeHidden` | `boolean` | false | Hidden parts can be hit too. |
| `query` | `Query` | every pickable part | The parts that can be hit, whatever their `pickable` (as `includeHidden` opts hidden parts in); connector planes never. |

## Example

Imports: values (`has`, `validate`, the `Holo*Error` classes, the pure helpers) from `@holostep-configurators/runtime-client`, types from `@holostep-configurators/runtime-client/contract`, `/math` and `/testing` names from those entries; `boot` from the runtime module the root's `loadRuntimeAtFloor` resolves to. A type your page defines is your app's: declare it there, never import it from the package.

Compiled under the contract's strict settings (`examples/declaration/11-Input.pick.ts`):

```ts
import type { Session } from '@holostep-configurators/runtime-client/contract';
declare const session: Session;
declare const signal: AbortSignal;
declare const viewerEl: HTMLElement;                       // the element you passed to boot
viewerEl.addEventListener('dblclick', async (e) => {
  const hit = await session.input.pick({ x: e.offsetX, y: e.offsetY });
  if (!hit?.part.node) return;
  await session.camera.fit(session.node(hit.part.node), { paddingM: 0.1, durationMs: 500 });
}, { signal });
```

## Generic-API test (spec 3.1)

| Rule | Result |
| --- | --- |
| 1. Neutral name | pass: `pick` names no product |
| 2. A precedent | not recorded: no ledger row (coverage.json) names this member or its owner |
| 3. Two apps, or labs | pass: 5 apps (fleet cross-check: app-04c2774145, app-37356bf09f, app-4762caacdc, app-e61a0b42ad, app-fc306ec3dc) |
| 4. The cheaper fix first | not recorded per member (Appendix B decides it per need) |
