Question: JavaFX supports lighting and camera effects. The classes for these are AmbientLight, PointLight, ParallelCamera and PerspectiveCamera (package javafx.scene). Investigate each of these classes, then modify
JavaFX supports lighting and camera effects. The classes for these are AmbientLight, PointLight, ParallelCamera and PerspectiveCamera (package javafx.scene). Investigate each of these classes, then modify Exercise 22.10 to incorporate these capabilities. Provide a GUI that enables the user to control where the lights and cameras are located in the scene and which are active at a given time.
Exercise 22.10
Using the techniques create an app that continuously displays Boxes, Cylinders and Spheres on a Pane with random sizes, locations and diffuse colors. For each three-dimensional shape, create an AnimationTimer that moves and rotates the shape around. For bounds-testing purposes assume the depth of the z-axis is 400 pixels. As the shape moves along the z-axis it should shrink when moving away from the user and grow when moving towards the user.
Step by Step Solution
3.40 Rating (150 Votes )
There are 3 Steps involved in it
this code provides a basic structure for your JavaFX application Youll need to fill in the details b... View full answer
Get step-by-step solutions from verified subject matter experts
