@janovix/blocks 1.2.0-rc.20 → 1.2.0-rc.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +8 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3883,6 +3883,8 @@ function AvatarEditor({
|
|
|
3883
3883
|
ctx.fillStyle = "#ffffff";
|
|
3884
3884
|
ctx.fillRect(0, 0, outputSize, outputSize);
|
|
3885
3885
|
}
|
|
3886
|
+
ctx.imageSmoothingEnabled = true;
|
|
3887
|
+
ctx.imageSmoothingQuality = "high";
|
|
3886
3888
|
ctx.save();
|
|
3887
3889
|
ctx.translate(outputSize / 2, outputSize / 2);
|
|
3888
3890
|
ctx.rotate(rotation * Math.PI / 180);
|
|
@@ -3907,6 +3909,10 @@ function AvatarEditor({
|
|
|
3907
3909
|
drawHeight
|
|
3908
3910
|
);
|
|
3909
3911
|
ctx.restore();
|
|
3912
|
+
ctx.globalCompositeOperation = "destination-in";
|
|
3913
|
+
ctx.beginPath();
|
|
3914
|
+
ctx.arc(outputSize / 2, outputSize / 2, outputSize / 2, 0, Math.PI * 2);
|
|
3915
|
+
ctx.fill();
|
|
3910
3916
|
const mimeType = `image/${outputFormat}`;
|
|
3911
3917
|
return outputCanvas.toDataURL(mimeType, outputQuality);
|
|
3912
3918
|
}, [
|
|
@@ -3928,8 +3934,8 @@ function AvatarEditor({
|
|
|
3928
3934
|
canvas.width = displaySize;
|
|
3929
3935
|
canvas.height = displaySize;
|
|
3930
3936
|
ctx.clearRect(0, 0, displaySize, displaySize);
|
|
3931
|
-
ctx.
|
|
3932
|
-
ctx.
|
|
3937
|
+
ctx.imageSmoothingEnabled = true;
|
|
3938
|
+
ctx.imageSmoothingQuality = "high";
|
|
3933
3939
|
ctx.save();
|
|
3934
3940
|
ctx.translate(displaySize / 2, displaySize / 2);
|
|
3935
3941
|
ctx.rotate(rotation * Math.PI / 180);
|