JamesTKhan / Mundus

A 3D world/level editor built with Java, Kotlin & libGDX.
Apache License 2.0
156 stars 22 forks source link

New component via plugin #289

Open Dgzt opened 5 months ago

Dgzt commented 5 months ago

This PR expands functionality of plugin system. The purpose is that plugin can add new component what runtime can load (via plugin's runtime module).

Changes:

Add a new component type: PHYSICS.

Add optional CustomComponentConverter argument to constructor of Mundus runtime class. This converter can read read custom component properties.

New extension interfaces:

Plugin's RootWidget additions:

Tested it with HTML and it works well.

Example: ode4j plugin.

You can try it with Mundus Example Project with Ode4j plugin: https://github.com/Dgzt/MundusRuntimeExample/tree/ode4j-plugin (use 1,2,3 buttons to throw shapes)