@digitalmoves/adaptive-background
Advanced tools
Comparing version 0.0.1 to 0.0.2
# @digitalmoves/adaptive-background | ||
## 0.0.2 | ||
### Patch Changes | ||
- 543e50b: Fix: reduce code footprint | ||
## 0.0.1 | ||
@@ -4,0 +10,0 @@ |
@@ -8,2 +8,2 @@ /* | ||
*/ | ||
(function(o){typeof define=="function"&&define.amd?define(o):o()})(function(){"use strict";const o=r;(function(c,n){const e=r,t=c();for(;;)try{if(parseInt(e(477))/1+-parseInt(e(478))/2*(-parseInt(e(497))/3)+parseInt(e(489))/4+parseInt(e(475))/5*(parseInt(e(492))/6)+-parseInt(e(491))/7*(parseInt(e(498))/8)+-parseInt(e(493))/9*(-parseInt(e(480))/10)+-parseInt(e(485))/11*(parseInt(e(486))/12)===n)break;t.push(t.shift())}catch{t.push(t.shift())}})(d,678021);class i{constructor(n={}){const e=r;this[e(479)]=document[e(467)](e(474)),gsap.registerPlugin(ScrollTrigger),this[e(473)](),this.setupBackgrounds(),this[e(487)]()}[o(473)](){const n=o;this[n(479)][n(496)](e=>{const t=n,x=e[t(495)](t(472));x&&(gsap.set(document[t(495)](t(484)),{zIndex:9}),gsap.set(x,{position:t(488),top:0,left:0,width:t(490),height:"100vh",opacity:0,zIndex:-1,backgroundSize:t(476),backgroundPosition:t(469),backgroundRepeat:t(465),pointerEvents:t(499)}))})}[o(471)](){const n=o;this[n(479)].forEach((e,t)=>{const x=n,s=e.querySelector(x(472));s&&(gsap.set(s,{opacity:0}),t===0&&gsap[x(483)](s,{opacity:1}))})}[o(487)](){const n=o;this[n(479)][n(496)]((e,t)=>{const x=n,s=e[x(495)](x(472));s&&ScrollTrigger[x(482)]({trigger:e,start:x(470),end:x(494),onEnter:()=>{const a=x;gsap.to(s,{opacity:1,duration:1,ease:a(468)})},onLeave:()=>{const a=x;gsap.to(s,{opacity:0,duration:1,ease:a(468)})},onEnterBack:()=>{const a=x;gsap.to(s,{opacity:1,duration:1,ease:a(468)})},onLeaveBack:()=>{const a=x;gsap.to(s,{opacity:0,duration:1,ease:a(468)})}})})}}function r(c,n){const e=d();return r=function(t,x){return t=t-465,e[t]},r(c,n)}document[o(466)](o(481),()=>{new i});function d(){const c=["DOMContentLoaded","create","set","footer","45425017VrOPxn","12AKpHnU","createScrollAnimations","fixed","4744836ZFMBFk","100%","12971jOfvVs","426AzkxRk","603hojrpl","bottom center","querySelector","forEach","1335942okFUMh","664mVugXZ","none","no-repeat","addEventListener","querySelectorAll","power2.out","center","top center","setupBackgrounds",".section-border","setupStyles",".container .page-section","31365ysEgzF","cover","1262930TbiUqU","6sywTSH","sections","109090sQKIty"];return d=function(){return c},d()}}); | ||
(function(x){typeof define=="function"&&define.amd?define(x):x()})(function(){"use strict";const x=o;function o(r,n){const e=s();return o=function(t,c){return t=t-186,e[t]},o(r,n)}(function(r,n){const e=o,t=r();for(;;)try{if(parseInt(e(202))/1*(parseInt(e(190))/2)+-parseInt(e(198))/3+-parseInt(e(188))/4*(-parseInt(e(197))/5)+parseInt(e(209))/6+parseInt(e(207))/7+-parseInt(e(205))/8*(-parseInt(e(201))/9)+parseInt(e(203))/10*(-parseInt(e(194))/11)===n)break;t.push(t.shift())}catch{t.push(t.shift())}})(s,214588);function s(){const r=[".section-border","387416KifcbU","DOMContentLoaded","1354479kiVgqu","registerPlugin","681240iHIQTZ",".container .page-section","sections","addEventListener","top bottom-=200","32PPGRkt","100%","2YmeCZl","set","refresh","init","143gvSDEa","top top","querySelector","238145cNMmBt","928590Ijidbo","none","create","72USuKDe","319477hJozDX","669880dBHjpe"];return s=function(){return r},s()}class a{constructor(n={}){const e=o;this[e(211)]=document.querySelectorAll(e(210)),this[e(193)]()}[x(193)](){const n=x;gsap[n(208)](ScrollTrigger),this[n(211)].forEach((e,t)=>{const c=n,i=e.querySelector(c(204));if(i){if(gsap.set(document[c(196)]("footer"),{zIndex:999}),gsap[c(191)](i,{position:"fixed",top:0,left:0,width:c(189),height:"100%",opacity:t===0?1:0,pointerEvents:c(199),zIndex:-1}),t===0)return;ScrollTrigger[c(200)]({trigger:e,start:c(187),end:c(195),scrub:!0,markers:!0,animation:gsap.to(i,{opacity:1,duration:1,overwrite:"auto"}),toggleClass:"background-adjusting"})}}),window[n(186)]("resize",()=>{const e=n;ScrollTrigger[e(192)]()})}}document[x(186)](x(206),()=>{new a})}); |
{ | ||
"name": "@digitalmoves/adaptive-background", | ||
"private": false, | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"main": "dist/main.umd.js", | ||
@@ -6,0 +6,0 @@ "files": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4066
13