We have replaced the draw function with the render function, as described earlier in this chapter.
There is now a new class: Picker. The source code for this class can be obtained from common/js/Picker.js. This class encapsulates the offscreen framebuffer and the code necessary to create, configure, and read from it. We’ve also updated the Controls class to notify the picker when the user clicks on the canvas.
Now, let's see picking in action!