Pro Java 9 Games Development Leveraging the JavaFX APIs

(Michael S) #1

Chapter 13 ■ 3D MoDel ShaDer Creation: USing the JavaFX 9 phongMaterial ClaSS


Next, let’s take care of removing these (currently) unused pole and sphere primitives from your
gameBoard Group object, which will change our addAll() method call back into an add() method call. If you
forget to do this and try to select Run ➤ Project, it will not compile. The resulting Java statement, shown in
Figure 13-21, looks like this:


gameBoard.getChildren().add(box);


Now let’s go back into GIMP and add a layer to our texture map composite and create a game board
square.


Figure 13-20. Remove sphere and pole instantiations and configurations and change the box dimensions to
150, 5, 150


Figure 13-21. Remove the pole and sphere objects from your gameBoard.getChildren().addAll() method call
for now

Free download pdf