Although I am working on Android Development, I am still learning unity3d in my spare time. We also created an online tank combat game. At night, I only learned about iOS development on Mac Mini, so I didn't write a blog much.
Javafx was very interested in it before, but later I found that javafx is only suitable for developing small games. For larger games, it is not efficient enough. So I haven't studied javafx for a while.
But there is also good news about javafx. in JDK 8, javafx is about to support 3D. Including 3D mesh, camera, and lighting.
JDK 8: http://jdk8.java.net/download.html
Below is a small example:
Import javafx. application. application; import javafx. scene. *; import javafx. scene. paint. color; import javafx. scene. paint. phongmaterial; import javafx. scene. shape. *; import javafx. stage. stage; public class shapes3dviewer extends application {@ override public void start (stage) {phongmaterial material = new phongmaterial (); material. setdiffusecolor (color. lightgray); material. setspecularcolor (color. RGB (30, 30, 30); shape3d [] meshview = new shape3d [] {new box (200,200,200), new sphere (100), new cylinder (100,200 ),}; for (INT I = 0; I! = 3; ++ I) {meshview [I]. setmaterial (material); meshview [I]. settranslatex (I + 1) * 220); meshview [I]. settranslate( 500); meshview [I]. settranslatez (20); meshview [I]. setdrawmode (drawmode. fill); meshview [I]. setcullface (cullface. back) ;}; pointlight = new pointlight (color. antiquewhite); pointlight. settranslators (800); pointlight. settranslatey (-100); pointlight. settranslatez (-1000); group root = new group (meshview); root. getchildren (). add (pointlight); scene = new scene (root, 800,800, true); scene. setfill (color. RGB (10, 10, 40); scene. setcamera (New perspectivecamera (false); stage. setscene (scene); stage. show () ;}public static void main (string [] ARGs) {launch (ARGs );}}
However, currently, only Windows platforms are supported. OpenGL versions that can be used on other platforms are under development.
If you are interested, download JDK 8 and try it.
Add the javafx 3D content planned to be added to JDK 8:
Https://wikis.oracle.com/display/OpenJDK/3D+Features
You can see the camera, 3D geometric elements, lights, materials, 3D pickup, 3D model loading, and other content.