Spaces:
Sleeping
Sleeping
Refine RunRate Lab low shot trajectories
Browse files
app.py
CHANGED
|
@@ -2071,8 +2071,21 @@ GAME_HTML = r"""
|
|
| 2071 |
|
| 2072 |
function shotPathFor(runs) {
|
| 2073 |
const aim = rowBy(aims, "Aim", state.selectedAim);
|
| 2074 |
-
const
|
| 2075 |
const start = pitchPoint(0.89, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2076 |
const length = runs >= 6 ? height * 0.60 : runs === 4 ? height * 0.48 : height * 0.26;
|
| 2077 |
return {
|
| 2078 |
x0: start.x,
|
|
|
|
| 2071 |
|
| 2072 |
function shotPathFor(runs) {
|
| 2073 |
const aim = rowBy(aims, "Aim", state.selectedAim);
|
| 2074 |
+
const lane = Number(aim.Angle) / 45;
|
| 2075 |
const start = pitchPoint(0.89, 0);
|
| 2076 |
+
if (runs < 4) {
|
| 2077 |
+
const length = height * (runs >= 2 ? 0.24 : 0.18);
|
| 2078 |
+
return {
|
| 2079 |
+
x0: start.x,
|
| 2080 |
+
y0: start.y,
|
| 2081 |
+
cx: start.x + lane * length * 0.34,
|
| 2082 |
+
cy: start.y - length * 0.14,
|
| 2083 |
+
x1: start.x + lane * length * 0.72,
|
| 2084 |
+
y1: start.y - length * 0.20,
|
| 2085 |
+
runs
|
| 2086 |
+
};
|
| 2087 |
+
}
|
| 2088 |
+
const angle = (Number(aim.Angle) - 90 + (state.selectedShot === "Cut / Pull" ? 14 : 0)) * Math.PI / 180;
|
| 2089 |
const length = runs >= 6 ? height * 0.60 : runs === 4 ? height * 0.48 : height * 0.26;
|
| 2090 |
return {
|
| 2091 |
x0: start.x,
|