Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Drunk vision/walking:

  var i = 0, s;
  setInterval(function(){
    i+=0.02;
    s = Math.sin(i)
    camera.focalLength = 0.8 + s * 0.2;
    player.rotate(s * 0.02 - 0.01);
  }, 16);


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: