Smart programmers use less code
The FirstApplication example is a nice and minimal Papervision3D class. Each time we want to make a new Papervision3D application we could copy this class and add the specific logic for the new application to it. But isn't there a smarter way to do this? Each Papervision3D project contains minimal definitions of—a camera, a scene, a renderer, and a viewport. Defining these properties and importing the classes each time you start with a Papervision3D project sounds like a lot of work. Smart programmers ask themselves how they can do this in a more efficient way. Fortunately, Papervision3D includes a class called BasicView that contains the basic setup we need. As the BasicView class is, in the end, an extended Sprite, we can instantiate it and add it to the stage or extend our document class with it. In the book we'll use the last option.
So how does that work? Let's have a look at the improved version, with the same sphere rotating on its y-axis.
package ...