From b402f251194282ee81a05d96860b36e4da63740f Mon Sep 17 00:00:00 2001 From: Markus Walther Date: Sun, 7 Nov 2021 20:28:36 +0000 Subject: [PATCH] fix compile error, version bump to 0.1.4 --- package.json | 2 +- src/index.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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;