evanyou-canvas
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,2 +0,2 @@ | ||
module.exports=function(){var e=document.createElement("canvas"),n=function(e){var n,t=e.getContext("2d"),i=window.devicePixelRatio||1,o=window.innerWidth,c=window.innerHeight,r=Math,a=0,l=2*r.PI,d=r.cos,u=r.random;function f(){for(t.clearRect(0,0,o,c),n=[{x:0,y:.7*c+90},{x:0,y:.7*c-90}];n[1].x<o+90;)v(n[0],n[1])}function v(e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y);var o=i.x+90*(2*u()-.25),c=x(i.y);t.lineTo(o,c),t.closePath(),t.fillStyle="#"+(127*d(a-=l/-50)+128<<16|127*d(a+l/3)+128<<8|127*d(a+l/3*2)+128).toString(16),t.fill(),n[0]=n[1],n[1]={x:o,y:c}}function x(e){var n=e+90*(2*u()-1.1);return n>c||n<0?x(e):n}return e.width=o*i,e.height=c*i,t.scale(i,i),t.globalAlpha=.6,f(),f}(e);return document.addEventListener("click",n),{canvas:e,update:n,offClick:function(){return document.removeEventListener("click",n)}}}; | ||
module.exports=function(){var e=document.createElement("canvas");e.className="evanyou-canvas";var n=function(e){var n,t=e.getContext("2d"),i=window.devicePixelRatio||1,o=window.innerWidth,a=window.innerHeight,c=Math,r=0,l=2*c.PI,u=c.cos,d=c.random;function v(){for(t.clearRect(0,0,o,a),n=[{x:0,y:.7*a+90},{x:0,y:.7*a-90}];n[1].x<o+90;)f(n[0],n[1])}function f(e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y);var o=i.x+90*(2*d()-.25),a=s(i.y);t.lineTo(o,a),t.closePath(),t.fillStyle="#"+(127*u(r-=l/-50)+128<<16|127*u(r+l/3)+128<<8|127*u(r+l/3*2)+128).toString(16),t.fill(),n[0]=n[1],n[1]={x:o,y:a}}function s(e){var n=e+90*(2*d()-1.1);return n>a||n<0?s(e):n}return e.width=o*i,e.height=a*i,t.scale(i,i),t.globalAlpha=.6,v(),v}(e);return document.addEventListener("click",n),{canvas:e,update:n,offClick:function(){return document.removeEventListener("click",n)}}}; | ||
//# sourceMappingURL=evanyou-canvas.js.map |
@@ -1,2 +0,2 @@ | ||
function e(){const e=document.createElement("canvas"),n=function(e){let n,t=e.getContext("2d"),i=window.devicePixelRatio||1,o=window.innerWidth,c=window.innerHeight,l=Math,a=0,r=2*l.PI,d=l.cos,u=l.random;function f(){for(t.clearRect(0,0,o,c),n=[{x:0,y:.7*c+90},{x:0,y:.7*c-90}];n[1].x<o+90;)x(n[0],n[1])}function x(e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y);var o=i.x+90*(2*u()-.25),c=h(i.y);t.lineTo(o,c),t.closePath(),a-=r/-50,t.fillStyle="#"+(127*d(a)+128<<16|127*d(a+r/3)+128<<8|127*d(a+r/3*2)+128).toString(16),t.fill(),n[0]=n[1],n[1]={x:o,y:c}}function h(e){const n=e+90*(2*u()-1.1);return n>c||n<0?h(e):n}return e.width=o*i,e.height=c*i,t.scale(i,i),t.globalAlpha=.6,f(),f}(e);return document.addEventListener("click",n),{canvas:e,update:n,offClick:()=>document.removeEventListener("click",n)}}export default e; | ||
function e(){const e=document.createElement("canvas");e.className="evanyou-canvas";const n=function(e){let n,t=e.getContext("2d"),o=window.devicePixelRatio||1,i=window.innerWidth,c=window.innerHeight,a=Math,l=0,r=2*a.PI,d=a.cos,u=a.random;function s(){for(t.clearRect(0,0,i,c),n=[{x:0,y:.7*c+90},{x:0,y:.7*c-90}];n[1].x<i+90;)f(n[0],n[1])}function f(e,o){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(o.x,o.y);var i=o.x+90*(2*u()-.25),c=v(o.y);t.lineTo(i,c),t.closePath(),l-=r/-50,t.fillStyle="#"+(127*d(l)+128<<16|127*d(l+r/3)+128<<8|127*d(l+r/3*2)+128).toString(16),t.fill(),n[0]=n[1],n[1]={x:i,y:c}}function v(e){const n=e+90*(2*u()-1.1);return n>c||n<0?v(e):n}return e.width=i*o,e.height=c*o,t.scale(o,o),t.globalAlpha=.6,s(),s}(e);return document.addEventListener("click",n),{canvas:e,update:n,offClick:()=>document.removeEventListener("click",n)}}export default e; | ||
//# sourceMappingURL=evanyou-canvas.modern.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e||self).evanyouCanvas=n()}(this,function(){return function(){var e=document.createElement("canvas"),n=function(e){var n,t=e.getContext("2d"),o=window.devicePixelRatio||1,i=window.innerWidth,c=window.innerHeight,a=Math,r=0,l=2*a.PI,d=a.cos,f=a.random;function u(){for(t.clearRect(0,0,i,c),n=[{x:0,y:.7*c+90},{x:0,y:.7*c-90}];n[1].x<i+90;)s(n[0],n[1])}function s(e,o){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(o.x,o.y);var i=o.x+90*(2*f()-.25),c=v(o.y);t.lineTo(i,c),t.closePath(),t.fillStyle="#"+(127*d(r-=l/-50)+128<<16|127*d(r+l/3)+128<<8|127*d(r+l/3*2)+128).toString(16),t.fill(),n[0]=n[1],n[1]={x:i,y:c}}function v(e){var n=e+90*(2*f()-1.1);return n>c||n<0?v(e):n}return e.width=i*o,e.height=c*o,t.scale(o,o),t.globalAlpha=.6,u(),u}(e);return document.addEventListener("click",n),{canvas:e,update:n,offClick:function(){return document.removeEventListener("click",n)}}}}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e||self).evanyouCanvas=n()}(this,function(){return function(){var e=document.createElement("canvas");e.className="evanyou-canvas";var n=function(e){var n,t=e.getContext("2d"),o=window.devicePixelRatio||1,i=window.innerWidth,a=window.innerHeight,c=Math,r=0,l=2*c.PI,d=c.cos,f=c.random;function u(){for(t.clearRect(0,0,i,a),n=[{x:0,y:.7*a+90},{x:0,y:.7*a-90}];n[1].x<i+90;)s(n[0],n[1])}function s(e,o){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(o.x,o.y);var i=o.x+90*(2*f()-.25),a=v(o.y);t.lineTo(i,a),t.closePath(),t.fillStyle="#"+(127*d(r-=l/-50)+128<<16|127*d(r+l/3)+128<<8|127*d(r+l/3*2)+128).toString(16),t.fill(),n[0]=n[1],n[1]={x:i,y:a}}function v(e){var n=e+90*(2*f()-1.1);return n>a||n<0?v(e):n}return e.width=i*o,e.height=a*o,t.scale(o,o),t.globalAlpha=.6,u(),u}(e);return document.addEventListener("click",n),{canvas:e,update:n,offClick:function(){return document.removeEventListener("click",n)}}}}); | ||
//# sourceMappingURL=evanyou-canvas.umd.js.map |
{ | ||
"name": "evanyou-canvas", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "dist/evanyou-canvas.umd.js", | ||
"module": "dist/evanyou-canvas.mjs", | ||
"scripts": { | ||
"build": "microbundle src/index.ts" | ||
"build": "microbundle src/index.js" | ||
}, | ||
@@ -9,0 +9,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
20240
0
16
95