Over a million developers have joined DZone.

JavaFX Library for Inverse Kinematics 2.0

DZone 's Guide to

JavaFX Library for Inverse Kinematics 2.0

· Java Zone ·
Free Resource

Last week I had to stay sick at home for a couple of days. On the positive side, I finally found some time to look into my old library for inverse kinematics. I wrote it a couple of years ago for JavaFX 1.x. And I decided to port it to JavaFX 2. The initial version is ready for download.

Screenshot Caterpillar

Fig. 1: Screenshot Caterpillar

The original library was written in JavaFX Script and looking at the code created some cozy nostalgic feelings. :) What a beautiful language! Doing the port was pretty interesting, because even though Java and JavaFX Script had many similarities, some of the concepts were extremely different. Definitely it was a fun exercise.

An initial version is ready and can be used. I plan to add more features later, which means the API may change at some point. There is no documentation ready right now except for some basic comments in the source code. But I added two examples, which are probably a good starting point. JavaFX veterans might remember these samples, because they are direct ports from the samples of the first version of the library.

Screenshot Dummy

Fig. 2: Screenshot Dummy

First there is the Caterpillar Demo. You can click anywhere in the window and the caterpillar will move there. Only the head is actually animated directly, the rest of the body is moved automatically using inverse kinematics.

The second example is a little dummy figure. You can drag the parts of its body and the rest will follow.

I also found the text of a tutorial I had written. Rewriting it to match the new Java API should not be a problem, but unfortunately I could not find the images that belong to the tutorial yet. I keep searching! :)

And finally, the most important part: the link. You can find the sources of the library including the code of the two samples on GitHub. Sources of javafx-ik.



Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}