3D Carousel

One of the more useful UI controls for TV applications is a carousel. There is no standard carousel control in JavaFX 1.3, but it is not very difficult to build one. In this post I am showing how to create a simple 3D image carousel.

This carousel uses PerspectiveTransform rather than true 3D nodes so it can be run with regular desktop toolkit as well as the 3D accelerated prism toolkit. PerspectiveTransform is not very efficient though so it will be not be very fast on a TV device. But it should not be hard to implement this using true 3D transforms which will run faster.

In this example the carousel is rotated using left-right keys or mouse. Mouse can also be used to change the camera view point. Up and down arrows change the layout of the carousel.

Some trigonometric calculations are needed to lay out and rotate the nodes correctly. It is also necessary to sort them in z order. Using Sequences.sort is a very straightforward way to do this.

Download the source code: Main.fx.

Comments:

I'm very under impress for this example !
Amazing !

I am totally in LOVE with JavaFx !

Posted by Pitiporn Kawmoon on April 15, 2011 at 08:10 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

user12608660

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today