Commit 34668d6b authored by Lázár Bence Kis's avatar Lázár Bence Kis
Browse files

Cleanup

parent 185075a8
Loading
Loading
Loading
Loading
Compare 392e8edd to 018d0f18
Original line number Diff line number Diff line
Subproject commit 392e8edd6f35b6fcd8e41b6f905e22589015206d
Subproject commit 018d0f187b0ffecd00dfe321aab869c21d45f930
+2 −1
Original line number Diff line number Diff line
@@ -122,6 +122,7 @@ void renderAnimationTrackCurve(const anim::AnimationTrack* animation, const vec3
        values.push_back(std::get<scalar>(animation->get_value(t)));
    }
    
    ImPlot::SetNextLineStyle(plotColor, 2.0f);
    ImPlot::PlotLine("##curve", times.data(), values.data(), numSamples);
}

@@ -272,7 +273,7 @@ void render() {

    ImGui::SameLine();
    if (ImGui::Button("Jump")) {
        edited_track->set_keyframe_time(segment, 3.f);
        edited_track->insert_keyframe({3._s, 7._s, -2._s});
    }
    
    ImGui::PushItemWidth(100);
+14 −14
Original line number Diff line number Diff line
@@ -687,11 +687,11 @@ void Presenter::next_round()
    // }
    
    {
        static auto root_frame = root()->locate<com::Frame>({"gltf_box", "frame"});
        // static auto root_frame = root()->locate<com::Frame>({"gltf_box", "frame"});

        static auto root_bone = root()->locate<com::Frame>({"gltf_box", "Armature", "Bone.Root", "frame"});
        static auto bone_1 = root()->locate<com::Frame>({"gltf_box", "Armature", "Bone.Root", "Bone.L", "frame"});
        static auto bone_2 = root()->locate<com::Frame>({"gltf_box", "Armature", "Bone.Root", "Bone.R", "frame"});
        // static auto root_bone = root()->locate<com::Frame>({"gltf_box", "Armature", "Bone.Root", "frame"});
        // static auto bone_1 = root()->locate<com::Frame>({"gltf_box", "Armature", "Bone.Root", "Bone.L", "frame"});
        // static auto bone_2 = root()->locate<com::Frame>({"gltf_box", "Armature", "Bone.Root", "Bone.R", "frame"});

        // static auto root_in = root_bone->in() * root_frame->out();
        // static auto bone_1_in = bone_1->in() * root_frame->out();
@@ -718,17 +718,17 @@ void Presenter::next_round()
        //     calc_2
        // });
        
        auto root_pos = vec3{/* root_frame->out() *  */vec4{root_bone->position_in_world_space(), 1.0}};
        auto bone_1_pos = vec3{/* root_frame->out() *  */vec4{bone_1->position_in_world_space(), 1.0}};
        auto bone_2_pos = vec3{/* root_frame->out() *  */vec4{bone_2->position_in_world_space(), 1.0}};
        // auto root_pos = vec3{/* root_frame->out() *  */vec4{root_bone->position_in_world_space(), 1.0}};
        // auto bone_1_pos = vec3{/* root_frame->out() *  */vec4{bone_1->position_in_world_space(), 1.0}};
        // auto bone_2_pos = vec3{/* root_frame->out() *  */vec4{bone_2->position_in_world_space(), 1.0}};
        
        auto const bone_buffer = gfx::buffer_system()->buffers()->locate<gfx::Buffer>({"maker", "bone_buffer"});
        bone_buffer->erase_positions();
        bone_buffer->insert_positions({
            root_pos,
            bone_1_pos,
            bone_2_pos
        });
        // auto const bone_buffer = gfx::buffer_system()->buffers()->locate<gfx::Buffer>({"maker", "bone_buffer"});
        // bone_buffer->erase_positions();
        // bone_buffer->insert_positions({
        //     root_pos,
        //     bone_1_pos,
        //     bone_2_pos
        // });
    }
    
    {