Compare commits

..

2 Commits

View File

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