Compare commits

...

2 Commits

1 changed files with 14 additions and 2 deletions

View File

@ -827,8 +827,9 @@ function moveAsLowLevelMoves({ move, nextMove, startingPos, numProgessions }: {
case "revolving door":
const byHand = move.parameters.hand ? Hand.Right : Hand.Left;
// TODO More parts? Or define an animation kind?
const waitBeats = 2;
const carryBeats = move.beats / 2;
const returnBeats = move.beats - carryBeats;
const returnBeats = move.beats - carryBeats - waitBeats;
return handleCirclePairedMove(move.parameters.whom, ({ id, startPos }) => {
const isCarried = findPairOpposite(move.parameters.who, id) === null;
@ -836,6 +837,11 @@ function moveAsLowLevelMoves({ move, nextMove, startingPos, numProgessions }: {
if (isCarried) {
const endWhich = startPos.which.swapDiagonal();
return combine([
prevEnd => ({
beats: waitBeats,
endPosition: prevEnd,
movementPattern: { kind: SemanticAnimationKind.StandStill },
}),
{
beats: carryBeats,
endPosition: {
@ -855,7 +861,7 @@ function moveAsLowLevelMoves({ move, nextMove, startingPos, numProgessions }: {
beats: returnBeats,
endPosition: prevEnd,
movementPattern: { kind: SemanticAnimationKind.StandStill },
})
}),
], startPos);
} else {
return combine([
@ -1915,6 +1921,12 @@ function danceAsLowLevelMoves(moves: Move[], startingPos: Map<DancerIdentity, Se
if (!lowLevelMoves[i].endPosition) throw "endPosition is undefined";
lowLevelMoves[i].endPosition = lowLevelMoves[i + 1].startPosition;
if (!lowLevelMoves[i].endPosition) throw "endPosition is undefined now";
if (lowLevelMoves[i].movementPattern.kind === SemanticAnimationKind.StandStill) {
lowLevelMoves[i].startPosition = lowLevelMoves[i].endPosition;
if (i > 0) {
lowLevelMoves[i - 1].endPosition = lowLevelMoves[i].startPosition;
}
}
}
// If progression isn't detected properly, do nothing.
if (progressionInSets === 0) {