Jump to content
Search Community

Best practice for timeline

mkadirtan test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hello!

 

I'm creating a 3D application with BabylonJS. Users are able to create keyframes for object positions (Cube.position.x etc.), which in turn creates an animation. Time is controlled by using a slider. What would be the best practice, better approach for such an application?

 

Currently I'm using TimelineLite. It is a "tween" based system, and in practical use it would cause me problems. For example, if a user wants to change position of a keyframe, or create a new keyframe between other keyframes.. these kind of actions would cause troubles. I know these problems could be fixed, however I was wondering if there is a better approach for creating an animation system as such?

 

A good example of what I want to achieve is: https://nunustudio.org/editor/editor.html

Link to comment
Share on other sites

If it's a keyframe editor, I wouldn't worry about changing an animation in real-time. I would only (re)create the animations if there are changes when the user presses play. That way you only have to deal with manipulating data.

 

Basically, you would do this reverse of this. Create an animation from some data structure.

 

See the Pen 7d3275656ef955c5ea2eb121c2407ba6 by osublake (@osublake) on CodePen

 

 

 

  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...