TestStart.py 568 B

12345678910111213141516171819202122
  1. print('TestStart: Starting up test environment.')
  2. import direct.showbase.PythonUtil # pylint: disable=unused-import
  3. from direct.showbase import ShowBase
  4. base = ShowBase.ShowBase()
  5. # Put an axis in the world:
  6. base.loader.loadModel("models/misc/xyzAxis").reparentTo(base.render)
  7. assert base.camera is not None
  8. assert base.camLens is not None
  9. base.camera.setPosHpr(0, -10.0, 0, 0, 0, 0)
  10. base.camLens.setFov(52.0)
  11. base.camLens.setNearFar(1.0, 10000.0)
  12. base.clock.setMaxDt(0.2)
  13. base.enableParticles()
  14. # Force the screen to update:
  15. base.graphicsEngine.renderFrame()