Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

JMonkeyEngine 3D game support

branch: master

JMonkeyEngine support

Plugin page:

Create 3D scenes and games with the power of JMonkeyEngine and Griffon combined.


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 subclass of jME3's 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


    package sample
    import com.jme3.scene.Geometry
    class SampleModel {
        Geometry cube


    package sample
    import com.jme3.material.Material
    import com.jme3.math.ColorRGBA
    import com.jme3.math.Vector3f
    import com.jme3.math.Quaternion
    import com.jme3.renderer.RenderManager
    import com.jme3.scene.Geometry
    import com.jme3.scene.shape.Box

    application(title: 'JMonkeyEngine + Griffon',
      iconImage: imageIcon('/griffon-icon-48x48.png').image,
      iconImages: [imageIcon('/griffon-icon-48x48.png').image,
                   imageIcon('/griffon-icon-16x16.png').image]) { = {
            Box box = new Box(Vector3f.ZERO, 1, 1, 1)
            model.cube = new Geometry("Box", box)

            Material mat = new Material(assetManager, 'Common/MatDefs/Misc/Unshaded.j3md')
            mat.setTexture("m_ColorMap", assetManager.loadTexture("griffon-icon-256x256.png"))
            model.cube.material = mat

        } = { float tpf ->
            model.cube.rotate((-1.5*tpf) as float, (2*tpf) as float, tpf)


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).


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 no automatic game handling; every single application() node will resolve to the default container. Developers are responsible for initializing jME3 and embed a View as you see fit. The following configuration flag enables this mode


    jmonkeyengine.embedded = true
Something went wrong with that request. Please try again.