Interface PickOptions
debugLabel?: string;
discard?: PickDiscardRule;
filter?: (mesh: Mesh) => boolean;
ignore?: PickIgnore | readonly PickIgnore[];
}
Properties
Optionaldebug Label
Dev-only diagnostics: logs the pick ray, pixel, pick id/depth and resolved mesh.
Optionaldiscard
Optional GPU fragment-discard extension for app-specific pick removal.
wgsl is injected into the regular and thin-instance picking shaders and must define:
fn shouldDiscardPick(input: PickDiscardInput) -> bool
The input exposes only generic picker data: worldPos, fragmentCoord (the selected pixel
centre in the original backing framebuffer), pickId, thinInstanceIndex,
hasThinInstance, and instanceExtras (the
original thin-instance matrix w lanes, zero for non-instanced meshes), and optional regular-mesh
vertexData selected by the discard rule. Storage entries are uploaded and bound by Lite for the
current pick only. They are fragment-visible by default and vertex-visible when explicitly marked.
Optionalfilter
Restrict the pick to a subset of the scene's meshes — return true for a mesh that may be picked,
false to ignore it entirely (it neither occludes nor is returned). Lets a caller provide its
"list of pickables" so decorative meshes (grass, foliage, particles, …) can't swallow a pick of a
structure behind/around them. When omitted, every mesh is pickable (previous behaviour). A supplied
mesh filter also excludes non-mesh contributors: the predicate cannot admit them, and letting them draw
would make a mesh-targeted pass neither isolated nor deterministic. Applied once while building the
candidate list used by both id assignment and resolution, so ids stay consistent.
Optionalignore
Exclude selected visible identities while picking the surface behind them (for direct manipulation). A mesh-only identity omits the regular mesh or all of its thin instances. A thin-instance index or contiguous range discards that identity in the same GPU pass; no repick or CPU proxy is involved.
Options for pickAsync.