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

Hanimate: AnimTree frame interval issue #5

Open
Sunrisepeak opened this issue Sep 1, 2023 · 0 comments
Open

Hanimate: AnimTree frame interval issue #5

Sunrisepeak opened this issue Sep 1, 2023 · 0 comments

Comments

@Sunrisepeak
Copy link
Owner

struct InsertAnim : public hanim::ComposeAnim {
    InsertAnim(float y, float offset, int frameNumbers = 60) {
        // 1 : 1 : 1 : 1
        int subF = frameNumbers / 4;
        hanim::ComposeAnim::move(-1, 0, -1, y / 2)
            .setFrameNums(subF);
        setFrameTrackIndex(0);

        hanim::ComposeAnim::move(0, -1, offset, -1)
            .setFrameNums(subF);
        setFrameTrackIndex(subF);

        hanim::ComposeAnim::scale(0, 1) // link anim
            .setFrameNums(subF);
        setFrameTrackIndex(2 * subF);

        hanim::ComposeAnim::move(-1, y / 2 + 1, -1, y)
            .setFrameNums(50);
        setFrameTrackIndex(3 * subF); // TODO/Bug: check finished status

        setFrameNums(frameNumbers);
    }
};
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

No branches or pull requests

1 participant