%div.gallery
  - (1..100).each do |i|
    %img{:src => "http://lorempixel.com/350/350/?p=#{i}" }/
View Compiled
html,body{
  width: 100%;
  height: 100%;
}
.gallery {
  position:relative;
  perspective:2000px;
  perspective-origin: 0px 0px;
  width: 100%;
  height: 100%;
  overflow:hidden;
  transform-style: preserve-3d;
}
.gallery img{
  position:absolute;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  top:50%;
  left:40%;
  max-width: 150px;
  max-height:150px;
  cursor:pointer;
}
$('.gallery').mousemove(function(event){
  $(this).css({
    "perspective-origin": 
    event.pageX+"px "+
    event.pageY+"px "
  });
});
var body = {value:1}
function loop(){
  $(body).animate(
    {value: '+=1'}
    ,{
    duration:Math.pow(10,4),
    easing:'linear',
    complete:loop,
    step:function(i){
      $('.gallery img').each(function(j){
        var b=(i+j);
        var x= 
            (Math.sin(b)*
            (window.innerWidth*.6));
        var y= 5-(j*.5);
        var z= (Math.cos(b)*20);
        $(this).css({
        'z-index': (z>0)?0:-1,
        '-webkit-filter': 'blur('+(-z*.01)+'em)',
        'transform':
        'translate3d('+x+'px,'+y+'em,'+z+'em)'+  
        'rotateY('+(Math.cos(b)*180)+'deg) ',
      });
      })
    }
  })
}
loop();
//
var gui = new dat.GUI();
gui.add(window,'loop');
gui.add(window,'stop');
function stop(){
  $(body).stop();
}

External CSS

  1. https://s3-us-west-2.amazonaws.com/s.cdpn.io/86044/bisk8s_cdpn_base_201312_1.css

External JavaScript

  1. //cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js
  2. //cdnjs.cloudflare.com/ajax/libs/dat-gui/0.5/dat.gui.js