mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Fixed position issues on first 2 mark arrows.
#implement #story[1266]
This commit is contained in:
@@ -6,7 +6,6 @@ import javafx.scene.paint.Color;
|
||||
import javafx.scene.paint.Paint;
|
||||
import javafx.scene.shape.Arc;
|
||||
import javafx.scene.shape.ArcType;
|
||||
import javafx.scene.shape.Circle;
|
||||
import javafx.scene.shape.Polygon;
|
||||
import javafx.scene.shape.Polyline;
|
||||
import javafx.scene.shape.StrokeLineCap;
|
||||
@@ -39,11 +38,12 @@ public class MarkArrowFactory {
|
||||
public static Model constructEntryArrow3D (
|
||||
RoundingSide roundingSide, double angle, ModelType type) {
|
||||
Model entryArrow = ModelFactory.importModel(type);
|
||||
angle = Math.toRadians(angle);
|
||||
int multiplier = roundingSide == RoundingSide.STARBOARD ? 1 : -1;
|
||||
double relativeX = multiplier * 5 * Math.sin(angle + Math.PI / 2);
|
||||
double relativeY = multiplier * 5 * Math.cos(angle + Math.PI / 2);
|
||||
double xStart = relativeX + multiplier * 20 * Math.sin(angle + Math.PI / 2);
|
||||
double yStart = relativeY + multiplier * 20 * Math.cos(angle + Math.PI / 2);
|
||||
double relativeX = multiplier * 10 * Math.sin(angle + Math.PI / 8);
|
||||
double relativeY = multiplier * 10 * Math.cos(angle + Math.PI / 8);
|
||||
double xStart = relativeX + multiplier * 10 * Math.sin(angle - Math.PI / 2);
|
||||
double yStart = relativeY + multiplier * 10 * Math.cos(angle - Math.PI / 2);
|
||||
entryArrow.getAssets().getTransforms().addAll(
|
||||
new Translate(xStart, yStart, 0),
|
||||
new Rotate(Math.toDegrees(angle), new Point3D(0,0,1))
|
||||
@@ -54,18 +54,15 @@ public class MarkArrowFactory {
|
||||
public static Model constructExitArrow3D (
|
||||
RoundingSide roundingSide, double angle, ModelType type) {
|
||||
Model exitArrow = ModelFactory.importModel(type);
|
||||
// angle = Math.toRadians(angle-65);
|
||||
angle = Math.toRadians(angle);
|
||||
int multiplier = roundingSide == RoundingSide.STARBOARD ? 1 : -1;
|
||||
double xStart = multiplier * 6 * Math.sin(angle + Math.PI / 2);
|
||||
double yStart = multiplier * 6 * Math.cos(angle + Math.PI / 2);
|
||||
// exitArrow.getAssets().getTransforms().addAll(
|
||||
// new Translate(xStart, yStart, 0),
|
||||
// new Rotate(Math.toDegrees(Math.toDegrees(angle)), new Point3D(0,0,1))
|
||||
// );
|
||||
Circle c = new Circle(xStart, yStart, 1, Color.RED);
|
||||
c.setStroke(Color.TRANSPARENT);
|
||||
return new Model(new Group(c), null);
|
||||
double xStart = multiplier * 6 * Math.sin(angle + Math.PI / 8);
|
||||
double yStart = multiplier * 6 * Math.cos(angle + Math.PI / 8);
|
||||
exitArrow.getAssets().getTransforms().addAll(
|
||||
new Translate(xStart, yStart, 0),
|
||||
new Rotate(Math.toDegrees(angle), new Point3D(0,0,1))
|
||||
);
|
||||
return exitArrow;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user