Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AnimationUtils: Define numTracks using referenceClip rather than targ… #20410

Merged
merged 1 commit into from
Sep 25, 2020

Conversation

c-morten
Copy link

Related issues:

#20409

Description

If using different clips for the targetClip and referenceClip parameters, an error will be thrown if the referenceClip has fewer tracks than the targetClip. This is happening because numTracks is defined using the number of tracks from the targetClip rather than the referenceClip so when looping using numTracks referenceTrack isn't necessarily always defined. Changing to const numTracks = referenceClip.tracks.length; fixes the issue.

@mrdoob
Copy link
Owner

mrdoob commented Sep 25, 2020

Good catch! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants