Skip to content
Browse files

smooth animation

  • Loading branch information...
1 parent a119404 commit e24cacf01fec54b2bb5cf6466091c4f86e1c0dba Cameron McEfee committed Jul 1, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 js/plax.js
View
8 js/plax.js
@@ -72,10 +72,10 @@
if (new Date().getTime() < lastRender + delay) return;
lastRender = new Date().getTime();
- var x = moveable() ? e.rotationRate.beta : e.pageX,
- y = moveable() ? e.rotationRate.alpha : e.pageY,
- hRatio = x/(moveable() ? 90 : docWidth),
- vRatio = y/(moveable() ? 180 : docHeight),
+ var x = moveable() ? e.rotationRate.beta/3 : e.pageX,
+ y = moveable() ? e.rotationRate.alpha/3 : e.pageY,
+ hRatio = x/(moveable() ? 360 : docWidth),
+ vRatio = y/(moveable() ? 360 : docHeight),
layer, i
for (i = layers.length; i--;) {

0 comments on commit e24cacf

Please sign in to comment.
Something went wrong with that request. Please try again.