Android and libGDX
The Java runtime is a pure Java port (Java 11+) with a libGDX renderer and sound, and a Kotlin OpenBoneView for
Android 7+ with sound through SoundPool and MediaPlayer. Scripts run in QuickJS (openbone-scripting).
Install
Section titled “Install”From Maven Central:
dependencies { implementation("io.openbone:openbone-runtime:0.3.0") implementation("io.openbone:openbone-scripting:0.3.0") // document scripts implementation("io.openbone:openbone-android:0.3.0") // OpenBoneView // or: implementation("io.openbone:openbone-gdx:0.3.0") // libGDX renderer and sound}Export from the editor
Section titled “Export from the editor”Put the exported .obone or .obonb file and its images in your app’s assets (assets/knight/).

Play it
Section titled “Play it”val view = OpenBoneView(context)view.load(assets.open("knight/knight.obone").readBytes(), ImageSource.assets(assets, "knight"), SoundSource.assets(assets, "knight"))view.useStateMachine("knight") // or view.play("walk")view.onEvent { e -> if (e.name == "footstep") playStep() }view.onStateChange { layer, from, to -> Log.d("anim", "$layer: $from → $to") }view["walk"] = true // inputs: Boolean, Number or Stringview.fire("attack")view.fit = OpenBoneView.Fit.CONTAINTouch and hover reach the state machine’s pointer listeners. release() stops sounds and scripts.
OpenBoneDocument doc = DocumentLoader.load(Gdx.files.internal("knight/knight.obone").readBytes());OpenBoneInstance inst = new OpenBoneInstance(doc, new QuickJsScriptHost());inst.useStateMachine(null);DocumentTextures textures = new DocumentTextures(doc, Gdx.files.internal("knight"));OpenBoneRenderer renderer = new OpenBoneRenderer();OpenBoneAudio audio = new OpenBoneAudio(doc, Gdx.files.internal("knight"));inst.addListener(audio);
// render():inst.advance(Gdx.graphics.getDeltaTime());audio.update(Gdx.graphics.getDeltaTime());renderer.draw(inst, textures, camera.combined); // camera in skeleton space (y up)Clipping masks need a stencil buffer: config.setBackBufferConfig(8, 8, 8, 8, 16, 8, 0) on LWJGL3.
Reference: Java, libGDX and Android runtime
OpenBone is MIT licensed and made by UXCentury. The example art, voices and sounds are credited in the repository.