Three box primitives are created with the WT::createBox() method and positioned progressively further from the camera. Because the boxes overlap each other within the camera viewpoint, pick operations can be ambiguous - clicking on the red box, for example, also picks the blue and green boxes. The container's pick priority and its distance from the camera are used to resolve the ambiguity.
Pick events are handled by instructing the Web Driver to generate the events, then instructing the browser to route those events to our own code. Once inside the event handling script, you can create whatever behavior you wish. In this case, we just pop up a message box describing the pick operation.
WT::createBox, WTContainer::setPickPriority, WT::setNotifyMouseEvent, WTEvent::getObject, WTEvent::getType