Visualiser model thread was updating GUI instead of fx thread.
This commit is contained in:
@@ -331,8 +331,8 @@ public class RaceViewController extends Controller {
|
||||
|
||||
viewSubjects.add(shockwave);
|
||||
|
||||
boat.legProperty().addListener((o, prev, curr) -> swapColours(curr));
|
||||
boat.hasCollidedProperty().addListener((o, prev, curr) -> showCollision(boat, shockwave));
|
||||
boat.legProperty().addListener((o, prev, curr) -> Platform.runLater(() -> swapColours(curr)));
|
||||
boat.hasCollidedProperty().addListener((o, prev, curr) -> Platform.runLater(() -> showCollision(boat, shockwave)));
|
||||
}
|
||||
// Fix initial bird's-eye position
|
||||
view3D.updatePivot(new Translate(250, 0, 210));
|
||||
@@ -741,4 +741,4 @@ public class RaceViewController extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user