Skip to content

create immediate mode animation for tsoding#5

Open
ratchetfreak wants to merge 1 commit intotsoding:mainfrom
ratchetfreak:imanim
Open

create immediate mode animation for tsoding#5
ratchetfreak wants to merge 1 commit intotsoding:mainfrom
ratchetfreak:imanim

Conversation

@ratchetfreak
Copy link

this time a more compact pull request.

The core logic is that the Anim struct holds 2 timestamps

  • currentTime which is the point at which the animation is in (incremented every frame with delta time)
  • clipStartTime which is the at the point in the linear code

the clipTime function then remaps current time from the interval [clipStartTime, clipStartTime+duration] and returns a value between 0 and 1 for use in interpolation.

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

Successfully merging this pull request may close these issues.

1 participant