Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

v1.1.0

  • Loading branch information...
commit 69ddd557af379959f6297681b7726d6bcfdd6fd1 1 parent 05cc499
@Indamix authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 realshadow-min.js
View
4 realshadow-min.js
@@ -0,0 +1,4 @@
+/*! Real Shadow v1.1.0 https://github.com/Indamix/real-shadow | https://raw.github.com/Indamix/real-shadow/master/license.txt */
+(function(b,r,m){function s(f,d){var a=b(d),c=a.offset(),e=a.attr("rel"),a={dom:d,x:c.left+(a.outerWidth()>>1),y:c.top+(a.outerHeight()>>1)};e?a.c={r:-1!==e.indexOf("r"),g:-1!==e.indexOf("g"),b:-1!==e.indexOf("b")}:g.c&&(a.c=g.c);a.inset=g.inset?"inset":"";h.push(a)}function p(){for(var f=h.length,d,a,c;f--;)a=h[f],c=b(a.dom),d=c.offset(),a.x=d.left+(c.outerWidth()>>1),a.y=d.top+(c.outerHeight()>>1);i()}function i(f){f===m&&(f={pageX:g.pageX!==m?g.pageX:q.width()>>1,pageY:g.pageY!==m?g.pageY:0});
+for(var d=h.length,a;d--;){a=h[d];var c=f.pageX-h[d].x,e=f.pageY-h[d].y,b=Math.pow(c*c+e*e,j.pow),b=b/j.div+1;b>j.nMax&&(b=j.nMax);for(var k=Math.atan2(c,e)-t,c=(c=void 0)||7,e=[],i=Math.cos(k),k=Math.sin(k),n=void 0,l=1;l<c;++l)n=Math.pow(l,b),e.push((n*k>>0)+"px "+(n*i>>0)+"px "+(Math.pow(l,1.7)>>0)+"px rgba("+(a.c?(a.c.r?100:0)+","+(a.c.g?100:0)+","+(a.c.b?100:0)+",":"0,0,0,")+".05)"+a.inset);a.dom.style.boxShadow=e.join(",")}}var g={followMouse:!0},q=b(r),t=Math.PI,h=[];b.fn.realshadow=function(f){b.extend(g,
+f);!h.length&&g.followMouse&&b(document.body).mousemove(i);q.resize(p);b.each(this,s);i()};b.fn.realshadow.update=p;var j={nMax:2.3,pow:0.8,div:1500}})(jQuery,this);
Please sign in to comment.
Something went wrong with that request. Please try again.