Track the movement of all tokens that are moved simultaneously in one batch (huge performance bump if many tokens are moved)

This commit is contained in:
Manuel Vögele
2021-04-29 00:03:05 +02:00
parent f0d1ef9d48
commit f0ef109658
3 changed files with 21 additions and 11 deletions
+1 -1
View File
@@ -64,8 +64,8 @@ async function animateTokens(tokens, draggedToken, draggedRays, wasPaused) {
return {token, rays: offsetRays, dx, dy};
});
trackRays(tokenAnimationData.map(({token}) => token), tokenAnimationData.map(({rays}) => rays));
for (const {token, rays} of tokenAnimationData) {
trackRays(token, rays);
token._noAnimate = true;
}
for (let i = 0;i < tokenAnimationData[0].rays.length; i++) {