Compare commits
No commits in common. "987270e073d94b55a507b0e143dc06fd31b18f95" and "ad14e4e51f031a3aeced300aeca41a0f1e380813" have entirely different histories.
987270e073
...
ad14e4e51f
|
@ -1740,10 +1740,7 @@ function moveAsLowLevelMoves({ move, nextMove, startingPos, numProgessions }: {
|
|||
beats: move.beats - 4,
|
||||
endPosition: endingPos,
|
||||
// TODO Is bend the line just linear?
|
||||
movementPattern: {
|
||||
kind: SemanticAnimationKind.Linear,
|
||||
minRotation: startingPos.which.isLeft() ? -1 : +1
|
||||
},
|
||||
movementPattern: { kind: SemanticAnimationKind.Linear },
|
||||
}], startingPos);
|
||||
});
|
||||
|
||||
|
@ -1861,14 +1858,12 @@ function moveAsLowLevelMoves({ move, nextMove, startingPos, numProgessions }: {
|
|||
}
|
||||
|
||||
case "pass through":
|
||||
if (move.parameters.dir === "left diagonal" || move.parameters.dir === "right diagonal") {
|
||||
// TODO There's logic for this below, but unsure it's right.
|
||||
throw new Error(move.move + " with dir of " + move.parameters.dir + " is unsupported.");
|
||||
if (move.parameters.dir !== "along") {
|
||||
throw new Error("Unsupported pass through direction: " + move.parameters.dir);
|
||||
}
|
||||
const alongSet = move.parameters.dir === "along";
|
||||
const passShoulder = move.parameters.shoulder ? Hand.Right : Hand.Left;
|
||||
return handleMove(({ startPos }) => {
|
||||
if (alongSet && startPos.kind === PositionKind.Circle) {
|
||||
if (startPos.kind === PositionKind.Circle) {
|
||||
const facing = startPos.which.facingUpOrDown();
|
||||
const endPos: SemanticPosition = {
|
||||
kind: PositionKind.Circle,
|
||||
|
@ -1890,31 +1885,7 @@ function moveAsLowLevelMoves({ move, nextMove, startingPos, numProgessions }: {
|
|||
otherPath: "Swap",
|
||||
},
|
||||
}], startPos);
|
||||
} else if (!alongSet && startPos.kind === PositionKind.Circle) {
|
||||
const facing = startPos.which.facingAcross();
|
||||
const endPos: SemanticPosition = {
|
||||
kind: PositionKind.Circle,
|
||||
which: startPos.which.swapAcross(),
|
||||
facing,
|
||||
setOffset: (startPos.setOffset ?? 0) + (move.parameters.dir === "across"
|
||||
? 0
|
||||
: (move.parameters.dir === "left diagonal") === startPos.which.isLeft() ? -1 : +1),
|
||||
lineOffset: startPos.lineOffset,
|
||||
};
|
||||
|
||||
return combine([{
|
||||
beats: move.beats,
|
||||
endPosition: endPos,
|
||||
movementPattern: {
|
||||
kind: SemanticAnimationKind.PassBy,
|
||||
around: startPos.which.topBottomSide(),
|
||||
side: passShoulder,
|
||||
withHands: false,
|
||||
facing: "Forward",
|
||||
otherPath: "Swap",
|
||||
},
|
||||
}], startPos);
|
||||
} else if (alongSet && startPos.kind === PositionKind.ShortLines) {
|
||||
} else {
|
||||
// TODO This assumes short *wavy* lines.
|
||||
|
||||
const endPos: SemanticPosition = {
|
||||
|
@ -1930,8 +1901,6 @@ function moveAsLowLevelMoves({ move, nextMove, startingPos, numProgessions }: {
|
|||
endPosition: endPos,
|
||||
movementPattern: { kind: SemanticAnimationKind.Linear },
|
||||
}], startPos);
|
||||
} else {
|
||||
throw new Error(move.move + " with dir of " + move.parameters.dir + " starting from " + startPos.kind + " is unsupported.");
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -763,7 +763,6 @@ function animateLowLevelMoveWithoutSlide(move: LowLevelMove): animation.Animatio
|
|||
const twirlCenter =
|
||||
CenterOf(move.movementPattern.around, move.startPosition.setOffset, move.startPosition.lineOffset);
|
||||
const aroundTopOrBottom = move.movementPattern.around === CircleSide.Top || move.movementPattern.around === CircleSide.Bottom;
|
||||
const inShortLines = move.startPosition.kind === PositionKind.ShortLines;
|
||||
return [
|
||||
new animation.TransitionAnimationSegment({
|
||||
actualAnimation: new animation.RotationAnimationSegment({
|
||||
|
@ -780,7 +779,7 @@ function animateLowLevelMoveWithoutSlide(move: LowLevelMove): animation.Animatio
|
|||
around: {
|
||||
center: twirlCenter,
|
||||
width: aroundTopOrBottom ? setWidth : setWidth / 4,
|
||||
height: aroundTopOrBottom || inShortLines ? setHeight / 4 : setHeight,
|
||||
height: aroundTopOrBottom ? setHeight / 4 : setHeight,
|
||||
},
|
||||
facing: animation.RotationAnimationFacing.Linear,
|
||||
hands: new Map<Hand, animation.HandAnimation>([
|
||||
|
|
Loading…
Reference in New Issue
Block a user