How should I handle a leave animation in componentWillUnmount in React?

ReactTransitionGroup (upon which ReactCSSTransitionGroup is built) is the base component that allows asynchronous entering and leaving. It provides lifecycle hooks that you can use to hook into JS-based animations. The docs list the allowed hooks: ReactTransitionGroup is the basis for animations. When children are declaratively added or removed from it (as in the example above) … Read more

Is there an algorithm for converting quaternion rotations to Euler angle rotations?

This looks like a classic case of old technology being overlooked – I managed to dig out a copy of Graphics Gems IV from the garage and it looks like Ken Shoemake has not only an algorithm for converting from Euler angles of arbitrary rotation order, but also answers most of my other questions on … Read more

Safari changing font weights when unrelated animations are running

When you trigger GPU compositing (eg, through CSS animation), the browser sends that element to the GPU, but also anything that would appear on top of that element if its top/left properties were changed. This includes any position:relative elements that appear after the animating one. The solution is to give the animating element position:relative and … Read more

Animate bootstrap columns

This could be done with CSS3 transitions, which would be consistent with the way Bootstrap JS plugins accomplish their animations. HTML <div class=”container”> <div class=”row”> <div id=”col2″ class=”span0″></div> <div id=”col1″ class=”span12″> <a id=”trig” class=”btn btn-inverse”>Reflow Me</a> </div> </div> </div>​ JS $(‘#trig’).on(‘click’, function () { $(‘#col1’).toggleClass(‘span12 span3’); $(‘#col2’).toggleClass(‘span0 span9’); });​ CSS .row div { -webkit-transition: width … Read more