Returned rotation to boat in lobby
#story[1196]
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package visualiser.Controllers;
|
||||
|
||||
import com.interactivemesh.jfx.importer.stl.StlMeshImporter;
|
||||
import javafx.animation.AnimationTimer;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.fxml.FXML;
|
||||
@@ -74,13 +75,23 @@ public class HostController extends Controller {
|
||||
StlMeshImporter importer = new StlMeshImporter();
|
||||
importer.read(asset);
|
||||
MeshView mesh = new MeshView(importer.getImport());
|
||||
mesh.getTransforms().add(new Rotate(-90, Rotate.X_AXIS));
|
||||
shapes.add(mesh);
|
||||
|
||||
view3D.setPivot(mesh);
|
||||
view3D.setDistance(50);
|
||||
view3D.setYaw(45);
|
||||
view3D.setPitch(20);
|
||||
|
||||
Rotate rotation = new Rotate(0, Rotate.Y_AXIS);
|
||||
mesh.getTransforms().addAll(rotation, new Rotate(-90, Rotate.X_AXIS));
|
||||
|
||||
AnimationTimer rotate = new AnimationTimer() {
|
||||
@Override
|
||||
public void handle(long now) {
|
||||
rotation.setAngle(rotation.getAngle() + 0.1);
|
||||
}
|
||||
};
|
||||
rotate.start();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user