Skip to content

pickAt

pickAt(device, renderer, framebuffer, x, y, height): number

Defined in: webgl/pick.ts:14

Render the pick pass and read the drawableId under a screen pixel.

x, y are top-left-origin screen coordinates (as from a pointer event); WebGL readback is bottom-left, so y is flipped with height. Returns the drawableId, or -1 for empty background. The caller maps the id to a domain id.

framebuffer is used as a scratch target (its contents are overwritten).

Device

GroupRenderer

Framebuffer

number

number

number

number