Skybox no longer preloaded
This commit is contained in:
@@ -402,7 +402,7 @@ public class RaceViewController extends Controller {
|
||||
RaceDataSource raceData = visualiserRace.getVisualiserRaceState().getRaceDataSource();
|
||||
gpsConverter = new GPSConverter(raceData, 450, 450);
|
||||
|
||||
SkyBox skyBox = Assets3D.skyBox;
|
||||
SkyBox skyBox = new SkyBox(750, 200, 250, 0, 210);
|
||||
viewSubjects.addAll(skyBox.getSkyBoxPlanes());
|
||||
|
||||
// Set up sea surface
|
||||
|
||||
@@ -35,7 +35,7 @@ public class Assets3D {
|
||||
loadWindArrow();
|
||||
loadNextArrow();
|
||||
loadSeaSurface();
|
||||
loadSkybox();
|
||||
//loadSkybox();
|
||||
loadSeagull();
|
||||
loadBoatHightlight();
|
||||
}
|
||||
|
||||
@@ -45,8 +45,9 @@ public class SkyBox {
|
||||
}
|
||||
|
||||
private void addTop() {
|
||||
String imagePath = "images/skybox/ThickCloudsWaterUp2048.png";
|
||||
if (!App.dayMode) imagePath = "images/skybox/DarkStormyUp2048.png";
|
||||
String imagePath;
|
||||
if (App.dayMode) imagePath = "images/skybox/ThickCloudsWaterUp2048.png";
|
||||
else imagePath = "images/skybox/DarkStormyUp2048.png";
|
||||
MeshView surface = makeSurface(new Image(getClass().getClassLoader().getResourceAsStream(imagePath)), size);
|
||||
|
||||
surface.setRotationAxis(new Point3D(0, 0, 1));
|
||||
@@ -61,8 +62,9 @@ public class SkyBox {
|
||||
}
|
||||
|
||||
private void addRight() {
|
||||
String imagePath = "images/skybox/ThickCloudsWaterRight2048.png";
|
||||
if (!App.dayMode) imagePath = "images/skybox/DarkStormyRight2048.png";
|
||||
String imagePath;
|
||||
if (App.dayMode) imagePath = "images/skybox/ThickCloudsWaterRight2048.png";
|
||||
else imagePath = "images/skybox/DarkStormyRight2048.png";
|
||||
MeshView surface = makeSurface(new Image(getClass().getClassLoader().getResourceAsStream(imagePath)), size + 1);
|
||||
|
||||
surface.setTranslateX(size/2);
|
||||
@@ -82,8 +84,9 @@ public class SkyBox {
|
||||
}
|
||||
|
||||
private void addLeft() {
|
||||
String imagePath = "images/skybox/ThickCloudsWaterLeft2048.png";
|
||||
if (!App.dayMode) imagePath = "images/skybox/DarkStormyLeft2048.png";
|
||||
String imagePath;
|
||||
if (App.dayMode) imagePath = "images/skybox/ThickCloudsWaterLeft2048.png";
|
||||
else imagePath = "images/skybox/DarkStormyLeft2048.png";
|
||||
MeshView surface = makeSurface(new Image(getClass().getClassLoader().getResourceAsStream(imagePath)), size + 1);
|
||||
|
||||
surface.setTranslateX(size/2);
|
||||
@@ -106,8 +109,9 @@ public class SkyBox {
|
||||
}
|
||||
|
||||
private void addBack() {
|
||||
String imagePath = "images/skybox/ThickCloudsWaterBack2048.png";
|
||||
if (!App.dayMode) imagePath = "images/skybox/DarkStormyBack2048.png";
|
||||
String imagePath;
|
||||
if (App.dayMode) imagePath = "images/skybox/ThickCloudsWaterBack2048.png";
|
||||
else imagePath = "images/skybox/DarkStormyBack2048.png";
|
||||
MeshView surface = makeSurface(new Image(getClass().getClassLoader().getResourceAsStream(imagePath)), size);
|
||||
surface.getTransforms().add(new Rotate(90, 0, 0));
|
||||
|
||||
@@ -126,8 +130,9 @@ public class SkyBox {
|
||||
}
|
||||
|
||||
private void addFront() {
|
||||
String imagePath = "images/skybox/ThickCloudsWaterFront2048.png";
|
||||
if (!App.dayMode) imagePath = "images/skybox/DarkStormyFront2048.png";
|
||||
String imagePath;
|
||||
if (App.dayMode) imagePath = "images/skybox/ThickCloudsWaterFront2048.png";
|
||||
else imagePath = "images/skybox/DarkStormyFront2048.png";
|
||||
MeshView surface = makeSurface(new Image(getClass().getClassLoader().getResourceAsStream(imagePath)), size);
|
||||
surface.setTranslateX(size/2);
|
||||
surface.setTranslateY(size/2);
|
||||
|
||||
Reference in New Issue
Block a user