Added 3D assets for a trail and generated them at regular intervals.

#story[1266] #implement
This commit is contained in:
Calum
2017-09-11 17:16:13 +12:00
parent 878c0e0f43
commit dff261cf41
4 changed files with 72 additions and 6 deletions
@@ -111,6 +111,8 @@ public class ModelFactory {
return makeGate(assets);
case WAKE:
return makeWake(assets);
case TRAIL_SEGMENT:
return makeTrail(assets);
default:
return new Model(new Group(assets), null);
}
@@ -184,4 +186,11 @@ public class ModelFactory {
);
return new Model(new Group(assets), null);
}
private static Model makeTrail(Group trailPiece) {
trailPiece.getTransforms().addAll(
new Rotate(90, new Point3D(0,0,1))
);
return new Model(new Group(trailPiece), null);
}
}
@@ -17,7 +17,8 @@ public enum ModelType {
FINISH_LINE ("finish_line.dae"),
START_LINE ("start_line.dae"),
GATE_LINE ("gate_line.dae"),
WAKE ("wake.dae");
WAKE ("wake.dae"),
TRAIL_SEGMENT ("trail_segment.dae");
final String filename;