リビジョン 685d257b
| learn/java/javafx/Hello3d/Hello3d.java | ||
|---|---|---|
|
import javafx.application.Application;
|
||
|
import javafx.scene.AmbientLight;
|
||
|
import javafx.scene.Group;
|
||
|
import javafx.scene.PerspectiveCamera;
|
||
|
import javafx.scene.PointLight;
|
||
| ... | ... | |
|
pointLight.setTranslateZ(-250);
|
||
|
root.getChildren().add(pointLight);
|
||
|
|
||
|
// 環境光の定義
|
||
|
final AmbientLight ambientLight = new AmbientLight(Color.rgb(80, 80, 80, 0.5));
|
||
|
root.getChildren().add(ambientLight);
|
||
|
|
||
|
final Scene scene = new Scene(root, 800, 600, Color.BLACK);
|
||
|
scene.setCamera(camera);
|
||
|
|
||
環境光を設定