Merge branch 'master' of github.com:nmfisher/polyvox_filament
This commit is contained in:
@@ -198,6 +198,10 @@ extern "C" {
|
||||
((SceneAsset*)asset)->playAnimation(index, loop, reverse);
|
||||
}
|
||||
|
||||
void set_animation_frame(void* asset, int animationIndex, int animationFrame) {
|
||||
((SceneAsset*)asset)->setAnimationFrame(animationIndex, animationFrame);
|
||||
}
|
||||
|
||||
int get_animation_count(void* asset) {
|
||||
auto names = ((SceneAsset*)asset)->getAnimationNames();
|
||||
return names->size();
|
||||
|
||||
@@ -346,6 +346,12 @@ void SceneAsset::setTexture() {
|
||||
|
||||
}
|
||||
|
||||
void SceneAsset::setAnimationFrame(int animationIndex, int animationFrame) {
|
||||
auto offset = 60 * animationFrame * 1000; // TODO - don't hardcore 60fps framerate
|
||||
_animator->applyAnimation(animationIndex, offset);
|
||||
_animator->updateBoneMatrices();
|
||||
}
|
||||
|
||||
void SceneAsset::updateEmbeddedAnimations() {
|
||||
auto now = high_resolution_clock::now();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user