Getting started with Acorus
Ready for some actual code?
HelloAcorus
HelloAcorus is a complete application
that provides a starting point for studying and using Acorus.
It’s a simple extension of AcorusDemo
:
one without a FlyByCamera
, a DebugKeysAppState
, or a StatsAppState
.
A help node is displayed in the upper right corner of the viewport. The help node describes the available user actions. Two actions are available:
-
"ScreenShot" (bound to either Sys Rq or Scroll Lock) and
-
"SIMPLEAPP_Exit" (bound to Esc).
Code to handle the "ScreenShot" action is built into ActionApplication
.
Pressing the bound key causes the application to capture a screenshot
and write it to the working directory.
Pressing Esc triggers the "SIMPLEAPP_Exit" action.
Code to handle that action is also built into ActionApplication
.
It causes the application to terminate.
Because action names are intended for display in help nodes,
they should ideally be short and descriptive.
"SIMPLEAPP_Exit" is part of the JMonkeyEngine legacy,
so the buildNode()
utility method (which constructs the help node)
gives it special treatment.
That’s why "exit" is displayed in place of the actual action name.
For instance, if you install Git and a Java Development Kit, you should be able to launch example apps from a command shell, like so:
|
Here’s that link to the HelloAcorus source code again.
Like most of the example apps, |