diff --git a/package.json b/package.json index 8677404..b513628 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stickerify", - "version": "0.1.3", + "version": "0.1.4", "description": "add sticker outline to images with transparent edges", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/index.ts b/src/index.ts index 1e266a9..cc15619 100644 --- a/src/index.ts +++ b/src/index.ts @@ -18,9 +18,10 @@ function stickerify( for (let angle = 0; angle < 360; angle += 360 / samples) { ctx.drawImage( img, - thickness * Math.sin( ( Math.PI * 2 * angle ) / 360 ) + x, - thickness * Math.cos( ( Math.PI * 2 * angle ) / 360 ) + y + thickness * Math.sin((Math.PI * 2 * angle) / 360) + x, + thickness * Math.cos((Math.PI * 2 * angle) / 360) + y ); + } ctx.globalCompositeOperation = "source-in"; ctx.fillStyle = fillStyle;