diff options
author | Omni <omniscient.oce@gmail.com> | 2024-08-17 17:17:27 +1000 |
---|---|---|
committer | Omni <omniscient.oce@gmail.com> | 2024-08-17 17:17:27 +1000 |
commit | 10a97636c5a0234ca776097bae4be25dcf3c050e (patch) | |
tree | c65d5827ef3e228c35881df21fadc4d1e7d60a65 /src/animation.c | |
parent | eadfaaa86c29c36dd5ef5d0b6b6fa27af0cdb8b3 (diff) |
chore: format
Diffstat (limited to 'src/animation.c')
-rw-r--r-- | src/animation.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/animation.c b/src/animation.c index 274602c..d7973dc 100644 --- a/src/animation.c +++ b/src/animation.c @@ -47,23 +47,23 @@ Keyframe Animation_Sample(AnimationSampler* sampler, f32 t) { } void Animation_Tick(AnimationClip* clip, Armature* armature, f32 time) { - TRACE("Ticking animation %s", clip->clip_name); + TRACE("Ticking animation %s", clip->clip_name); - for (u32 c_i = 0; c_i < clip->channels->len; c_i++) { - AnimationSampler* sampler = clip->channels->data; + for (u32 c_i = 0; c_i < clip->channels->len; c_i++) { + AnimationSampler* sampler = clip->channels->data; - // Interpolated keyframe based on time - Keyframe k = Animation_Sample(sampler, time); + // Interpolated keyframe based on time + Keyframe k = Animation_Sample(sampler, time); - // Get the joint in the armature - Joint* joint = &armature->joints->data[sampler->target_joint_idx]; - if (sampler->animation.values.kind == KEYFRAME_ROTATION) { - // Update the joints rotation - joint->transform_components.rotation = k.rotation; - } else { - WARN("not yet implemented animation kind"); - } + // Get the joint in the armature + Joint* joint = &armature->joints->data[sampler->target_joint_idx]; + if (sampler->animation.values.kind == KEYFRAME_ROTATION) { + // Update the joints rotation + joint->transform_components.rotation = k.rotation; + } else { + WARN("not yet implemented animation kind"); } + } } void Animation_VisualiseJoints(Armature* armature) { |