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
AnimationMixer AnimationClip, AnimationAction missing in doc #7875
Comments
Yes. Documentation for these classes is pending. |
Ok, thats fine Could you in the meantime tell me how to start and stop animations with The only resource I have is this example: http://threejs.org/examples/#webgl_animation_scene Which I've got working, it works great, but it loops. I need to control when the animation starts |
I'm afraid I know as much as you do at the moment. |
But the last commit of all the |
Yep. I haven't been able to study that part of the code yet. |
I could maybe write some documentation for it from analysing it. But from a brief glance, it does not contain any Where do I begin? |
/ping @bhouston |
I would also like some updated documentation on the matter. If you want to stop an animation action, then remove it from the mixer. If you want to play it, then call the mixer's Alternatively you could set the |
@dolanmiu The development branch contains a revised API with some inline documentation and revised examples. The
This answer seems to be about the By now the usage has become a lot more straightforward and you actually simply call |
@mrdoob |
@tschw yeah, hopefully I'll implement animation support in |
Docs would be SUPER helpful, I've been stuck at 72 for quite some time now (granted I love 72, so no worries). I have 74 kinda working but blending seems to be a little buggy in situations it didn't used to be before the new animation system. I could also be doing something wrong with this new api, without docs I'm not sure. I know it's a long shot but it would be awesome if there were some more advanced examples, such as; multiple meshes, multiple meshes of both shared and non-shared geometries, multiple meshes shared/non-shared with out of sync animations (trees all waving in sync looks terribly synthetic) and of course examples of these using blending. I have most of these working, but I'm not sure if I am doing so in the most optimized manner. It feels like I am creating a lot of redundant animation/mixer/clip objects. Could be a red herring but I noticed the "bugginess" I referred to while utilizing the oncomplete event. Example; On completion of an 'attack' animation the oncomplete event would then blend into the 'idle' animation. Previously I just modded the thee.js animation function to include a callback on 'stop', that worked perfectly for me. So.. that's things from my perspective. Got to say again, I love 72, I was able to convert all my objects into buffergeometry saving me TONS of memory. Awesome =] |
Example:
There's a flag to control what happens on stop.
Me too - was my debut as a contributor. |
The JSON loader, when loading a rig from Blender, exports mesh.geometry.animations an an array of PS Could we require PRs to have docs before they're merged? This isn't the only instance of missing docs across multiple releases :( |
Docs would help for sure. Having a tough time figuring out how to play animations from a Collada that aren't from a skeletal system; that is, the animations aren't inline with the geometry structure, but instead in an array at the front of the object. It looks like I make an AnimationClip now, but the parse function doesn't match up to the object structure. |
I'm sure I'm just blind but I do not see any type of complete event in the source of that example. Has this been altered? |
I know I am supposed to ask this on stackoverflow, but :), I've got all sorts of clips and mixers playing animation, all I need is for them to line up and we're flying. Thanks for any pointers, O |
|
@titansoftime thanks for the tip, I got very excited reading your suggestions and thought why did I not think of that? I am however using dev branch r81 and simple SRT keyframe animation clips. Which seem to not live at the mesh/geometry level (like shape/morph keys and such). I also tried adding the event listener to the mixer object and to the clipAction. Sadly also no cigar. Directly on the AnimationMixer in question, I get no errors but also no event is ever fired. If I trace the object, I see the listener sitting there. On the AnimationClip in the mixer I always get errors that: addEventListener is not a function. Back to the drawing board (though I do now cross check duration to current time, but that seems very inefficient) Ta, O |
@bakajin I just tested in 82dev. The finished event works. Refer to this fiddle: http://jsfiddle.net/titansoftime/v2682epf/ |
Forget that. I tried adding the event to the mixer itself. And it works now!. Very nice, thanks for pointing me in the right direction. Also I don't get what I was wrong doing before. but, Heho |
I want to start animation second time, but it does not start after one iteration. animation.setLoop(THREE.LoopOnce, 0); it works well. I tried to reset animation when it is finished, but reset function triggers finished event as well.
console.log loops. How can I fix it ? |
I think #10114 fixed this... #10064 (comment) Do you mind trying with the |
Thank you. |
They were merged 2 days ago. |
OK thank you. |
The issue is now solved, see #10103 (comment) |
Could someone point me to the docs to
AnimationMixer
AnimationClip
,AnimationAction
,AnimationLoader
,AnimationUtils
etc?I think they are missing.
P.S. I tried googling as well. The only resource I can find about AnimationMixer is from the examples.
The text was updated successfully, but these errors were encountered: