Skip to content
Snippets Groups Projects
Commit e806441a authored by MasterPyo's avatar MasterPyo
Browse files

fixmerge

parents 6a8daaf2 11120822
Branches
No related merge requests found
...@@ -23,7 +23,7 @@ public class Main extends Application { ...@@ -23,7 +23,7 @@ public class Main extends Application {
stage.setTitle("Chess3D - Tuna Acikbas & Olivier Pillods"); // title stage.setTitle("Chess3D - Tuna Acikbas & Olivier Pillods"); // title
// init - camera // init - camera
CustomCamera camera = new CustomCamera(1, 600, 70); // create a camera and some settings CustomCamera camera = new CustomCamera(1, 1000, 70); // create a camera and some settings
// init - scene, main container // init - scene, main container
Group group = new Group(); // will contain all the elements "to show" on scene Group group = new Group(); // will contain all the elements "to show" on scene
......
...@@ -77,7 +77,7 @@ public class CustomCamera { ...@@ -77,7 +77,7 @@ public class CustomCamera {
public void scrollCamera(double deltaY) { public void scrollCamera(double deltaY) {
double z = camera.getTranslateZ(); double z = camera.getTranslateZ();
if(deltaY > 0) { if(deltaY > 0) {
if(z < -100) if(z < 30)
camera.setTranslateZ(z + SCROLL_SPEED); camera.setTranslateZ(z + SCROLL_SPEED);
} }
else { else {
......
...@@ -9,7 +9,7 @@ import javafx.scene.paint.Color; ...@@ -9,7 +9,7 @@ import javafx.scene.paint.Color;
public class CustomScene { public class CustomScene {
private Scene scene; private Scene scene;
public CustomScene(Group group, PerspectiveCamera camera, SceneAntialiasing antialiasing) { public CustomScene(Group group, PerspectiveCamera camera, SceneAntialiasing antialiasing) {
scene = new Scene(group, 1, 1, true, antialiasing); // create scene scene = new Scene(group, 800, 500, true, antialiasing); // create scene
scene.setFill(Color.rgb(50, 50, 50)); // background default color scene.setFill(Color.rgb(50, 50, 50)); // background default color
scene.setCamera(camera); // link camera to scene scene.setCamera(camera); // link camera to scene
} }
......
No preview for this file type
File deleted
No preview for this file type
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment