mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Added ocean object
This commit is contained in:
@@ -6,13 +6,11 @@ import javafx.animation.AnimationTimer;
|
||||
import javafx.geometry.Point3D;
|
||||
import javafx.scene.AmbientLight;
|
||||
import javafx.scene.Group;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.scene.paint.PhongMaterial;
|
||||
import javafx.scene.shape.MeshView;
|
||||
import javafx.scene.transform.Rotate;
|
||||
import javafx.scene.transform.Scale;
|
||||
import seng302.model.token.TokenType;
|
||||
|
||||
/**
|
||||
* Factory class for creating 3D models of boats.
|
||||
@@ -89,6 +87,8 @@ public class ModelFactory {
|
||||
case PLAIN_MARKER:
|
||||
case START_MARKER:
|
||||
return makeMarker(assets);
|
||||
case OCEAN:
|
||||
return makeOcean(assets);
|
||||
default:
|
||||
return new Model(assets, null);
|
||||
}
|
||||
@@ -121,4 +121,10 @@ public class ModelFactory {
|
||||
area.getTransforms().add(new Rotate(90, new Point3D(1, 0, 0)));
|
||||
return new Model(area, null);
|
||||
}
|
||||
|
||||
private static Model makeOcean(Group plane) {
|
||||
plane.setScaleY(100);
|
||||
plane.setScaleX(100);
|
||||
return new Model(plane, null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,8 @@ public enum ModelType {
|
||||
FINISH_MARKER ("finish_marker.dae"),
|
||||
START_MARKER ("start_marker.dae"),
|
||||
PLAIN_MARKER ("plain_marker.dae"),
|
||||
MARK_AREA ("mark_area.dae");
|
||||
MARK_AREA ("mark_area.dae"),
|
||||
OCEAN ("ocean.dae");
|
||||
|
||||
final String filename;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user