Documentation
    Preparing search index...

    Function createPickProvider

    • Adapts service — already updated against viewport by the caller's frame — into the render-free PickProvider shape a pointer handler consults (§71, §72; RFC 0005).

      registerPickingPipeline();
      const picking = renderer.createPickingService!();
      const provider = createPickProvider(picking, view);
      // per frame that wants pixel picking:
      picking.update(scene, view);
      // in a pointer handler:
      const nodeId = await provider.pick(ndcX, ndcY);

      The provider closes over one viewport because the service's id buffer holds exactly one view's pass; an application with several pickable views makes one provider per view. What is deliberately dropped is the PickResult.frame ordinal — the seam's contract is identity only; a caller that needs to reason about staleness holds the service and calls pick on it directly.

      Parameters

      Returns PickProvider