Optimizing JS animation frame engine 3.