...
Code Segment
Defining Lights
Code Block |
---|
// Create point light and add it to the Scene
PointLight light = new PointLight();
light.setColor(Color.RED);
scene.getLights().add(light);
// Add light to scene graph (so it can move)
Group lightGroup = new Group();
lightGroup.getChildren().add(light);
root.getChildren().add(lightGroup);
// Rotate the light
light.rotate(45);
// Move the lightGroup (light moves with it)
lightGroup.setTranslateZ(-75);
|
XXXXXXXXXXx
Overview
Content Tools
ThemeBuilder