Now that we know how to set up a document class and extend it from the BasicView
class, we will not go through these steps anymore in the examples that are coming up in the next chapters. Extending the BasicView
class is a huge time saver, as you do not have to define the standard properties and methods over and over again. You can save even more time when working through this book because the examples always start based on the same extended BasicView
class. So why not copy this class as a code snippet, which you can use each time you start working on a new example?
The class that you can use as the snippet is almost exactly the same as the class from our latest example. There are a few parts inside this class that make it too specific to use it as a snippet. For instance, we will not use the rotating sphere in every example. On the other hand, our class contains the changed frame rate and the overridden onRenderTick()
method. Each example will use this setting...