benikabocha / saba

OpenGL Viewer (OBJ PMD PMX)
MIT License
442 stars 60 forks source link

how it can support loop animation? #12

Closed ghost closed 5 years ago

ghost commented 5 years ago

i try to modify vmdAnimation.cpp to check if the animation has ended,and then replay it...but the key frame at the last index seems not the end of the animation.....can you give me a example or ....release a new version.thanks. : - )

ghost commented 5 years ago

ok,i succeed to solve this problem. i calculate animation's end of time ,if loop==true,use t mod endtime .

ghost commented 5 years ago

but why you use binary_search to find the next key frame not to use a value to store it? when update ,it's a waste of resource..

benikabocha commented 5 years ago

I considered the possibility of jumping to any frame. I will improve VMDAnimation.