use of javafx.scene.AmbientLight in project FXyzLib by Birdasaur.
the class CubeWorld method init.
private void init() {
redMaterial.setDiffuseColor(Color.DARKRED);
redMaterial.setSpecularColor(Color.RED);
greenMaterial.setDiffuseColor(Color.DARKGREEN);
greenMaterial.setSpecularColor(Color.GREEN);
blueMaterial.setDiffuseColor(Color.DARKBLUE);
blueMaterial.setSpecularColor(Color.BLUE);
buildAxes(axesSize, axesThickness);
buildPanels(axesSize);
buildGrids(axesSize, gridLineSpacing);
buildEventHandlers();
//Holds ScatterPlot data
getChildren().add(cubeWorldChildren);
if (selfLightEnabled) {
AmbientLight light = new AmbientLight(Color.WHITE);
getChildren().add(light);
}
}
use of javafx.scene.AmbientLight in project Gargoyle by callakrsos.
the class Drag3DObject method loadCamera.
private void loadCamera(Scene scene) {
//initialize camera
camera = new PerspectiveCamera(true);
camera.setVerticalFieldOfView(RUN_JASON);
//setup camera transform for rotational support
cameraTransform.setTranslate(0, 0, 0);
cameraTransform.getChildren().add(camera);
camera.setNearClip(0.1);
camera.setFarClip(100000.0);
camera.setTranslateZ(-5000);
cameraTransform.ry.setAngle(0.0);
cameraTransform.rx.setAngle(-45.0);
//add a Point Light for better viewing of the grid coordinate system
PointLight light = new PointLight(Color.GAINSBORO);
cameraTransform.getChildren().add(light);
cameraTransform.getChildren().add(new AmbientLight(Color.WHITE));
light.setTranslateX(camera.getTranslateX());
light.setTranslateY(camera.getTranslateY());
light.setTranslateZ(camera.getTranslateZ());
//attach camera to scene
scene.setCamera(camera);
}
Aggregations