Today I’d like to share with you my last try on radial menu. I decided to inspire from the Win 8 radial menu to create a color chooser menu, very simple for now. Here is the original video
It did not take long to create the simple color chooser menu. I wanted to use it with my new X-mas gift that is a LeapMotion. So I decided to create a drawing program for my kids. Here is the result for now :
The gesture part is the following :
- One finger pointed and the position along z axis is negative -> drawing
- One finger pointed and the position along z axis is positive -> moving cursor
- One finger pointed and the position along z axis transitioned from positive to negative value -> new drawing line
- One hand opened (at least 4 fingers) the color chooser menu is displayed
- One hand opened the hand position is used to move the cursor (and choose a color by going through one)
Some lesson learned when integrating the leap motion with Java(FX) :
- Do not rely on the LeapMotion threading model. It creates a NEW Thread to notify each frame and it did crash my JVM very often… I hope LeapMotion guys will offer update that change this performance problem
- Instead, Poll it at the rate you desire, using for example the ExecutorServices API and the created controller API. No crash anymore…
- Take care to perform the JavaFX update into the JavaFX Thread using Platform.runLater()
- You can use the AWT Robot to move the mouse
- Checking the gesture stability is not that easy. I hope LeapMotion guys will offer us update that includes new gesture support !
Code available very soon on github https://github.com/MrLoNee ! in project LeapDrawKidFX.