|
|
|
|
@ -268,8 +268,10 @@ public class View3D extends Pane {
|
|
|
|
|
public void updateDistance(double delta) {
|
|
|
|
|
double newDistance = -this.distance.getZ() + delta;
|
|
|
|
|
if (target.get() == null){
|
|
|
|
|
if (newDistance > MAX_ZOOM_LIMIT){
|
|
|
|
|
if (newDistance > MAX_ZOOM_LIMIT) {
|
|
|
|
|
setDistance(MAX_ZOOM_LIMIT);
|
|
|
|
|
} else if (newDistance <= ZOOM_IN_LIMIT) {
|
|
|
|
|
setDistance(ZOOM_IN_LIMIT);
|
|
|
|
|
} else {
|
|
|
|
|
setDistance(newDistance);
|
|
|
|
|
}
|
|
|
|
|
@ -372,4 +374,4 @@ public class View3D extends Pane {
|
|
|
|
|
public void addPointLight(PointLight pointLight) {
|
|
|
|
|
this.world.getChildren().add(pointLight);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|