PageSourceSearch

https://www.lookeya.com/wp-content/themes/kinsey/js/jquery-arts-parallax.min.js?ver=1.0.0

js lookeya.com collected 2026-10-09 01:57:36 UTC 6,497 bytes, 1 lines download raw bytes

1!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=function(a,r){return void 0===r&&(r="undefined"!=typeof window?require("jquery"):require("jquery")(a)),t(),r}:t(jQuery)}(function(t){"use strict";const a={target:{scrub:".js-arts-parallax__scrub",velocity:".js-arts-parallax__velocity"},refreshPriority:null};class r{constructor(t,r){this.$el=jQuery(t),this.$el.length&&(this.dataOptions={target:{type:this.$el.attr("data-arts-parallax-target")||"innerElement"},scrubbing:{translate:{from:{x:this.$el.attr("data-arts-parallax-x-from")||0,y:this.$el.attr("data-arts-parallax-y-from")||0},to:{x:this.$el.attr("data-arts-parallax-x-to")||0,y:this.$el.attr("data-arts-parallax-y-to")||0}},scale:{from:this.$el.attr("data-arts-parallax-scale-from")||!1,to:this.$el.attr("data-arts-parallax-scale-to")||!1},rotate:{from:this.$el.attr("data-arts-parallax-rotate-from")||!1,to:this.$el.attr("data-arts-parallax-rotate-to")||!1},factor:{x:this.$el.attr("data-arts-parallax-factor-x")||0,y:this.$el.attr("data-arts-parallax-factor-y")||0}},scrub:this.$el.attr("data-arts-parallax-scrub")||!0,transformOrigin:this.$el.attr("data-arts-parallax-transform-origin")||"center center",velocity:{effect:this.$el.attr("data-arts-parallax-velocity-effect")||!1,value:this.$el.attr("data-arts-parallax-velocity-value")||0,unit:this.$el.attr("data-arts-parallax-velocity-unit")||"deg"},resistance:this.$el.attr("data-arts-parallax-resistance")||2},this.options=jQuery.extend(!0,{},a,r,this.dataOptions),this.$scrubTarget=this.$el.find(this.options.target.scrub),this.scrubTarget=this.$scrubTarget.get(0),this.$velocityTarget=this.$el.find(this.options.target.velocity),this.velocityTarget=this.$velocityTarget.get(0),"self"===this.options.target.type&&(this.$scrubTarget=this.$el),this.outerParallaxX=this.$el.closest("[data-arts-parallax-target][data-arts-parallax-x]").attr("data-arts-parallax-x"),this.outerParallaxY=this.$el.closest("[data-arts-parallax-target][data-arts-parallax-y]").attr("data-arts-parallax-y"),this._init())}_init(){let t=1+2*Math.abs(this.options.scrubbing.factor.x),a=1+Math.abs(this.options.scrubbing.factor.y),r=Math.max(t,a),e=100*this.options.scrubbing.factor.x,s=-1*e,i=100*this.options.scrubbing.factor.y,o=-1*i;if((s>0||o>0)&&(r*=r),"self"===this.options.target.type){const t=this._getScrubEffect({element:this.$el,fromX:this.options.scrubbing.translate.from.x,fromY:this.options.scrubbing.translate.from.y,toX:this.options.scrubbing.translate.to.x,toY:this.options.scrubbing.translate.to.y,fromScale:!!this.options.scrubbing.scale.from&&this.options.scrubbing.scale.from,toScale:!!this.options.scrubbing.scale.to&&this.options.scrubbing.scale.to,origin:this.options.transformOrigin,fromRotate:!!this.options.scrubbing.rotate.from&&this.options.scrubbing.rotate.from,toRotate:!!this.options.scrubbing.rotate.to&&this.options.scrubbing.rotate.to});jQuery.fn.artsParallax.scenes.push(t)}else{const t=this._getScrubEffect({element:this.$scrubTarget,fromX:s+"%",fromY:o+"%",toX:e+"%",toY:i+"%",fromScale:this.options.scrubbing.scale.from?this.options.scrubbing.scale.from:r,toScale:this.options.scrubbing.scale.to?this.options.scrubbing.scale.to:r,origin:this.options.transformOrigin});jQuery.fn.artsParallax.scenes.push(t)}if(this.options.velocity.effect&&this.options.velocity.value&&this.options.velocity.unit){const t=this._getVelocityEffect({effect:this.options.velocity.effect,value:this.options.velocity.value,unit:this.options.velocity.unit});jQuery.fn.artsParallax.scenes.push(t)}}_getVelocityEffect({effect:t,value:a,unit:r}){const e=this.$el.add(this.$el.find("img")),s=!(!this.options.scrub||"true"!==this.options.scrub)||parseFloat(this.options.scrub),i={trigger:this.$el,start:"top bottom",end:"bottom top",scrub:s,invalidateOnRefresh:!0,refreshPriority:"self"===this.options.target.type?this.options.refreshPriority:this.options.refreshPriority+10};let o,l,n=0,c={factor:0},f=1e3*this.options.resistance*(a<0?1:-1),h=gsap.quickSetter(this.$el,t,r),u=Math.abs(a),p=gsap.utils.clamp(-u,u);return this.$velocityTarget.is(this.$el)&&(this.$velocityTarget=this.$el.find(this.options.target.velocity)),l=(this.$velocityTarget.length,gsap.quickSetter(this.$velocityTarget,t,r)),i.onUpdate=(t=>{n=p(t.getVelocity()/f),Math.abs(n)>Math.abs(c.factor)&&(c.factor=n,gsap.to(c,{factor:0,duration:.6,ease:"power2",overwrite:!0,onUpdate:()=>{h(10*c.factor),l(10*-c.factor)}}))}),o=ScrollTrigger.create(i),e.length&&e.each(function(){jQuery(this).on("load",()=>{o.refresh()})}),o}_getScrubEffect({element:t,fromY:a,fromX:r,toY:e,toX:s,fromScale:i,toScale:o,fromRotate:l,toRotate:n,origin:c}){this.$el.add(this.$el.find("img"));const f=new gsap.timeline,h=!(!this.options.scrub||"true"!==this.options.scrub)||parseFloat(this.options.scrub),u={animation:f.fromTo(t,{rotation:l||0,y:a||0,x:r||0,scale:i||1,force3D:!0,immediateRender:!0},{rotation:n||0,y:e||0,x:s||0,scale:o||i||1,transformOrigin:c,force3D:!0,ease:"none"}),trigger:this.$el,start:()=>"top bottom",end:()=>"bottom top",scrub:h,invalidateOnRefresh:!0};let p;return this.outerParallaxY&&(u.start=(()=>"top bottom"),u.end=(()=>`bottom+=${this.outerParallaxY} top`)),p=ScrollTrigger.create(u)}}jQuery.fn.artsParallax=function(t){if("undefined"!=typeof gsap&&"undefined"!=typeof ScrollTrigger){if(void 0===t||"object"==typeof t)return this.each(function(a){jQuery.data(this,"artsParallax")||jQuery.data(this,"artsParallax",new r(this,t))});if("string"==typeof t&&"_"!==t[0]&&"init"!==t){const a=jQuery.data(this[0],"artsParallax");return"destroy"===t&&jQuery.data(this,"artsParallax",null),a instanceof r&&"function"==typeof a[t]?a[t].apply(a,Array.prototype.slice.call(arguments,1
1)):this}}else console.error("jQuery artsParallax plugin requires both GSAP and GSAP ScrollTrigger to work.")},jQuery.fn.artsParallax.scenes=[],jQuery.fn.artsParallax.disableAll=function(){jQuery.fn.artsParallax.scenes.length&&jQuery.fn.artsParallax.scenes.forEach(t=>{t.animation.pause(),t.disable()})},jQuery.fn.artsParallax.enableAll=function(){jQuery.fn.artsParallax.scenes.length&&jQuery.fn.artsParallax.scenes.forEach(t=>{t.enable()})},jQuery.fn.artsParallax.refreshAll=function(t){jQuery.fn.artsParallax.scenes.length&&jQuery.fn.artsParallax.scenes.forEach(a=>{a.refresh(t)})},jQuery.fn.artsParallax.destroyAll=function(){jQuery.fn.artsParallax.scenes.length&&(jQuery.fn.artsParallax.scenes.forEach(t=>{t.animation.kill(),t.kill()}),jQuery.fn.artsParallax.scenes=[])}});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.