Description
Create 3D scenes and games with the power of JMonkeyEngine and Griffon combined.
Installation
The current version of griffon-jmonkeyengine-plugin is 0.2
To install just issue the following command
Usage
This plugin has two modes of operation: normal and embedded.
Normal mode
In this mode the first application() node to be resolved will produce a a subclass of jME3's com.jme3.app.SimpleApplication. Subsequent should produce the default container, typically a JFrame in a Swing application. This is the default mode of operation. When in this mode you can define what the game does. The following example shows a rotating cube
Closures
The game subclass allows the following closure properties to be defined:
- onInit() - initializes the game, sames as
SimpleApplication.simpleInitApp(). - onUpdate(float tpf) - updates the game, same as {{SimpleApplication.simpleUpdate(float tpf)}.
- onRender(RenderManager rm) - called when a render pass is made, same as
SimpleApplication.simpleRender(RenderManager rm).
Events
The following events will be triggered by this mode
- JmeInit[app, gc] - triggered when the game inits itself
- JmeUpdate[app, tpf] - triggered when the game has been updated
- JmeRender[app, rm] - triggered when the game has completed a render pass (rm stands for
RenderManager)
Embedded mode
In this mode there will be n automatic game handling; every single application() node will resolve to the default container. You are responsible for initializing jME3 and embed a View as you see fit. The following configuration flag enables this mode
History
Version |
Date |
Notes |
|---|---|---|
0.2 |
10-21-11 |
Release sync with Griffon 0.9.4 |
0.1.1 |
03-11-11 |
Enabled embedded mode |
0.1 |
12-21-10 |
Initial release |