mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Updated wind arrow 3D model
#story[1276]
This commit is contained in:
@@ -2,7 +2,11 @@ package seng302.visualiser.controllers.cells;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.Group;
|
||||
import javafx.scene.PerspectiveCamera;
|
||||
import javafx.scene.layout.Pane;
|
||||
import seng302.visualiser.cameras.ChaseCamera;
|
||||
import seng302.visualiser.cameras.IsometricCamera;
|
||||
import seng302.visualiser.cameras.TopDownCamera;
|
||||
import seng302.visualiser.fxObjects.assets_3D.Model;
|
||||
import seng302.visualiser.fxObjects.assets_3D.ModelFactory;
|
||||
|
||||
@@ -13,6 +17,15 @@ public class WindCell {
|
||||
private Pane windPane;
|
||||
//---------FXML END---------//
|
||||
|
||||
private final double FOV = 60;
|
||||
private final double DEFAULT_CAMERA_X = 0;
|
||||
private final double DEFAULT_CAMERA_Y = 155;
|
||||
|
||||
// Cameras
|
||||
private PerspectiveCamera isometricCam;
|
||||
private PerspectiveCamera topDownCam;
|
||||
private PerspectiveCamera chaseCam;
|
||||
|
||||
/**
|
||||
* Initialise WindCell fxml and load 3D wind arrow into a group.
|
||||
*/
|
||||
@@ -21,5 +34,11 @@ public class WindCell {
|
||||
windPane.getChildren().add(group);
|
||||
Model windArrowModel = ModelFactory.makeWindArrow();
|
||||
group.getChildren().add(windArrowModel.getAssets());
|
||||
|
||||
isometricCam = new IsometricCamera(DEFAULT_CAMERA_X, DEFAULT_CAMERA_Y);
|
||||
topDownCam = new TopDownCamera();
|
||||
chaseCam = new ChaseCamera();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -285,8 +285,8 @@ public class ModelFactory {
|
||||
|
||||
Rotate animationRotate = new Rotate(0, new Point3D(0, 1, 0));
|
||||
assets.getTransforms().addAll(
|
||||
new Scale(6, 6, 6),
|
||||
new Translate(7, 10, 0),
|
||||
new Translate(55, 60, 0),
|
||||
new Scale(5, 5, 5),
|
||||
animationRotate
|
||||
);
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ public enum ModelType {
|
||||
PLAIN_ARROW ("arrow.dae"),
|
||||
START_ARROW ("start_arrow.dae"),
|
||||
FINISH_ARROW("finish_arrow.dae"),
|
||||
WIND_ARROW("windFiles/log_arrow.dae");
|
||||
WIND_ARROW("windFiles/arrow56.dae"); // change filename
|
||||
|
||||
final String filename;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user