Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

evanyou-canvas

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

evanyou-canvas - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

2

dist/evanyou-canvas.js

@@ -1,2 +0,2 @@

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)}}};
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;)s(n[0],n[1])}function s(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=f(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 f(e){var n=e+90*(2*d()-1.1);return n>a||n<0?f(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,updateCanvas:n,offClick:function(){return document.removeEventListener("click",n)}}};
//# sourceMappingURL=evanyou-canvas.js.map

@@ -1,2 +0,2 @@

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;
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,s=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;)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*s()-.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*s()-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,updateCanvas: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");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)}}}});
!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,updateCanvas:n,offClick:function(){return document.removeEventListener("click",n)}}}});
//# sourceMappingURL=evanyou-canvas.umd.js.map
{
"name": "evanyou-canvas",
"version": "1.0.2",
"version": "1.1.0",
"main": "dist/evanyou-canvas.umd.js",

@@ -5,0 +5,0 @@ "module": "dist/evanyou-canvas.mjs",

@@ -11,4 +11,5 @@ # evanyou-canvas

const { canvas, update, offClick } = evanyouCanvas()
const { canvas, updateCanvas, offClick } = evanyouCanvas()
// Add to your container
document.body.appendChild(canvas)
```

@@ -6,8 +6,8 @@ import './index.css'

canvas.className = 'evanyou-canvas'
const update = drawCanvas(canvas)
document.addEventListener('click', update)
const updateCanvas = drawCanvas(canvas)
document.addEventListener('click', updateCanvas)
return {
canvas,
update,
offClick: () => document.removeEventListener('click', update),
updateCanvas,
offClick: () => document.removeEventListener('click', updateCanvas),
}

@@ -14,0 +14,0 @@ }

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc