From 6445143f90c54a79c8bd1ea4b1ff9098cbed36c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E6=81=92?= <2323333339@qq.com> Date: Thu, 4 Mar 2021 12:53:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/cursor/cursor10.js | 1 + assets/cursor/cursor11.js | 1 + assets/cursor/cursor2.js | 2 +- assets/cursor/cursor4.js | 2 +- assets/cursor/cursor5.js | 1 + assets/cursor/cursor6.js | 1 + assets/cursor/cursor7.js | 1 + assets/cursor/cursor8.js | 1 + assets/cursor/cursor9.js | 1 + core/function.php | 2 +- functions.php | 13 ++++++++++--- 11 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 assets/cursor/cursor10.js create mode 100644 assets/cursor/cursor11.js create mode 100644 assets/cursor/cursor5.js create mode 100644 assets/cursor/cursor6.js create mode 100644 assets/cursor/cursor7.js create mode 100644 assets/cursor/cursor8.js create mode 100644 assets/cursor/cursor9.js diff --git a/assets/cursor/cursor10.js b/assets/cursor/cursor10.js new file mode 100644 index 0000000..1e8c64c --- /dev/null +++ b/assets/cursor/cursor10.js @@ -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=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}); \ No newline at end of file diff --git a/assets/cursor/cursor11.js b/assets/cursor/cursor11.js new file mode 100644 index 0000000..175479c --- /dev/null +++ b/assets/cursor/cursor11.js @@ -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=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}); \ No newline at end of file diff --git a/assets/cursor/cursor2.js b/assets/cursor/cursor2.js index 8190090..48db3b2 100644 --- a/assets/cursor/cursor2.js +++ b/assets/cursor/cursor2.js @@ -1 +1 @@ -let Sketch=(function(){'use strict';let dom=document.createElement('div');dom.setAttribute('id','clickCanvas');dom.style.cssText='position:fixed;left:0;top:0;z-index:5201314;pointer-events:none;';document.body.appendChild(dom);function e(e){return'[object Array]'==Object.prototype.toString.call(e)}function t(e){return'function'==typeof e}function n(e){return'number'==typeof e}function o(e){return'string'==typeof e}function r(e){return E[e]||String.fromCharCode(e)}function i(e,t,n){for(var o in t)(n||!e.hasOwnProperty(o))&&(e[o]=t[o]);return e}function u(e,t){return function(){e.apply(t,arguments)}}function a(e){var n={};for(var o in e)n[o]=t(e[o])?u(e[o],e):e[o];return n}function c(e){function n(n){t(n)&&n.apply(e,[].splice.call(arguments,1))}function u(e){for(_=0;_0.5},draw:function(ctx){ctx.beginPath();ctx.arc(this.x,this.y,this.radius,0,TWO_PI);ctx.fillStyle=this.color;ctx.fill()}};var MAX_PARTICLES=50;var COLOURS=['#5ee4ff','#f44033','#ffeb3b','#F38630','#FA6900','#f403e8','#F9D423'];var particles=[];var pool=[];var clickparticle=Sketch.create({container:document.getElementById('clickCanvas')});clickparticle.spawn=function(x,y){if(particles.length>=MAX_PARTICLES)pool.push(particles.shift());particle=pool.length?pool.pop():new Particle();particle.init(x,y,random(5,20));particle.wander=random(0.5,2.0);particle.color=random(COLOURS);particle.drag=random(0.9,0.99);theta=random(TWO_PI);force=random(1,5);particle.vx=sin(theta)*force;particle.vy=cos(theta)*force;particles.push(particle)};clickparticle.update=function(){var i,particle;for(i=particles.length-1;i>=0;i--){particle=particles[i];if(particle.alive)particle.move();else pool.push(particles.splice(i,1)[0])}};clickparticle.draw=function(){clickparticle.globalCompositeOperation='lighter';for(var i=particles.length-1;i>=0;i--){particles[i].draw(clickparticle)}};document.addEventListener('mousedown',function(e){var max,j;'TEXTAREA'!==e.target.nodeName&&'INPUT'!==e.target.nodeName&&'A'!==e.target.nodeName&&'I'!==e.target.nodeName&&'IMG'!==e.target.nodeName&&(function(){for(max=random(15,20),j=0;j.5},draw:function(t){t.beginPath(),t.arc(this.x,this.y,this.radius,0,TWO_PI),t.fillStyle=this.color,t.fill()}};var n=50,i=["#5ee4ff","#f44033","#ffeb3b","#F38630","#FA6900","#f403e8","#F9D423"],o=[],r=[],a=t.create({container:document.getElementById("clickCanvas")});a.spawn=function(t,a){o.length>=n&&r.push(o.shift()),particle=r.length?r.pop():new e,particle.init(t,a,random(5,20)),particle.wander=random(.5,2),particle.color=random(i),particle.drag=random(.9,.99),theta=random(TWO_PI),force=random(1,5),particle.vx=sin(theta)*force,particle.vy=cos(theta)*force,o.push(particle)},a.update=function(){var t,e;for(t=o.length-1;t>=0;t--)e=o[t],e.alive?e.move():r.push(o.splice(t,1)[0])},a.draw=function(){a.globalCompositeOperation="lighter";for(var t=o.length-1;t>=0;t--)o[t].draw(a)},document.addEventListener("mousedown",function(t){var e,n;"TEXTAREA"!==t.target.nodeName&&"INPUT"!==t.target.nodeName&&"A"!==t.target.nodeName&&"I"!==t.target.nodeName&&"IMG"!==t.target.nodeName&&function(){for(e=random(15,20),n=0;n{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{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=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}); \ No newline at end of file diff --git a/assets/cursor/cursor7.js b/assets/cursor/cursor7.js new file mode 100644 index 0000000..caf04bd --- /dev/null +++ b/assets/cursor/cursor7.js @@ -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=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}); \ No newline at end of file diff --git a/assets/cursor/cursor8.js b/assets/cursor/cursor8.js new file mode 100644 index 0000000..c706032 --- /dev/null +++ b/assets/cursor/cursor8.js @@ -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;o0)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;i0&&y(i-1,i,t),i=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}); \ No newline at end of file diff --git a/assets/cursor/cursor9.js b/assets/cursor/cursor9.js new file mode 100644 index 0000000..186550b --- /dev/null +++ b/assets/cursor/cursor9.js @@ -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{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=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}); \ No newline at end of file diff --git a/core/function.php b/core/function.php index 07ea732..e98eb7d 100644 --- a/core/function.php +++ b/core/function.php @@ -3,7 +3,7 @@ /* 获取主题当前版本号 */ function _getVersion() { - return "5.5.4"; + return "5.5.5"; }; /* 判断是否是手机 */ diff --git a/functions.php b/functions.php index 3301260..bb11b42 100644 --- a/functions.php +++ b/functions.php @@ -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());