A Software Development Kit created using a Java Swing UI with support for plugins and running AppStates from within the DevKit.
- Latest Gradle Plugin Version:
0.0.21
- Latest DevKit Version:
1.0.9
- Import Models (glTF using JMEC)
- Create, Edit, and Save scenes to .j3o format.
- Change Materials and material properties on Geometries.
- Create SkyBoxes from images.
- Generate LightProbes.
- InstancedNode Support.
- BatchNode Support.
- AssetLinkNode Support.
- Plugin Support.
- Run AppStates from your project in the SDK with custom property editing.
To use the SDK add the gradle plugin to your project and run the gradle task runSdk
plugins {
id "com.jayfella.jme-devkit" version "0.0.21"
}
File -> Import Model
The model importer uses the JmeConvert library created by Paul Speed and
supports the .glTF
or .glb
extension. For more information on importing models see the
JME Documentation.
Scene objects are added, removed and selected in the Scene Tree
window. The properties of the selected item are shown
in the Property Inspector
window. Most objects in the Scene Tree
window have a context menu associated with them,
which is made available by right-clicking the element in the scene tree.
Modifying any properties in the Property Inspector
has an immediate effect on the selected item. The properties
available will depend on the item that is selected in the Scene Tree
window. For example, selecting a Geometry
in the Scene Tree
window will allow you to change the material and material properties of that Geometry.
Right-Click a Spatial in Scene Tree Window -> Save...
You can save any Spatial
in the Scene Tree
window by right-clicking the Spatial in the Scene Tree
window and
selecting Save...
. You will be prompted with a dialog allowing you to select the directory and choose a name.
The selected directory must be inside the Asset Root
directory. After clicking OK
the Spatial will be saved
in the specified directory with the specified name, with the extension .j3o
.
Right-Click a Node in Scene Tree Window -> Add -> SkyBox...
Skyboxes can be added to a scene by right-clicking any Node
in the Scene Tree
window, clicking Add...
and
selecting SkyBox...
. SkyBoxes can be created using a CubeMap, SphereMap or EquirectMap. For some great examples of
skybox textures, visit HDRI Haven.
Right-Click a Spatial in Scene Tree Window -> Add -> Light -> Generate LightProbe...
Lights (including light probes) can be added to any Spatial
by right-clicking any Spatial
in the Scene Tree
window and clicking Add -> Light -> Generate LightProbe...
. You will be presented with a dialog window allowing you
to choose which node in your scene the lightprobe will use to create an Environment Map
, the shape (cube or sphere)
and the radius of the probe.
The TestDevKitPlugin repository contains a working example and documentation on how to create plugins.
Window -> Run AppState
Running an AppState from the DevKit gives the user more functionality, as well as allowing the user to create scene objects and provide separation of Game Objects. There are several rules in allowing an AppState to be run from the DevKit:
- The AppState must be inside the
devkit.appstate
package. - The AppState must have a class Annotation
DevKitAppState
. - The AppState must have a noArgs constructor.
You may also specify a tabs String[]
property in the annotation to specify tabs. For example
@DevKitAppState(tabs = { "Tab 1", "Tab 2", "Tab 3" } )
In addition to being able to run the AppState you can also specify annotations on methods to change values. These
annotations will automatically generate GUI components for you when you run the DevKitAppState
in the DevKit.
@ButtonProperty
- Creates a button. Must be Placed on a method returning
void
with no arguments. Executes the method when the button is pressed. For example:public void doSomething()
- Creates a button. Must be Placed on a method returning
@ColorProperty
- Creates a ColorPicker. Placed on a getter method returning
ColorRGBA
. You must also have a setter method. For example:public ColorRGBA getMyColor()
public void setMyColor(ColorRGBA color)
- Creates a ColorPicker. Placed on a getter method returning
@EnumProperty
- Creates a ComboBox. Placed on a getter method returning an Enum. You must also have a setter method.
For example:
public MyEnum getMyEnum()
public void setMyEnum(MyEnum myEnum)
- Creates a ComboBox. Placed on a getter method returning an Enum. You must also have a setter method.
For example:
@FloatProperty
- Creates a Slider. Placed on a getter method returning
float
. You must also have a setter method. For example:public float getMyFloatValue()
public void setMyFloatValue(float value)
- Optional parameters:
- min (optional, default Integer.MIN_VALUE)
- Specifies the minimum value the slider will allow.
- max (optional, default Integer.MAX_VALUE)
- Specifies the maximum value the slider will allow
- step (optional, default 1.0f)
- Specifies the amount of change the slider moves per movement.
- min (optional, default Integer.MIN_VALUE)
- Creates a Slider. Placed on a getter method returning
@IntegerProperty
- Creates a slider. Placed on a getter method returning
int
. You must also have a setter method. For example:public int getMyIntValue()
public void setMyIntValue(int value)
- Optional Parameters:
- min (optional, default Integer.MIN_VALUE)
- Specifies the minimum value the slider will allow.
- max (optional, default Integer.MAX_VALUE)
- Specifies the maximum value the slider will allow
- step (optional, default 1.0f)
- Specifies the amount of change the slider moves per movement.
- min (optional, default Integer.MIN_VALUE)
- Creates a slider. Placed on a getter method returning
@ListProperty
- Creates a List or ComboBox. Placed on a method returning an Array of any object type with no arguments.
In addition there must also be a getter and setter for the index chosen in the list.
For example:
public String[] myStrings()
public int getMySelectedIndex()
public void setMySelectedIndex(int value)
- accessorName (required)
- Specifies the common method name of the getter and setter. For example
getMySelectedIndex
andsetMySelectedIndex
would have an accessorName ofMySelectedIndex
- Specifies the common method name of the getter and setter. For example
- listType (optional, default ListType.List)
- Determines whether or not to create a List or ComboBox.
- Creates a List or ComboBox. Placed on a method returning an Array of any object type with no arguments.
In addition there must also be a getter and setter for the index chosen in the list.
For example:
All of These annotations have a tab
property. The GUI control will be placed in the tab of the matching name in the
DevKitAppState
annotation. If no tab name is specified the GUI component will not be placed in a tab.
For a complete example, see the TestDevKitAppState class.