Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
timhaywood committed Sep 14, 2021
1 parent df156e0 commit a6a7771
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -693,15 +693,18 @@ function getFunctions(time: number = thisLayer.time) {
const progress = keyedAnimation.map((dimension, index) =>
thisLayer.linear(
dimension,
keyOne.value[index],
keyTwo.value[index],
// We know these are vectors, since keyedAnimation
// is an array
(keyOne.value as Vector)[index],
(keyTwo.value as Vector)[index],
0,
1
)
) as Vector;

return valueStart.map(
(dimension, index) => dimension + valueDelta[index] * progress[index]
(dimension, index) =>
dimension + (valueDelta as Vector)[index] * progress[index]
);
}

Expand Down

0 comments on commit a6a7771

Please sign in to comment.