Skip to content

Commit

Permalink
木琴を動かす、スケーリングをする実装を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
takk committed Mar 16, 2019
1 parent 8a6dd12 commit e5cfd80
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ class Cam extends Group {
rectangleGroup.setScaleX(2.5);
rectangleGroup.setScaleY(2.5);
rectangleGroup.setScaleZ(2.5);
//cam.getChildren().add(rectangleGroup);
cam.getChildren().add(rectangleGroup);

frameCam(stage, scene);

Expand Down Expand Up @@ -299,7 +299,11 @@ else if (me.isAltDown() && me.isMiddleButtonDown()) {
double ty = cam.t.getY();
cam.t.setX(tx + mouseDeltaX);
cam.t.setY(ty + mouseDeltaY);
}
} else if (me.isAltDown() && me.isSecondaryButtonDown()) {
double scale = cam.s.getX();
double newScale = scale + mouseDeltaX*0.01;
cam.s.setX(newScale); cam.s.setY(newScale); cam.s.setZ(newScale);
}
}
});
scene.setOnKeyPressed(new EventHandler<KeyEvent>() {
Expand Down

0 comments on commit e5cfd80

Please sign in to comment.