Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. function mRender() {
  2. var t = new Date().getTime() - mAnimstart;
  3. if (t > mtf)
  4. t = mtf;
  5. var deg = d_mod(mvi, t);
  6. mView(deg);
  7. if (t < mtf) {
  8. requestAnimationFrame(mRender);
  9. } else {
  10. mSnapX = deg;
  11. boxIsMoving = false;
  12. }
  13. }
  14.  
  15. function mView(offset) {
  16. offset = -((offset + 1050 - CASEW / 2) % 1050);
  17. $MBOX01.css("background-position", offset + "px 0px");
  18. $MBOX02.css("background-position", offset + "px 0px");
  19. $MBOX03.css("background-position", offset + "px 0px");
  20. $MBOX04.css("background-position", offset + "px 0px");
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement