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

Add animation group concept #3411

Closed
bghgary opened this issue Dec 18, 2017 · 4 comments
Closed

Add animation group concept #3411

bghgary opened this issue Dec 18, 2017 · 4 comments

Comments

@bghgary
Copy link
Contributor

bghgary commented Dec 18, 2017

See this issue for context: KhronosGroup/glTF#1179 (comment)

glTF (and engines like Unity3D) support the concept of grouping animation curves together into a single named animation object where each curve in the group can target different properties on different objects.

Also in related issue #3076, we want to expose UI to allow a user to select between glTF animations (which are these groups).

To support this, it would be ideal to introduce an animation group to Babylon that enables the user to add multiple BABYLON.Animation objects to it and expose the following functionality:

  • Play this group
  • Stop this group
  • Options for looping, etc. and clamping the curve on both ends if the curve does not include key frames for the entire time frame of the group.

For reference:

  • glTF animations = Unity3D animations = Babylon animation groups
  • glTF animation channels = Unity3D animation clips = BABYLON.Animation
@deltakosh
Copy link
Contributor

I will add a new object named AnimationGroup. It will be referenced by name at scene level and will provide the following API:

  • animations: BABYLON.Animation[]
  • name
  • start
  • stop
  • play/pause
  • normalize(lastKeyTime: number): it will align all animations on the same timeline by duplicating last animation key and creating a new one at lastKeyTime

@bghgary
Copy link
Contributor Author

bghgary commented Dec 18, 2017

normalize(lastKeyTime: number): it will align all animations on the same timeline by duplicating last animation key and creating a new one at lastKeyTime

Also need one at the beginning if necessary.

@deltakosh
Copy link
Contributor

ok so perhaps something like: normalize(beginTime: number, endTime: number)

@deltakosh
Copy link
Contributor

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants