From 5ebf77f0019861f5b214f8a193b9d2ca489d8107 Mon Sep 17 00:00:00 2001 From: 7PH Date: Tue, 29 Nov 2022 15:23:24 +0100 Subject: [PATCH 1/3] Add pulse effect --- dist/powerglitch.min.js | 2 +- docs-src/src/components/OptionPanel.vue | 19 +++++++++ docs/api-docs/assets/search.js | 2 +- docs/api-docs/index.html | 3 +- docs/api-docs/types/GlitchPartialOptions.html | 2 +- docs/api-docs/types/GlitchResult.html | 2 +- docs/api-docs/types/GlitchableElement.html | 2 +- docs/api-docs/types/LayerDefinition.html | 2 +- docs/api-docs/types/PlayModes.html | 2 +- docs/api-docs/types/PowerGlitchOptions.html | 10 +++-- docs/api-docs/types/RecursivePartial.html | 2 +- docs/api-docs/variables/PowerGlitch.html | 2 +- .../{index.eaee9fa4.js => index.42a2e325.js} | 40 +++++++++---------- docs/index.html | 2 +- src/index.ts | 37 +++++++++++++++++ 15 files changed, 95 insertions(+), 34 deletions(-) rename docs/assets/{index.eaee9fa4.js => index.42a2e325.js} (68%) diff --git a/dist/powerglitch.min.js b/dist/powerglitch.min.js index 3d5fb09..a029edc 100644 --- a/dist/powerglitch.min.js +++ b/dist/powerglitch.min.js @@ -1 +1 @@ -(function(f){"use strict";var $=Object.defineProperty,m=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,g=(t,n,e)=>n in t?$(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,y=(t,n)=>{for(var e in n||(n={}))_.call(n,e)&&g(t,e,n[e]);if(m)for(var e of m(n))C.call(n,e)&&g(t,e,n[e]);return t};const p=(t="always")=>({playMode:t,createContainers:!0,hideOverflow:!1,timing:t==="always"?{duration:2*1e3,iterations:1/0}:{duration:250,iterations:1},glitchTimeSpan:t==="always"?{start:.5,end:.7}:{start:0,end:1},shake:{velocity:15,amplitudeX:.2,amplitudeY:.2},slice:t==="click"?{count:15,velocity:20,minHeight:.02,maxHeight:.15,hueRotate:!0}:{count:6,velocity:15,minHeight:.02,maxHeight:.15,hueRotate:!0}}),v=(t,n)=>{if(!t.glitchTimeSpan)return 1;const e=t.glitchTimeSpan.start,a=t.glitchTimeSpan.end;if(na)return 0;const r=e+(a-e)/2;return n(Math.random()-.5)*2*v(t,n),A=({minHeight:t,maxHeight:n,minWidth:e,maxWidth:a})=>{const r=Math.floor(Math.random()*((n-t)*100+1))+t*100,c=Math.floor(Math.random()*((a-e)*100+1))+e*100,i=Math.floor(Math.random()*(100-r)),o=Math.floor(Math.random()*(100-c)),h=`${o+c}% ${i}%`,s=`${o+c}% ${i+r}%`,l=`${o}% ${i+r}%`,d=`${o}% ${i}%`;return`polygon(${h},${s},${l},${d})`},M=t=>{const n=Math.floor(t.slice.velocity*t.timing.duration/1e3)+1,e=[];for(let a=0;a{if(!t.shake)return{steps:[],timing:{}};const n=Math.floor(t.shake.velocity*t.timing.duration/1e3)+1,e=[];for(let a=0;a[b(t),...Array.from({length:t.slice.count}).map(()=>M(t))],E=(...t)=>{const n=e=>e&&typeof e=="object";return t.reduce((e,a)=>(Object.keys(a).forEach(r=>{const c=e[r],i=a[r];if(Array.isArray(c)&&Array.isArray(i)){e[r]=c.concat(...i);return}if(n(c)&&n(i)){e[r]=E(c,i);return}i!==void 0&&(e[r]=i)}),e),{})},G=(t,n)=>{var e,a;if(!n.createContainers)return{container:t,layersContainer:t,glitched:t.firstElementChild};if(!t.dataset.glitched){const i=document.createElement("div"),o=document.createElement("div");return getComputedStyle(t).getPropertyValue("display").match(/^inline/)&&(o.style.display="inline-block"),o.appendChild(i),(e=t.parentElement)==null||e.insertBefore(o,t),i.prepend(t),{container:o,layersContainer:i,glitched:t}}const r=t.parentElement,c=(a=t.parentElement)==null?void 0:a.parentElement;for(;r.children.length>1;)r.removeChild(r.children[1]);return r.firstElementChild.getAnimations().forEach(i=>i.cancel()),{container:c,layersContainer:r,glitched:t}},P=(t,n,e)=>{const{glitched:a,container:r,layersContainer:c}=G(t,e);c.style.display="grid",e.hideOverflow&&(r.style.overflow="hidden"),e.html&&(a.innerHTML=e.html),a.style.gridArea="1/1/-1/-1";const i=a.cloneNode(!0);i.style.gridArea="1/1/-1/-1",i.style.userSelect="none",i.style.pointerEvents="none",i.style.opacity="0";for(let s=0;s{n.forEach((s,l)=>{c.children[l].animate(s.steps,s.timing)})},h=()=>{n.forEach((s,l)=>{c.children[l].getAnimations().forEach(d=>{d.cancel()})})};switch(r.onmouseenter=null,r.onmouseleave=null,r.onclick=null,e.playMode){case"always":o();break;case"hover":r.onmouseenter=o,r.onmouseleave=h;break;case"click":r.onclick=()=>{h(),o()};break}return t.dataset.glitched="1",{container:r,startGlitch:o,stopGlitch:h}},k={glitch:(t=".powerglitch",n={})=>{const e=E(p(n.playMode),n);let a=[];typeof t=="string"?a=Array.from(document.querySelectorAll(t)):t instanceof NodeList?a=Array.from(t):Array.isArray(t)?a=t:t instanceof HTMLElement&&(a=[t]);const r=w(e),c=a.map(i=>P(i,r,e));return{containers:c.map(i=>i.container),startGlitch:()=>c.forEach(i=>i.startGlitch()),stopGlitch:()=>c.forEach(i=>i.stopGlitch())}},generateLayers:w,getDefaultOptions:p};f.PowerGlitch=k,Object.defineProperty(f,"__esModule",{value:!0})})(this.window=this.window||{}); +(function(m){"use strict";var E=Object.defineProperty,$=Object.defineProperties,P=Object.getOwnPropertyDescriptors,g=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,y=(t,r,e)=>r in t?E(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e,d=(t,r)=>{for(var e in r||(r={}))C.call(r,e)&&y(t,e,r[e]);if(g)for(var e of g(r))b.call(r,e)&&y(t,e,r[e]);return t},A=(t,r)=>$(t,P(r));const p=(t="always")=>({playMode:t,createContainers:!0,hideOverflow:!1,timing:t==="always"?{duration:2*1e3,iterations:1/0}:{duration:250,iterations:1},glitchTimeSpan:t==="always"?{start:.5,end:.7}:{start:0,end:1},shake:{velocity:15,amplitudeX:.2,amplitudeY:.2},slice:t==="click"?{count:15,velocity:20,minHeight:.02,maxHeight:.15,hueRotate:!0}:{count:6,velocity:15,minHeight:.02,maxHeight:.15,hueRotate:!0},pulse:!1}),v=(t,r)=>{if(!t.glitchTimeSpan)return 1;const e=t.glitchTimeSpan.start,a=t.glitchTimeSpan.end;if(ra)return 0;const n=e+(a-e)/2;return r(Math.random()-.5)*2*v(t,r),M=({minHeight:t,maxHeight:r,minWidth:e,maxWidth:a})=>{const n=Math.floor(Math.random()*((r-t)*100+1))+t*100,c=Math.floor(Math.random()*((a-e)*100+1))+e*100,i=Math.floor(Math.random()*(100-n)),s=Math.floor(Math.random()*(100-c)),h=`${s+c}% ${i}%`,l=`${s+c}% ${i+n}%`,o=`${s}% ${i+n}%`,f=`${s}% ${i}%`;return`polygon(${h},${l},${o},${f})`},G=t=>{const r=Math.floor(t.slice.velocity*t.timing.duration/1e3)+1,e=[];for(let a=0;at.pulse?{steps:[{transform:"scale(1)",opacity:"1"},{transform:`scale(${t.pulse.scale})`,opacity:"0"}],timing:A(d({},t.timing),{delay:(t.glitchTimeSpan?t.glitchTimeSpan.start:0)*t.timing.duration,easing:"ease-in-out"})}:{steps:[],timing:{}},O=t=>{if(!t.shake)return{steps:[],timing:{}};const r=Math.floor(t.shake.velocity*t.timing.duration/1e3)+1,e=[];for(let a=0;a[O(t),...Array.from({length:t.slice.count}).map(()=>G(t)),L(t)],_=(...t)=>{const r=e=>e&&typeof e=="object";return t.reduce((e,a)=>(Object.keys(a).forEach(n=>{const c=e[n],i=a[n];if(Array.isArray(c)&&Array.isArray(i)){e[n]=c.concat(...i);return}if(r(c)&&r(i)){e[n]=_(c,i);return}i!==void 0&&(e[n]=i)}),e),{})},k=(t,r)=>{var e,a;if(!r.createContainers)return{container:t,layersContainer:t,glitched:t.firstElementChild};if(!t.dataset.glitched){const i=document.createElement("div"),s=document.createElement("div");return getComputedStyle(t).getPropertyValue("display").match(/^inline/)&&(s.style.display="inline-block"),s.appendChild(i),(e=t.parentElement)==null||e.insertBefore(s,t),i.prepend(t),{container:s,layersContainer:i,glitched:t}}const n=t.parentElement,c=(a=t.parentElement)==null?void 0:a.parentElement;for(;n.children.length>1;)n.removeChild(n.children[1]);return n.firstElementChild.getAnimations().forEach(i=>i.cancel()),{container:c,layersContainer:n,glitched:t}},H=(t,r,e)=>{const{glitched:a,container:n,layersContainer:c}=k(t,e);c.style.display="grid",e.hideOverflow&&(n.style.overflow="hidden"),e.html&&(a.innerHTML=e.html),a.style.gridArea="1/1/-1/-1";const i=a.cloneNode(!0);i.style.gridArea="1/1/-1/-1",i.style.userSelect="none",i.style.pointerEvents="none",i.style.opacity="0";for(let l=0;l{r.forEach((l,o)=>{c.children[o].animate(l.steps,l.timing)})},h=()=>{r.forEach((l,o)=>{c.children[o].getAnimations().forEach(f=>{f.cancel()})})};switch(n.onmouseenter=null,n.onmouseleave=null,n.onclick=null,e.playMode){case"always":s();break;case"hover":n.onmouseenter=s,n.onmouseleave=h;break;case"click":n.onclick=()=>{h(),s()};break}return t.dataset.glitched="1",{container:n,startGlitch:s,stopGlitch:h}},j={glitch:(t=".powerglitch",r={})=>{const e=_(p(r.playMode),r);let a=[];typeof t=="string"?a=Array.from(document.querySelectorAll(t)):t instanceof NodeList?a=Array.from(t):Array.isArray(t)?a=t:t instanceof HTMLElement&&(a=[t]);const n=w(e),c=a.map(i=>H(i,n,e));return{containers:c.map(i=>i.container),startGlitch:()=>c.forEach(i=>i.startGlitch()),stopGlitch:()=>c.forEach(i=>i.stopGlitch())}},generateLayers:w,getDefaultOptions:p};m.PowerGlitch=j,Object.defineProperty(m,"__esModule",{value:!0})})(this.window=this.window||{}); diff --git a/docs-src/src/components/OptionPanel.vue b/docs-src/src/components/OptionPanel.vue index f584822..e44fe52 100644 --- a/docs-src/src/components/OptionPanel.vue +++ b/docs-src/src/components/OptionPanel.vue @@ -206,5 +206,24 @@ const appStore = useAppStore(); :title="'Hue rotate'" /> + +
+ Pulse +
+ + diff --git a/docs/api-docs/assets/search.js b/docs/api-docs/assets/search.js index f40da66..df2f054 100644 --- a/docs/api-docs/assets/search.js +++ b/docs/api-docs/assets/search.js @@ -1 +1 @@ -window.searchData = JSON.parse("{\"kinds\":{\"32\":\"Variable\",\"1024\":\"Property\",\"65536\":\"Type literal\",\"4194304\":\"Type alias\"},\"rows\":[{\"kind\":4194304,\"name\":\"PlayModes\",\"url\":\"types/PlayModes.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"PowerGlitchOptions\",\"url\":\"types/PowerGlitchOptions.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/PowerGlitchOptions.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"PowerGlitchOptions\"},{\"kind\":1024,\"name\":\"html\",\"url\":\"types/PowerGlitchOptions.html#__type.html\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type\"},{\"kind\":1024,\"name\":\"createContainers\",\"url\":\"types/PowerGlitchOptions.html#__type.createContainers\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type\"},{\"kind\":1024,\"name\":\"playMode\",\"url\":\"types/PowerGlitchOptions.html#__type.playMode\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type\"},{\"kind\":1024,\"name\":\"hideOverflow\",\"url\":\"types/PowerGlitchOptions.html#__type.hideOverflow\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type\"},{\"kind\":1024,\"name\":\"timing\",\"url\":\"types/PowerGlitchOptions.html#__type.timing\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/PowerGlitchOptions.html#__type.__type-1\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type\"},{\"kind\":1024,\"name\":\"duration\",\"url\":\"types/PowerGlitchOptions.html#__type.__type-1.duration\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type.__type\"},{\"kind\":1024,\"name\":\"iterations\",\"url\":\"types/PowerGlitchOptions.html#__type.__type-1.iterations\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type.__type\"},{\"kind\":1024,\"name\":\"easing\",\"url\":\"types/PowerGlitchOptions.html#__type.__type-1.easing\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type.__type\"},{\"kind\":1024,\"name\":\"glitchTimeSpan\",\"url\":\"types/PowerGlitchOptions.html#__type.glitchTimeSpan\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type\"},{\"kind\":1024,\"name\":\"shake\",\"url\":\"types/PowerGlitchOptions.html#__type.shake\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type\"},{\"kind\":1024,\"name\":\"slice\",\"url\":\"types/PowerGlitchOptions.html#__type.slice\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/PowerGlitchOptions.html#__type.__type-2\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type\"},{\"kind\":1024,\"name\":\"count\",\"url\":\"types/PowerGlitchOptions.html#__type.__type-2.count\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type.__type\"},{\"kind\":1024,\"name\":\"velocity\",\"url\":\"types/PowerGlitchOptions.html#__type.__type-2.velocity\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type.__type\"},{\"kind\":1024,\"name\":\"minHeight\",\"url\":\"types/PowerGlitchOptions.html#__type.__type-2.minHeight\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type.__type\"},{\"kind\":1024,\"name\":\"maxHeight\",\"url\":\"types/PowerGlitchOptions.html#__type.__type-2.maxHeight\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type.__type\"},{\"kind\":1024,\"name\":\"hueRotate\",\"url\":\"types/PowerGlitchOptions.html#__type.__type-2.hueRotate\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type.__type\"},{\"kind\":4194304,\"name\":\"LayerDefinition\",\"url\":\"types/LayerDefinition.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/LayerDefinition.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"LayerDefinition\"},{\"kind\":1024,\"name\":\"steps\",\"url\":\"types/LayerDefinition.html#__type.steps\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"LayerDefinition.__type\"},{\"kind\":1024,\"name\":\"timing\",\"url\":\"types/LayerDefinition.html#__type.timing\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"LayerDefinition.__type\"},{\"kind\":4194304,\"name\":\"RecursivePartial\",\"url\":\"types/RecursivePartial.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"GlitchPartialOptions\",\"url\":\"types/GlitchPartialOptions.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"GlitchableElement\",\"url\":\"types/GlitchableElement.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"GlitchResult\",\"url\":\"types/GlitchResult.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/GlitchResult.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"GlitchResult\"},{\"kind\":1024,\"name\":\"containers\",\"url\":\"types/GlitchResult.html#__type.containers\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"GlitchResult.__type\"},{\"kind\":1024,\"name\":\"startGlitch\",\"url\":\"types/GlitchResult.html#__type.startGlitch\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"GlitchResult.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/GlitchResult.html#__type.__type-1\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"GlitchResult.__type\"},{\"kind\":1024,\"name\":\"stopGlitch\",\"url\":\"types/GlitchResult.html#__type.stopGlitch\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"GlitchResult.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/GlitchResult.html#__type.__type-3\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"GlitchResult.__type\"},{\"kind\":32,\"name\":\"PowerGlitch\",\"url\":\"variables/PowerGlitch.html\",\"classes\":\"tsd-kind-variable\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"variables/PowerGlitch.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-variable\",\"parent\":\"PowerGlitch\"},{\"kind\":1024,\"name\":\"glitch\",\"url\":\"variables/PowerGlitch.html#__type.glitch\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitch.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"variables/PowerGlitch.html#__type.__type-1\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitch.__type\"},{\"kind\":1024,\"name\":\"generateLayers\",\"url\":\"variables/PowerGlitch.html#__type.generateLayers\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitch.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"variables/PowerGlitch.html#__type.__type-3\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitch.__type\"},{\"kind\":1024,\"name\":\"getDefaultOptions\",\"url\":\"variables/PowerGlitch.html#__type.getDefaultOptions\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitch.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"variables/PowerGlitch.html#__type.__type-5\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitch.__type\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,33.787]],[\"comment/0\",[]],[\"name/1\",[1,33.787]],[\"comment/1\",[]],[\"name/2\",[2,13.418]],[\"comment/2\",[]],[\"name/3\",[3,33.787]],[\"comment/3\",[]],[\"name/4\",[4,33.787]],[\"comment/4\",[]],[\"name/5\",[5,33.787]],[\"comment/5\",[]],[\"name/6\",[6,33.787]],[\"comment/6\",[]],[\"name/7\",[7,28.679]],[\"comment/7\",[]],[\"name/8\",[2,13.418]],[\"comment/8\",[]],[\"name/9\",[8,33.787]],[\"comment/9\",[]],[\"name/10\",[9,33.787]],[\"comment/10\",[]],[\"name/11\",[10,33.787]],[\"comment/11\",[]],[\"name/12\",[11,33.787]],[\"comment/12\",[]],[\"name/13\",[12,33.787]],[\"comment/13\",[]],[\"name/14\",[13,33.787]],[\"comment/14\",[]],[\"name/15\",[2,13.418]],[\"comment/15\",[]],[\"name/16\",[14,33.787]],[\"comment/16\",[]],[\"name/17\",[15,33.787]],[\"comment/17\",[]],[\"name/18\",[16,33.787]],[\"comment/18\",[]],[\"name/19\",[17,33.787]],[\"comment/19\",[]],[\"name/20\",[18,33.787]],[\"comment/20\",[]],[\"name/21\",[19,33.787]],[\"comment/21\",[]],[\"name/22\",[2,13.418]],[\"comment/22\",[]],[\"name/23\",[20,33.787]],[\"comment/23\",[]],[\"name/24\",[7,28.679]],[\"comment/24\",[]],[\"name/25\",[21,33.787]],[\"comment/25\",[]],[\"name/26\",[22,33.787]],[\"comment/26\",[]],[\"name/27\",[23,33.787]],[\"comment/27\",[]],[\"name/28\",[24,33.787]],[\"comment/28\",[]],[\"name/29\",[2,13.418]],[\"comment/29\",[]],[\"name/30\",[25,33.787]],[\"comment/30\",[]],[\"name/31\",[26,33.787]],[\"comment/31\",[]],[\"name/32\",[2,13.418]],[\"comment/32\",[]],[\"name/33\",[27,33.787]],[\"comment/33\",[]],[\"name/34\",[2,13.418]],[\"comment/34\",[]],[\"name/35\",[28,33.787]],[\"comment/35\",[]],[\"name/36\",[2,13.418]],[\"comment/36\",[]],[\"name/37\",[29,33.787]],[\"comment/37\",[]],[\"name/38\",[2,13.418]],[\"comment/38\",[]],[\"name/39\",[30,33.787]],[\"comment/39\",[]],[\"name/40\",[2,13.418]],[\"comment/40\",[]],[\"name/41\",[31,33.787]],[\"comment/41\",[]],[\"name/42\",[2,13.418]],[\"comment/42\",[]]],\"invertedIndex\":[[\"__type\",{\"_index\":2,\"name\":{\"2\":{},\"8\":{},\"15\":{},\"22\":{},\"29\":{},\"32\":{},\"34\":{},\"36\":{},\"38\":{},\"40\":{},\"42\":{}},\"comment\":{}}],[\"containers\",{\"_index\":25,\"name\":{\"30\":{}},\"comment\":{}}],[\"count\",{\"_index\":14,\"name\":{\"16\":{}},\"comment\":{}}],[\"createcontainers\",{\"_index\":4,\"name\":{\"4\":{}},\"comment\":{}}],[\"duration\",{\"_index\":8,\"name\":{\"9\":{}},\"comment\":{}}],[\"easing\",{\"_index\":10,\"name\":{\"11\":{}},\"comment\":{}}],[\"generatelayers\",{\"_index\":30,\"name\":{\"39\":{}},\"comment\":{}}],[\"getdefaultoptions\",{\"_index\":31,\"name\":{\"41\":{}},\"comment\":{}}],[\"glitch\",{\"_index\":29,\"name\":{\"37\":{}},\"comment\":{}}],[\"glitchableelement\",{\"_index\":23,\"name\":{\"27\":{}},\"comment\":{}}],[\"glitchpartialoptions\",{\"_index\":22,\"name\":{\"26\":{}},\"comment\":{}}],[\"glitchresult\",{\"_index\":24,\"name\":{\"28\":{}},\"comment\":{}}],[\"glitchtimespan\",{\"_index\":11,\"name\":{\"12\":{}},\"comment\":{}}],[\"hideoverflow\",{\"_index\":6,\"name\":{\"6\":{}},\"comment\":{}}],[\"html\",{\"_index\":3,\"name\":{\"3\":{}},\"comment\":{}}],[\"huerotate\",{\"_index\":18,\"name\":{\"20\":{}},\"comment\":{}}],[\"iterations\",{\"_index\":9,\"name\":{\"10\":{}},\"comment\":{}}],[\"layerdefinition\",{\"_index\":19,\"name\":{\"21\":{}},\"comment\":{}}],[\"maxheight\",{\"_index\":17,\"name\":{\"19\":{}},\"comment\":{}}],[\"minheight\",{\"_index\":16,\"name\":{\"18\":{}},\"comment\":{}}],[\"playmode\",{\"_index\":5,\"name\":{\"5\":{}},\"comment\":{}}],[\"playmodes\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}],[\"powerglitch\",{\"_index\":28,\"name\":{\"35\":{}},\"comment\":{}}],[\"powerglitchoptions\",{\"_index\":1,\"name\":{\"1\":{}},\"comment\":{}}],[\"recursivepartial\",{\"_index\":21,\"name\":{\"25\":{}},\"comment\":{}}],[\"shake\",{\"_index\":12,\"name\":{\"13\":{}},\"comment\":{}}],[\"slice\",{\"_index\":13,\"name\":{\"14\":{}},\"comment\":{}}],[\"startglitch\",{\"_index\":26,\"name\":{\"31\":{}},\"comment\":{}}],[\"steps\",{\"_index\":20,\"name\":{\"23\":{}},\"comment\":{}}],[\"stopglitch\",{\"_index\":27,\"name\":{\"33\":{}},\"comment\":{}}],[\"timing\",{\"_index\":7,\"name\":{\"7\":{},\"24\":{}},\"comment\":{}}],[\"velocity\",{\"_index\":15,\"name\":{\"17\":{}},\"comment\":{}}]],\"pipeline\":[]}}"); \ No newline at end of file +window.searchData = JSON.parse("{\"kinds\":{\"32\":\"Variable\",\"1024\":\"Property\",\"65536\":\"Type literal\",\"4194304\":\"Type alias\"},\"rows\":[{\"kind\":4194304,\"name\":\"PlayModes\",\"url\":\"types/PlayModes.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"PowerGlitchOptions\",\"url\":\"types/PowerGlitchOptions.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/PowerGlitchOptions.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"PowerGlitchOptions\"},{\"kind\":1024,\"name\":\"html\",\"url\":\"types/PowerGlitchOptions.html#__type.html\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type\"},{\"kind\":1024,\"name\":\"createContainers\",\"url\":\"types/PowerGlitchOptions.html#__type.createContainers\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type\"},{\"kind\":1024,\"name\":\"playMode\",\"url\":\"types/PowerGlitchOptions.html#__type.playMode\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type\"},{\"kind\":1024,\"name\":\"hideOverflow\",\"url\":\"types/PowerGlitchOptions.html#__type.hideOverflow\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type\"},{\"kind\":1024,\"name\":\"timing\",\"url\":\"types/PowerGlitchOptions.html#__type.timing\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/PowerGlitchOptions.html#__type.__type-1\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type\"},{\"kind\":1024,\"name\":\"duration\",\"url\":\"types/PowerGlitchOptions.html#__type.__type-1.duration\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type.__type\"},{\"kind\":1024,\"name\":\"iterations\",\"url\":\"types/PowerGlitchOptions.html#__type.__type-1.iterations\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type.__type\"},{\"kind\":1024,\"name\":\"easing\",\"url\":\"types/PowerGlitchOptions.html#__type.__type-1.easing\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type.__type\"},{\"kind\":1024,\"name\":\"glitchTimeSpan\",\"url\":\"types/PowerGlitchOptions.html#__type.glitchTimeSpan\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type\"},{\"kind\":1024,\"name\":\"shake\",\"url\":\"types/PowerGlitchOptions.html#__type.shake\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type\"},{\"kind\":1024,\"name\":\"slice\",\"url\":\"types/PowerGlitchOptions.html#__type.slice\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/PowerGlitchOptions.html#__type.__type-2\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type\"},{\"kind\":1024,\"name\":\"count\",\"url\":\"types/PowerGlitchOptions.html#__type.__type-2.count\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type.__type\"},{\"kind\":1024,\"name\":\"velocity\",\"url\":\"types/PowerGlitchOptions.html#__type.__type-2.velocity\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type.__type\"},{\"kind\":1024,\"name\":\"minHeight\",\"url\":\"types/PowerGlitchOptions.html#__type.__type-2.minHeight\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type.__type\"},{\"kind\":1024,\"name\":\"maxHeight\",\"url\":\"types/PowerGlitchOptions.html#__type.__type-2.maxHeight\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type.__type\"},{\"kind\":1024,\"name\":\"hueRotate\",\"url\":\"types/PowerGlitchOptions.html#__type.__type-2.hueRotate\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type.__type\"},{\"kind\":1024,\"name\":\"pulse\",\"url\":\"types/PowerGlitchOptions.html#__type.pulse\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitchOptions.__type\"},{\"kind\":4194304,\"name\":\"LayerDefinition\",\"url\":\"types/LayerDefinition.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/LayerDefinition.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"LayerDefinition\"},{\"kind\":1024,\"name\":\"steps\",\"url\":\"types/LayerDefinition.html#__type.steps\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"LayerDefinition.__type\"},{\"kind\":1024,\"name\":\"timing\",\"url\":\"types/LayerDefinition.html#__type.timing\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"LayerDefinition.__type\"},{\"kind\":4194304,\"name\":\"RecursivePartial\",\"url\":\"types/RecursivePartial.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"GlitchPartialOptions\",\"url\":\"types/GlitchPartialOptions.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"GlitchableElement\",\"url\":\"types/GlitchableElement.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"GlitchResult\",\"url\":\"types/GlitchResult.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/GlitchResult.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"GlitchResult\"},{\"kind\":1024,\"name\":\"containers\",\"url\":\"types/GlitchResult.html#__type.containers\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"GlitchResult.__type\"},{\"kind\":1024,\"name\":\"startGlitch\",\"url\":\"types/GlitchResult.html#__type.startGlitch\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"GlitchResult.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/GlitchResult.html#__type.__type-1\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"GlitchResult.__type\"},{\"kind\":1024,\"name\":\"stopGlitch\",\"url\":\"types/GlitchResult.html#__type.stopGlitch\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"GlitchResult.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/GlitchResult.html#__type.__type-3\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"GlitchResult.__type\"},{\"kind\":32,\"name\":\"PowerGlitch\",\"url\":\"variables/PowerGlitch.html\",\"classes\":\"tsd-kind-variable\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"variables/PowerGlitch.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-variable\",\"parent\":\"PowerGlitch\"},{\"kind\":1024,\"name\":\"glitch\",\"url\":\"variables/PowerGlitch.html#__type.glitch\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitch.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"variables/PowerGlitch.html#__type.__type-1\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitch.__type\"},{\"kind\":1024,\"name\":\"generateLayers\",\"url\":\"variables/PowerGlitch.html#__type.generateLayers\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitch.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"variables/PowerGlitch.html#__type.__type-3\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitch.__type\"},{\"kind\":1024,\"name\":\"getDefaultOptions\",\"url\":\"variables/PowerGlitch.html#__type.getDefaultOptions\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitch.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"variables/PowerGlitch.html#__type.__type-5\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"PowerGlitch.__type\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,34.012]],[\"comment/0\",[]],[\"name/1\",[1,34.012]],[\"comment/1\",[]],[\"name/2\",[2,13.643]],[\"comment/2\",[]],[\"name/3\",[3,34.012]],[\"comment/3\",[]],[\"name/4\",[4,34.012]],[\"comment/4\",[]],[\"name/5\",[5,34.012]],[\"comment/5\",[]],[\"name/6\",[6,34.012]],[\"comment/6\",[]],[\"name/7\",[7,28.904]],[\"comment/7\",[]],[\"name/8\",[2,13.643]],[\"comment/8\",[]],[\"name/9\",[8,34.012]],[\"comment/9\",[]],[\"name/10\",[9,34.012]],[\"comment/10\",[]],[\"name/11\",[10,34.012]],[\"comment/11\",[]],[\"name/12\",[11,34.012]],[\"comment/12\",[]],[\"name/13\",[12,34.012]],[\"comment/13\",[]],[\"name/14\",[13,34.012]],[\"comment/14\",[]],[\"name/15\",[2,13.643]],[\"comment/15\",[]],[\"name/16\",[14,34.012]],[\"comment/16\",[]],[\"name/17\",[15,34.012]],[\"comment/17\",[]],[\"name/18\",[16,34.012]],[\"comment/18\",[]],[\"name/19\",[17,34.012]],[\"comment/19\",[]],[\"name/20\",[18,34.012]],[\"comment/20\",[]],[\"name/21\",[19,34.012]],[\"comment/21\",[]],[\"name/22\",[20,34.012]],[\"comment/22\",[]],[\"name/23\",[2,13.643]],[\"comment/23\",[]],[\"name/24\",[21,34.012]],[\"comment/24\",[]],[\"name/25\",[7,28.904]],[\"comment/25\",[]],[\"name/26\",[22,34.012]],[\"comment/26\",[]],[\"name/27\",[23,34.012]],[\"comment/27\",[]],[\"name/28\",[24,34.012]],[\"comment/28\",[]],[\"name/29\",[25,34.012]],[\"comment/29\",[]],[\"name/30\",[2,13.643]],[\"comment/30\",[]],[\"name/31\",[26,34.012]],[\"comment/31\",[]],[\"name/32\",[27,34.012]],[\"comment/32\",[]],[\"name/33\",[2,13.643]],[\"comment/33\",[]],[\"name/34\",[28,34.012]],[\"comment/34\",[]],[\"name/35\",[2,13.643]],[\"comment/35\",[]],[\"name/36\",[29,34.012]],[\"comment/36\",[]],[\"name/37\",[2,13.643]],[\"comment/37\",[]],[\"name/38\",[30,34.012]],[\"comment/38\",[]],[\"name/39\",[2,13.643]],[\"comment/39\",[]],[\"name/40\",[31,34.012]],[\"comment/40\",[]],[\"name/41\",[2,13.643]],[\"comment/41\",[]],[\"name/42\",[32,34.012]],[\"comment/42\",[]],[\"name/43\",[2,13.643]],[\"comment/43\",[]]],\"invertedIndex\":[[\"__type\",{\"_index\":2,\"name\":{\"2\":{},\"8\":{},\"15\":{},\"23\":{},\"30\":{},\"33\":{},\"35\":{},\"37\":{},\"39\":{},\"41\":{},\"43\":{}},\"comment\":{}}],[\"containers\",{\"_index\":26,\"name\":{\"31\":{}},\"comment\":{}}],[\"count\",{\"_index\":14,\"name\":{\"16\":{}},\"comment\":{}}],[\"createcontainers\",{\"_index\":4,\"name\":{\"4\":{}},\"comment\":{}}],[\"duration\",{\"_index\":8,\"name\":{\"9\":{}},\"comment\":{}}],[\"easing\",{\"_index\":10,\"name\":{\"11\":{}},\"comment\":{}}],[\"generatelayers\",{\"_index\":31,\"name\":{\"40\":{}},\"comment\":{}}],[\"getdefaultoptions\",{\"_index\":32,\"name\":{\"42\":{}},\"comment\":{}}],[\"glitch\",{\"_index\":30,\"name\":{\"38\":{}},\"comment\":{}}],[\"glitchableelement\",{\"_index\":24,\"name\":{\"28\":{}},\"comment\":{}}],[\"glitchpartialoptions\",{\"_index\":23,\"name\":{\"27\":{}},\"comment\":{}}],[\"glitchresult\",{\"_index\":25,\"name\":{\"29\":{}},\"comment\":{}}],[\"glitchtimespan\",{\"_index\":11,\"name\":{\"12\":{}},\"comment\":{}}],[\"hideoverflow\",{\"_index\":6,\"name\":{\"6\":{}},\"comment\":{}}],[\"html\",{\"_index\":3,\"name\":{\"3\":{}},\"comment\":{}}],[\"huerotate\",{\"_index\":18,\"name\":{\"20\":{}},\"comment\":{}}],[\"iterations\",{\"_index\":9,\"name\":{\"10\":{}},\"comment\":{}}],[\"layerdefinition\",{\"_index\":20,\"name\":{\"22\":{}},\"comment\":{}}],[\"maxheight\",{\"_index\":17,\"name\":{\"19\":{}},\"comment\":{}}],[\"minheight\",{\"_index\":16,\"name\":{\"18\":{}},\"comment\":{}}],[\"playmode\",{\"_index\":5,\"name\":{\"5\":{}},\"comment\":{}}],[\"playmodes\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}],[\"powerglitch\",{\"_index\":29,\"name\":{\"36\":{}},\"comment\":{}}],[\"powerglitchoptions\",{\"_index\":1,\"name\":{\"1\":{}},\"comment\":{}}],[\"pulse\",{\"_index\":19,\"name\":{\"21\":{}},\"comment\":{}}],[\"recursivepartial\",{\"_index\":22,\"name\":{\"26\":{}},\"comment\":{}}],[\"shake\",{\"_index\":12,\"name\":{\"13\":{}},\"comment\":{}}],[\"slice\",{\"_index\":13,\"name\":{\"14\":{}},\"comment\":{}}],[\"startglitch\",{\"_index\":27,\"name\":{\"32\":{}},\"comment\":{}}],[\"steps\",{\"_index\":21,\"name\":{\"24\":{}},\"comment\":{}}],[\"stopglitch\",{\"_index\":28,\"name\":{\"34\":{}},\"comment\":{}}],[\"timing\",{\"_index\":7,\"name\":{\"7\":{},\"25\":{}},\"comment\":{}}],[\"velocity\",{\"_index\":15,\"name\":{\"17\":{}},\"comment\":{}}]],\"pipeline\":[]}}"); \ No newline at end of file diff --git a/docs/api-docs/index.html b/docs/api-docs/index.html index ce75be9..58c8494 100644 --- a/docs/api-docs/index.html +++ b/docs/api-docs/index.html @@ -64,7 +64,8 @@

Useful links

Integrations

diff --git a/docs/api-docs/types/GlitchPartialOptions.html b/docs/api-docs/types/GlitchPartialOptions.html index aa2c6e1..8626a62 100644 --- a/docs/api-docs/types/GlitchPartialOptions.html +++ b/docs/api-docs/types/GlitchPartialOptions.html @@ -17,7 +17,7 @@

Type alias GlitchPartialOptions

Options given to the glitch method

+
  • Defined in index.ts:531
  • +
  • Defined in index.ts:541
  • +
  • Defined in index.ts:536
  • +
  • Defined in index.ts:155
  • +
  • Defined in index.ts:9
  • +
  • +
    pulse: false | { scale: number }
    +

    Pulse layer adds a pulsing effect to the glitch.

    +
  • +
  • Defined in index.ts:14
  • +
  • Defined in index.ts:594
  • Options given to the glitch method

    +
  • Defined in index.ts:518
  • +
  • Defined in index.ts:528
  • +
  • Defined in index.ts:523
  • +
  • Defined in index.ts:155
  • +
  • Defined in index.ts:9
  • +
  • Defined in index.ts:14
  • +
  • Defined in index.ts:581
  • +
  • Defined in index.ts:524
  • +
  • Defined in index.ts:519
  • +
  • Defined in index.ts:155
  • +
  • Defined in index.ts:9
  • +
  • Defined in index.ts:14
  • +
  • Defined in index.ts:577