The renderer to drive. The strategy assumes the renderer is in WebGLRenderer.rendering state when pick is called — the RoutingPickStrategy that composes this leaf is responsible for that gate.
ReadonlystateMonotonic counter that bumps every time the strategy's internal state changes in a way that invalidates cached results — for example, when a RoutingPickStrategy's renderer becomes available, or its WebGL context is lost. A future memoising decorator compares this against the epoch stamped on cached results to know when to drop them.
Strategies whose state never changes (e.g. BVHPickStrategy)
may always return 0.
Run one pick. Sync — even when the GPU backend is involved,
gl.readPixels blocks until the result is in. See
PickResult for what's populated.
GPU-backed picking strategy — wraps WebGLRenderer.pick.
Handles:
worldNormalwhen PickParams.pickSurfaceNormal is set;localPos,uv,meshIdwhenever the renderer surfaces them.Doesn't handle:
The renderer returns a transient, renderer-owned
PickResultwhose contents are valid only until the next pick. We deep-copy the fields we need into a fresh canonical PickResult so callers can hold onto it.Stateless after construction; stateEpoch stays
0. (State changes that affect GPU readiness are tracked by the RoutingPickStrategy that owns this leaf, not by the leaf itself.)