This module contains `.ShowBase`, an application framework responsible
for opening a graphical display, setting up input devices and creating
the scene graph.
The simplest way to open a ShowBase instance is to execute this code:
.. code-block:: python
from direct.showbase.ShowBase import ShowBase
base = ShowBase()
base.run()
A common approach is to create your own subclass inheriting from ShowBase.
Built-in global variables
-------------------------
Some key variables used in all Panda3D scripts are actually attributes of the
ShowBase instance. When creating an instance of this class, it will write many
of these variables to the built-in scope of the Python interpreter, so that
they are accessible to any Python module, without the need fors extra imports.
While these are handy for prototyping, we do not recommend using them in bigger
projects, as it can make the code confusing to read to other Python developers,
to whom it may not be obvious where these variables are originating.
Refer to the :mod:`builtins` page for a listing of the variables written to the
built-in scope.