Loading src/main/java/org/example/newmat/GraphicsAndWindowsTest.java +14 −3 Original line number Diff line number Diff line Loading @@ -89,18 +89,29 @@ public class GraphicsAndWindowsTest extends Application { //objects[3] = newObject4; Box floor = new Box(100000, 10, 100000); floor.setTranslateY(255); floor.setTranslateZ(250); floor.setMaterial(new PhongMaterial(Color.LIGHTGREEN)); Group group3D = new Group(); // Group of our 3D elements group3D.getChildren().add(floor); obs.addToGroup(group3D); for (MovingObject o : objects ) { o.setTranslate(sceneWindow.getXOffset(), sceneWindow.getYOffset(),0); group3D.getChildren().add(o.getMesh()); } PointLight lightSource = new PointLight(Color.GRAY); lightSource.setTranslateY(-300); lightSource.setTranslateZ(250); group3D.setTranslateX(windowXOffset); group3D.setTranslateY(windowYOffset); group3D.setTranslateZ(250); group3D.getChildren().add(ourWindow); group3D.getChildren().add(new AmbientLight(Color.WHITE)); group3D.getChildren().add(new AmbientLight(Color.GRAY)); group3D.getChildren().add(lightSource); slingLine = new Line(0,0,0,0); Loading Loading @@ -148,8 +159,8 @@ public class GraphicsAndWindowsTest extends Application { * SubScene to handle 3D components * Makes it easier to have 2D and 3D components in the same animation */ SubScene subScene3D = new SubScene(group3D, 1500, 800); subScene3D.setFill(Color.SILVER); SubScene subScene3D = new SubScene(group3D, 1500, 800, true, SceneAntialiasing.BALANCED); subScene3D.setFill(Color.LIGHTBLUE); subScene3D.setCamera(camera); Loading target/classes/org/example/newmat/GraphicsAndWindowsTest$1.class (5.37 KiB) File changed.No diff preview for this file type. View original file View changed file target/classes/org/example/newmat/GraphicsAndWindowsTest$2.class 0 → 100644 +830 B File added.No diff preview for this file type. View file target/classes/org/example/newmat/GraphicsAndWindowsTest.class 0 → 100644 +9.47 KiB File added.No diff preview for this file type. View file Loading
src/main/java/org/example/newmat/GraphicsAndWindowsTest.java +14 −3 Original line number Diff line number Diff line Loading @@ -89,18 +89,29 @@ public class GraphicsAndWindowsTest extends Application { //objects[3] = newObject4; Box floor = new Box(100000, 10, 100000); floor.setTranslateY(255); floor.setTranslateZ(250); floor.setMaterial(new PhongMaterial(Color.LIGHTGREEN)); Group group3D = new Group(); // Group of our 3D elements group3D.getChildren().add(floor); obs.addToGroup(group3D); for (MovingObject o : objects ) { o.setTranslate(sceneWindow.getXOffset(), sceneWindow.getYOffset(),0); group3D.getChildren().add(o.getMesh()); } PointLight lightSource = new PointLight(Color.GRAY); lightSource.setTranslateY(-300); lightSource.setTranslateZ(250); group3D.setTranslateX(windowXOffset); group3D.setTranslateY(windowYOffset); group3D.setTranslateZ(250); group3D.getChildren().add(ourWindow); group3D.getChildren().add(new AmbientLight(Color.WHITE)); group3D.getChildren().add(new AmbientLight(Color.GRAY)); group3D.getChildren().add(lightSource); slingLine = new Line(0,0,0,0); Loading Loading @@ -148,8 +159,8 @@ public class GraphicsAndWindowsTest extends Application { * SubScene to handle 3D components * Makes it easier to have 2D and 3D components in the same animation */ SubScene subScene3D = new SubScene(group3D, 1500, 800); subScene3D.setFill(Color.SILVER); SubScene subScene3D = new SubScene(group3D, 1500, 800, true, SceneAntialiasing.BALANCED); subScene3D.setFill(Color.LIGHTBLUE); subScene3D.setCamera(camera); Loading
target/classes/org/example/newmat/GraphicsAndWindowsTest$1.class (5.37 KiB) File changed.No diff preview for this file type. View original file View changed file
target/classes/org/example/newmat/GraphicsAndWindowsTest$2.class 0 → 100644 +830 B File added.No diff preview for this file type. View file
target/classes/org/example/newmat/GraphicsAndWindowsTest.class 0 → 100644 +9.47 KiB File added.No diff preview for this file type. View file