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

Fixed loading GLTF animations with 1 frame #3804

Merged
merged 1 commit into from
Feb 19, 2024
Merged

Conversation

BliznyukNM
Copy link
Contributor

When I was working on my 3D project I found an issue that single frame animations (like T-Pose) are not loaded. Upon investigating the reason I realised that frame count calculated based on animation length (which is 0 apparently).

Using some basic combinatorics I added 1 at the end of frame count calculations. It is easy to think of a veeeery small animation (like 0.01 second) which still has to have minimum 2 frames. Animations with 0 length should have at least 1.

Also fmax is preventing NaN division result when tend and tstart are both 0.

@raysan5 raysan5 merged commit 54e0af4 into raysan5:master Feb 19, 2024
@raysan5
Copy link
Owner

raysan5 commented Feb 19, 2024

@BliznyukNM Nice! Thanks for the review!

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.

2 participants