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

Implementing getAt() functions #14

Open
Ballasi opened this issue Dec 29, 2021 · 2 comments
Open

Implementing getAt() functions #14

Ballasi opened this issue Dec 29, 2021 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@Ballasi
Copy link
Owner

Ballasi commented Dec 29, 2021

This feature would open for a lot of possibilities, especially for a custom-made design tab. This is probably one of the most interesting features of osb that I'd love to see work. I had some bare-bones done in storygen but it wasn't fully secure and there were edge cases that made it break. I'm sure using IntervalMaps would help.

@Ballasi Ballasi added the enhancement New feature or request label Dec 29, 2021
@DoomDuck
Copy link
Collaborator

Which getAt() function are you talking about ? And what would it do ?

@Ballasi
Copy link
Owner Author

Ballasi commented Jan 5, 2022

I think I quickly brought that to you when we talked about it, that's the whole reason of implementing IntervalMaps in the first place.
In the .osb format, there are many types of events, such as Move, Fade, Scale, ...
The getAt(timestamp) call of the Move events of a sprite will return the sprite's position value at a certain timestamp basically.
When we have IntervalMaps done, it's a matter of calling the interval maps's get, and doing an easing call if necessary (e.g. we have a fade from the timestamp 100ms and 300ms and we want to have its value at 200ms, we have to calculate the value at that precise moment), which this second part is already implemented.

@Ballasi Ballasi added this to the v1.0.0 milestone Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants