This commit is contained in:
杜恒 2021-03-04 12:53:13 +08:00
parent 261ea75aa0
commit 6445143f90
11 changed files with 20 additions and 6 deletions

View File

@ -0,0 +1 @@
$(function(){function t(t){function i(t){d=document.createElement("canvas"),f=d.getContext("2d"),d.style.top="0px",d.style.left="0px",d.style.pointerEvents="none",r?(d.style.position="absolute",u.appendChild(d),d.width=u.clientWidth,d.height=u.clientHeight):(d.style.position="fixed",document.body.appendChild(d),d.width=p,d.height=y),e(),a()}function e(){u.addEventListener("mousemove",h),u.addEventListener("touchmove",o),u.addEventListener("touchstart",o),window.addEventListener("resize",n)}function n(t){p=window.innerWidth,y=window.innerHeight,r?(d.width=u.clientWidth,d.height=u.clientHeight):(d.width=p,d.height=y)}function o(t){if(t.touches.length>0)for(let i=0;i<t.touches.length;i++)s(t.touches[i].clientX,t.touches[i].clientY,w[Math.floor(Math.random()*w.length)])}function h(t){if(r){const i=u.getBoundingClientRect();m.x=t.clientX-i.left,m.y=t.clientY-i.top}else m.x=t.clientX,m.y=t.clientY;s(m.x,m.y)}function s(t,i,e){g.push(new c(t,i,e))}function l(){f.clearRect(0,0,p,y);for(let t=0;t<g.length;t++)g[t].update(f);for(let t=g.length-1;t>=0;t--)g[t].lifeSpan<0&&g.splice(t,1)}function a(){l(),requestAnimationFrame(a)}function c(t,i,e){const n=Math.floor(60*Math.random()+60);this.initialLifeSpan=n,this.lifeSpan=n,this.velocity={x:(Math.random()<.5?-1:1)*(Math.random()/10),y:-1*Math.random()-.4},this.position={x:t,y:i},this.canv=e,this.baseDimension=4,this.update=function(t){this.position.x+=this.velocity.x,this.position.y+=this.velocity.y,this.velocity.x+=2*(Math.random()<.5?-1:1)/75,this.velocity.y-=Math.random()/600,this.lifeSpan--;const i=.2+(this.initialLifeSpan-this.lifeSpan)/this.initialLifeSpan;t.fillStyle="#e6f1f7",t.strokeStyle="#3a92c5",t.beginPath(),t.arc(this.position.x-this.baseDimension/2*i,this.position.y-this.baseDimension/2,this.baseDimension*i,0,2*Math.PI),t.stroke(),t.fill(),t.closePath()}}let d,f,r=t&&t.element,u=r||document.body,p=window.innerWidth,y=window.innerHeight,m={x:p/2,y:p/2},g=[],w=[];i()}new t});

View File

@ -0,0 +1 @@
$(function(){function t(t){function e(){d=document.createElement("canvas"),r=d.getContext("2d"),d.style.top="0px",d.style.left="0px",d.style.pointerEvents="none",f?(d.style.position="absolute",u.appendChild(d),d.width=u.clientWidth,d.height=u.clientHeight):(d.style.position="fixed",document.body.appendChild(d),d.width=x,d.height=g),r.font="12px serif",r.textBaseline="middle",r.textAlign="center",p.forEach(t=>{let e=r.measureText(t),i=document.createElement("canvas"),n=i.getContext("2d");i.width=e.width,i.height=2*e.actualBoundingBoxAscent,n.textAlign="center",n.font="12px serif",n.textBaseline="middle",n.fillText(t,i.width/2,e.actualBoundingBoxAscent),w.push(i)}),i(),l()}function i(){u.addEventListener("mousemove",h),u.addEventListener("touchmove",o),u.addEventListener("touchstart",o),window.addEventListener("resize",n)}function n(t){x=window.innerWidth,g=window.innerHeight,f?(d.width=u.clientWidth,d.height=u.clientHeight):(d.width=x,d.height=g)}function o(t){if(t.touches.length>0)for(let e=0;e<t.touches.length;e++)a(t.touches[e].clientX,t.touches[e].clientY,w[Math.floor(Math.random()*w.length)])}function h(t){if(f){const e=u.getBoundingClientRect();m.x=t.clientX-e.left,m.y=t.clientY-e.top}else m.x=t.clientX,m.y=t.clientY;a(m.x,m.y,w[Math.floor(Math.random()*p.length)])}function a(t,e,i){y.push(new c(t,e,i))}function s(){r.clearRect(0,0,x,g);for(let t=0;t<y.length;t++)y[t].update(r);for(let t=y.length-1;t>=0;t--)y[t].lifeSpan<0&&y.splice(t,1)}function l(){s(),requestAnimationFrame(l)}function c(t,e,i){const n=Math.floor(60*Math.random()+80);this.initialLifeSpan=n,this.lifeSpan=n,this.velocity={x:(Math.random()<.5?-1:1)*(Math.random()/2),y:1+Math.random()},this.position={x:t,y:e},this.canv=i,this.update=function(t){this.position.x+=this.velocity.x,this.position.y+=this.velocity.y,this.lifeSpan--,this.velocity.x+=2*(Math.random()<.5?-1:1)/75,this.velocity.y-=Math.random()/300;const e=Math.max(this.lifeSpan/this.initialLifeSpan,0),i=2*this.lifeSpan,n=.0174533*i;t.translate(this.position.x,this.position.y),t.rotate(n),t.drawImage(this.canv,-this.canv.width/2*e,-this.canv.height/2,this.canv.width*e,this.canv.height*e),t.rotate(-n),t.translate(-this.position.x,-this.position.y)}}let d,r,f=t&&t.element,u=f||document.body,p=["❄️"],x=window.innerWidth,g=window.innerHeight,m={x:x/2,y:x/2},y=[],w=[];e()}new t});

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
"use strict";!(function(e,t,a){function r(){for(var e=0;e<i.length;e++){i[e].alpha<=0?(t.body.removeChild(i[e].el),i.splice(e,1)):(i[e].y--,(i[e].scale+=0.004),(i[e].alpha-=0.013),(i[e].el.style.cssText="left:"+i[e].x+"px;top:"+i[e].y+"px;opacity:"+i[e].alpha+";transform:scale("+i[e].scale+","+i[e].scale+") rotate(45deg);background:"+i[e].color+";z-index:5201314"))}requestAnimationFrame(r)}function n(e){var a=t.createElement("div");(a.className="heart"),i.push({el:a,x:e.clientX-5,y:e.clientY-5,scale:1,alpha:1,color:o()}),t.body.appendChild(a)}function o(){return"rgb("+~~(255*Math.random())+","+~~(255*Math.random())+","+~~(255*Math.random())+")"}var i=[];(e.requestAnimationFrame=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,1000/60)}),(function(e){var a=t.createElement("style");a.type="text/css";try{a.appendChild(t.createTextNode(e))}catch(t){a.styleSheet.cssText=e}t.getElementsByTagName("head")[0].appendChild(a)})(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"),(function(){var t="function"==typeof e.onclick&&e.onclick;e.onclick=function(e){t&&t(),n(e)}})(),r()})(window,document);
$(function(){"use strict";!function(e,t,a){function n(){for(var e=0;e<i.length;e++)i[e].alpha<=0?(t.body.removeChild(i[e].el),i.splice(e,1)):(i[e].y--,i[e].scale+=.004,i[e].alpha-=.013,i[e].el.style.cssText="left:"+i[e].x+"px;top:"+i[e].y+"px;opacity:"+i[e].alpha+";transform:scale("+i[e].scale+","+i[e].scale+") rotate(45deg);background:"+i[e].color+";z-index:5201314");requestAnimationFrame(n)}function r(e){var a=t.createElement("div");a.className="heart",i.push({el:a,x:e.clientX-5,y:e.clientY-5,scale:1,alpha:1,color:o()}),t.body.appendChild(a)}function o(){return"rgb("+~~(255*Math.random())+","+~~(255*Math.random())+","+~~(255*Math.random())+")"}var i=[];e.requestAnimationFrame=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)},function(e){var a=t.createElement("style");a.type="text/css";try{a.appendChild(t.createTextNode(e))}catch(t){a.styleSheet.cssText=e}t.getElementsByTagName("head")[0].appendChild(a)}(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"),function(){var t="function"==typeof e.onclick&&e.onclick;e.onclick=function(e){t&&t(),r(e)}}(),n()}(window,document)});

1
assets/cursor/cursor5.js Normal file
View File

@ -0,0 +1 @@
$(function(){var e=0,t=document.getElementsByTagName("html")[0],a=document.getElementsByTagName("body")[0];t.onclick=function(t){var n=document.createElement("b");n.style.color="#E94F06",n.style.zIndex=5201314,n.style.position="absolute",n.style.select="none";var r=t.pageX,s=t.pageY;switch(n.style.left=r-10+"px",n.style.top=s-20+"px",clearInterval(c),++e){case 10:n.innerText="OωO";break;case 20:n.innerText="(๑•́ ∀ •̀๑)";break;case 30:n.innerText="(๑•́ ₃ •̀๑)";break;case 40:n.innerText="(๑•̀_•́๑)";break;case 50:n.innerText="( ̄へ ̄)";break;case 60:n.innerText="(╯°口°)╯(┴—┴";break;case 70:n.innerText="૮( ᵒ̌皿ᵒ̌ )ა";break;case 80:n.innerText="╮(。>口<。)╭";break;case 90:n.innerText="( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃";break;case 100:case 101:case 102:case 103:case 104:case 105:n.innerText="(ꐦ°᷄д°᷅)";break;default:n.innerText="❤"}n.style.fontSize=10*Math.random()+8+"px";var c,l=0;setTimeout(function(){c=setInterval(function(){150==++l&&(clearInterval(c),a.removeChild(n)),n.style.top=s-20-l+"px",n.style.opacity=(150-l)/120},8)},70),a.appendChild(n)}});

1
assets/cursor/cursor6.js Normal file
View File

@ -0,0 +1 @@
$(function(){function t(t){function e(){w=document.createElement("canvas"),v=w.getContext("2d"),w.style.top="0px",w.style.left="0px",w.style.pointerEvents="none",r?(w.style.position="absolute",u.appendChild(w),w.width=u.clientWidth,w.height=u.clientHeight):(w.style.position="fixed",u.appendChild(w),w.width=f,w.height=x),v.font="21px serif",v.textBaseline="middle",v.textAlign="center",d.forEach(t=>{let e=v.measureText(B),i=document.createElement("canvas"),n=i.getContext("2d");i.width=e.width,i.height=e.actualBoundingBoxAscent+e.actualBoundingBoxDescent,n.fillStyle=t,n.textAlign="center",n.font="21px serif",n.textBaseline="middle",n.fillText(B,i.width/2,e.actualBoundingBoxAscent),m.push(i)}),i(),a()}function i(){u.addEventListener("mousemove",h),u.addEventListener("touchmove",o),u.addEventListener("touchstart",o),window.addEventListener("resize",n)}function n(t){f=window.innerWidth,x=window.innerHeight,r?(w.width=u.clientWidth,w.height=u.clientHeight):(w.width=f,w.height=x)}function o(t){if(t.touches.length>0)for(let e=0;e<t.touches.length;e++)s(t.touches[e].clientX,t.touches[e].clientY,m[Math.floor(Math.random()*m.length)])}function h(t){window.requestAnimationFrame(()=>{if(r){const e=u.getBoundingClientRect();p.x=t.clientX-e.left,p.y=t.clientY-e.top}else p.x=t.clientX,p.y=t.clientY;const e=Math.hypot(p.x-g.x,p.y-g.y);e>1.5&&(s(p.x,p.y,m[Math.floor(Math.random()*d.length)]),g.x=p.x,g.y=p.y)})}function s(t,e,i){y.push(new c(t,e,i))}function l(){v.clearRect(0,0,f,x);for(let t=0;t<y.length;t++)y[t].update(v);for(let t=y.length-1;t>=0;t--)y[t].lifeSpan<0&&y.splice(t,1)}function a(){l(),requestAnimationFrame(a)}function c(t,e,i){const n=Math.floor(30*Math.random()+60);this.initialLifeSpan=n,this.lifeSpan=n,this.velocity={x:(Math.random()<.5?-1:1)*(Math.random()/2),y:.7*Math.random()+.9},this.position={x:t,y:e},this.canv=i,this.update=function(t){this.position.x+=this.velocity.x,this.position.y+=this.velocity.y,this.lifeSpan--,this.velocity.y+=.02;const e=Math.max(this.lifeSpan/this.initialLifeSpan,0);t.drawImage(this.canv,this.position.x-this.canv.width/2*e,this.position.y-this.canv.height/2,this.canv.width*e,this.canv.height*e)}}let d=t&&t.colors||["#D61C59","#E7D84B","#1B8798"],r=t&&t.element,u=r||document.body,f=window.innerWidth,x=window.innerHeight;const p={x:f/2,y:f/2},g={x:f/2,y:f/2},y=[],m=[];let w,v;const B="*";e()}new t});

1
assets/cursor/cursor7.js Normal file
View File

@ -0,0 +1 @@
$(function(){function A(A){function t(){d=document.createElement("canvas"),a=d.getContext("2d"),d.style.top="0px",d.style.left="0px",d.style.pointerEvents="none",s?(d.style.position="absolute",p.appendChild(d),d.width=p.clientWidth,d.height=p.clientHeight):(d.style.position="fixed",document.body.appendChild(d),d.width=u,d.height=m),e(),c()}function e(){p.addEventListener("mousemove",o),p.addEventListener("touchmove",n),p.addEventListener("touchstart",n),window.addEventListener("resize",i)}function i(A){u=window.innerWidth,m=window.innerHeight,s?(d.width=p.clientWidth,d.height=p.clientHeight):(d.width=u,d.height=m)}function n(A){if(A.touches.length>0)for(let t=0;t<A.touches.length;t++)g(A.touches[t].clientX,A.touches[t].clientY,C)}function o(A){if(s){const t=p.getBoundingClientRect();E.x=A.clientX-t.left,E.y=A.clientY-t.top}else E.x=A.clientX,E.y=A.clientY;g(E.x,E.y,C)}function g(A,t,e){w.push(new l(A,t,e))}function h(){a.clearRect(0,0,u,m);for(let A=0;A<w.length;A++)w[A].update(a);for(let A=w.length-1;A>=0;A--)w[A].lifeSpan<0&&w.splice(A,1)}function c(){h(),requestAnimationFrame(c)}function l(A,t,e){const i=40;this.initialLifeSpan=i,this.lifeSpan=i,this.position={x:A,y:t},this.image=e,this.update=function(A){this.lifeSpan--;const t=Math.max(this.lifeSpan/this.initialLifeSpan,0);A.globalAlpha=t,A.drawImage(this.image,this.position.x,this.position.y)}}let d,a,s=A&&A.element,p=s||document.body,u=window.innerWidth,m=window.innerHeight,E={x:u/2,y:u/2},w=[],C=new Image;C.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAATCAYAAACk9eypAAAAAXNSR0IArs4c6QAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAhGVYSWZNTQAqAAAACAAFARIAAwAAAAEAAQAAARoABQAAAAEAAABKARsABQAAAAEAAABSASgAAwAAAAEAAgAAh2kABAAAAAEAAABaAAAAAAAAAEgAAAABAAAASAAAAAEAA6ABAAMAAAABAAEAAKACAAQAAAABAAAADKADAAQAAAABAAAAEwAAAAAChpcNAAAACXBIWXMAAAsTAAALEwEAmpwYAAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgpMwidZAAABqElEQVQoFY3SPUvDQBgH8BREpRHExYiDgmLFl6WC+AYmWeyLg4i7buJX8DMpOujgyxGvUYeCgzhUQUSKKLUS0+ZyptXh8Z5Ti621ekPyJHl+uftfomhaf9Ei5JyxXKfynyEA6EYcLHpwyflT958GAQ7DTABNHd8EbtDbEH2BD5QEQmi2mM8P/Iq+A0SzszEg+3sPjDnDdVEtQKQbMUidHD3xVzf6A9UDEmEm+8h9KTqTVUjT+vB53aHrCbAPiceYq1dQI1Aqv4EhMll0jzv+Y0yiRgCnLRSYyDQHVoqUXe4uKL9l+L7GXC4vkMhE6eW/AOJs9k583ORDUyXMZ8F5SVHVVnllmPNKSFagAJ5DofaqGXw/gHBYg51dIldkmknY3tguv3jOtHR4+MqAzaraJXbEhqHhcQlwGSOi5pytVQHZLN5s0WNe8HPrLYlFsO20RPHkImxsbmHdLJFI76th7Z4SeuF53hTeFLvhRCJRCTKZKxgdnRDbW+iozFJbBMw14/ElwGYc0egMBMFzT21f5Rog33Z7dX02GBm7WV5ZfT5Nn5bE3zuCDe9UxdTpNvK+5AAAAABJRU5ErkJggg==",t()}new A});

1
assets/cursor/cursor8.js Normal file
View File

@ -0,0 +1 @@
$(function(){function t(t){function e(){a=document.createElement("canvas"),v=a.getContext("2d"),a.style.top="0px",a.style.left="0px",a.style.pointerEvents="none",w?(a.style.position="absolute",f.appendChild(a),a.width=f.clientWidth,a.height=f.clientHeight):(a.style.position="fixed",document.body.appendChild(a),a.width=M,a.height=W),v.font="16px serif",v.textBaseline="middle",v.textAlign="center";let i=v.measureText(p),t=document.createElement("canvas"),e=t.getContext("2d");t.width=i.width,t.height=2*i.actualBoundingBoxAscent,e.textAlign="center",e.font="16px serif",e.textBaseline="middle",e.fillText(p,t.width/2,i.actualBoundingBoxAscent),u=t;let o=0;for(o=0;o<r;o++)q[o]=new x(u);n(),h()}function n(){f.addEventListener("mousemove",l),f.addEventListener("touchmove",c),f.addEventListener("touchstart",c),window.addEventListener("resize",o)}function o(i){M=window.innerWidth,W=window.innerHeight,w?(a.width=f.clientWidth,a.height=f.clientHeight):(a.width=M,a.height=W)}function c(i){if(i.touches.length>0)if(w){const t=f.getBoundingClientRect();L.x=i.touches[0].clientX-t.left,L.y=i.touches[0].clientY-t.top}else L.x=i.touches[0].clientX,L.y=i.touches[0].clientY}function l(i){if(w){const t=f.getBoundingClientRect();L.x=i.clientX-t.left,L.y=i.clientY-t.top}else L.x=i.clientX,L.y=i.clientY}function s(){for(a.width=a.width,q[0].position.x=L.x,q[0].position.y=L.y,i=1;i<r;i++){let t=new d(0,0);i>0&&y(i-1,i,t),i<r-1&&y(i+1,i,t);let e,n,o=new d(-q[i].velocity.x*b,-q[i].velocity.y*b),c=new d((t.X+o.X)/Y,(t.Y+o.Y)/Y+B);q[i].velocity.x+=g*c.X,q[i].velocity.y+=g*c.Y,Math.abs(q[i].velocity.x)<E&&Math.abs(q[i].velocity.y)<E&&Math.abs(c.X)<C&&Math.abs(c.Y)<C&&(q[i].velocity.x=0,q[i].velocity.y=0),q[i].position.x+=q[i].velocity.x,q[i].position.y+=q[i].velocity.y,e=a.clientHeight,n=a.clientWidth,q[i].position.y>=e-A-1&&(q[i].velocity.y>0&&(q[i].velocity.y=H*-q[i].velocity.y),q[i].position.y=e-A-1),q[i].position.x>=n-A&&(q[i].velocity.x>0&&(q[i].velocity.x=H*-q[i].velocity.x),q[i].position.x=n-A-1),q[i].position.x<0&&(q[i].velocity.x<0&&(q[i].velocity.x=H*-q[i].velocity.x),q[i].position.x=0),q[i].draw(v)}}function h(){s(),requestAnimationFrame(h)}function d(i,t){this.X=i,this.Y=t}function y(i,t,e){let n=q[i].position.x-q[t].position.x,o=q[i].position.y-q[t].position.y,c=Math.sqrt(n*n+o*o);if(c>m){let i=X*(c-m);e.X+=n/c*i,e.Y+=o/c*i}}function x(i){this.position={x:L.x,y:L.y},this.velocity={x:0,y:0},this.canv=i,this.draw=function(i){i.drawImage(this.canv,this.position.x-this.canv.width/2,this.position.y-this.canv.height/2,this.canv.width,this.canv.height)}}let a,v,u,p=t&&t.emoji||"🤪",w=t&&t.element,f=w||document.body,r=7,g=.01,m=10,X=10,Y=1,B=50,b=10,E=.1,C=.1,A=11,H=.7,M=window.innerWidth,W=window.innerHeight,L={x:M/2,y:M/2},q=[];e()}new t});

1
assets/cursor/cursor9.js Normal file
View File

@ -0,0 +1 @@
$(function(){function t(t){function e(){v=document.createElement("canvas"),M=v.getContext("2d"),v.style.top="0px",v.style.left="0px",v.style.pointerEvents="none",r?(v.style.position="absolute",u.appendChild(v),v.width=u.clientWidth,v.height=u.clientHeight):(v.style.position="fixed",document.body.appendChild(v),v.width=f,v.height=p),M.font="21px serif",M.textBaseline="middle",M.textAlign="center",d.forEach(t=>{let e=M.measureText(t),i=document.createElement("canvas"),n=i.getContext("2d");i.width=e.width,i.height=2*e.actualBoundingBoxAscent,n.textAlign="center",n.font="21px serif",n.textBaseline="middle",n.fillText(t,i.width/2,e.actualBoundingBoxAscent),w.push(i)}),i(),c()}function i(){u.addEventListener("mousemove",h,{passive:!0}),u.addEventListener("touchmove",o,{passive:!0}),u.addEventListener("touchstart",o,{passive:!0}),window.addEventListener("resize",n)}function n(t){f=window.innerWidth,p=window.innerHeight,r?(v.width=u.clientWidth,v.height=u.clientHeight):(v.width=f,v.height=p)}function o(t){if(t.touches.length>0)for(let e=0;e<t.touches.length;e++)s(t.touches[e].clientX,t.touches[e].clientY,w[Math.floor(Math.random()*w.length)])}function h(t){t.timeStamp-y<16||window.requestAnimationFrame(()=>{if(r){const e=u.getBoundingClientRect();m.x=t.clientX-e.left,m.y=t.clientY-e.top}else m.x=t.clientX,m.y=t.clientY;const e=Math.hypot(m.x-x.x,m.y-x.y);e>1&&(s(m.x,m.y,w[Math.floor(Math.random()*d.length)]),x.x=m.x,x.y=m.y,y=t.timeStamp)})}function s(t,e,i){g.push(new l(t,e,i))}function a(){M.clearRect(0,0,f,p);for(let t=0;t<g.length;t++)g[t].update(M);for(let t=g.length-1;t>=0;t--)g[t].lifeSpan<0&&g.splice(t,1)}function c(){a(),requestAnimationFrame(c)}function l(t,e,i){const n=Math.floor(60*Math.random()+80);this.initialLifeSpan=n,this.lifeSpan=n,this.velocity={x:(Math.random()<.5?-1:1)*(Math.random()/2),y:.4*Math.random()+.8},this.position={x:t,y:e},this.canv=i,this.update=function(t){this.position.x+=this.velocity.x,this.position.y+=this.velocity.y,this.lifeSpan--,this.velocity.y+=.05;const e=Math.max(this.lifeSpan/this.initialLifeSpan,0);t.drawImage(this.canv,this.position.x-this.canv.width/2*e,this.position.y-this.canv.height/2,this.canv.width*e,this.canv.height*e)}}const d=t&&t.emoji||["😀","😂","😆","😊"];let r=t&&t.element,u=r||document.body,f=window.innerWidth,p=window.innerHeight;const m={x:f/2,y:f/2},x={x:f/2,y:f/2};let y=0;const g=[],w=[];let v,M;e()}new t});

View File

@ -3,7 +3,7 @@
/* 获取主题当前版本号 */
function _getVersion()
{
return "5.5.4";
return "5.5.5";
};
/* 判断是否是手机 */

View File

@ -261,11 +261,18 @@ function themeConfig($form)
'cursor1.js' => '效果1',
'cursor2.js' => '效果2',
'cursor3.js' => '效果3',
'cursor4.js' => '效果4'
'cursor4.js' => '效果4',
'cursor5.js' => '效果5',
'cursor6.js' => '效果6',
'cursor7.js' => '效果7',
'cursor8.js' => '效果8',
'cursor9.js' => '效果9',
'cursor10.js' => '效果10',
'cursor11.js' => '效果11',
),
'off',
'选择页面点击特效',
'介绍:用于开启炫酷的页面点击特效'
'选择鼠标特效',
'介绍:用于开启炫酷的鼠标特效'
);
$JCursorEffects->setAttribute('class', 'joe_content joe_global');
$form->addInput($JCursorEffects->multiMode());