リビジョン 38b62b0a
| learn/java/javafx/Hello3d/Hello3d.java | ||
|---|---|---|
|
import javafx.application.Application;
|
||
|
import javafx.scene.Group;
|
||
|
import javafx.scene.PerspectiveCamera;
|
||
|
import javafx.scene.PointLight;
|
||
|
import javafx.scene.Scene;
|
||
|
import javafx.scene.paint.Color;
|
||
|
import javafx.scene.paint.PhongMaterial;
|
||
| ... | ... | |
|
new Translate(0, 0, -190)
|
||
|
);
|
||
|
|
||
|
// 点光源の定義
|
||
|
final PointLight pointLight = new PointLight(Color.WHITE);
|
||
|
pointLight.setTranslateX(240);
|
||
|
pointLight.setTranslateY(0);
|
||
|
pointLight.setTranslateZ(-250);
|
||
|
root.getChildren().add(pointLight);
|
||
|
|
||
|
final Scene scene = new Scene(root, 800, 600, Color.BLACK);
|
||
|
scene.setCamera(camera);
|
||
|
|
||
点光源(PointLight)の設定