smooth-corners
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "smooth-corners", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "CSS superellipse masks with the Houdini API", | ||
@@ -5,0 +5,0 @@ "main": "paint.js", |
class SmoothCornersPainter { | ||
static get inputProperties() { | ||
return ["--smooth-corners"]; | ||
return ['--smooth-corners']; | ||
} | ||
@@ -22,3 +22,3 @@ | ||
paint(ctx, geom, properties) { | ||
const m = properties.get("--smooth-corners").toString() || 4; | ||
const m = properties.get('--smooth-corners').toString() || 4; | ||
let n = m; | ||
@@ -32,3 +32,3 @@ if (m > 100) n = 100; | ||
ctx.fillStyle = "black"; | ||
ctx.fillStyle = 'black'; | ||
ctx.setTransform(1, 0, 0, 1, width, height); | ||
@@ -49,2 +49,2 @@ ctx.beginPath(); | ||
// eslint-disable-next-line no-undef | ||
registerPaint("smooth-corners", SmoothCornersPainter); | ||
registerPaint('smooth-corners', SmoothCornersPainter); |
<h1 align=center>Smooth Corners</h1> | ||
<p align=center> | ||
<a href='https://www.npmjs.com/package/smooth-corners'><img alt='npm' src='https://flat.badgen.net/npm/v/smooth-corners'></a> | ||
<a href='https://www.npmjs.com/package/smooth-corners'><img alt='npm' src='https://flat.badgen.net/npm/dt/smooth-corners'></a> | ||
<a href='https://david-dm.org/wopian/smooth-corners'><img alt='deps' src='https://flat.badgen.net/david/dep/wopian/smooth-corners'></a> | ||
<a href='https://bundlephobia.com/result?p=smooth-corners'><img alt='bundlephobia' src='https://flat.badgen.net/bundlephobia/minzip/smooth-corners?label=library%20size'></a> | ||
</p> | ||
<p align=center> | ||
<a href='https://github.com/wopian/smooth-corners/actions'><img alt='checks' src='https://flat.badgen.net/github/checks/wopian/smooth-corners'></a> | ||
<!--<a href='https://github.com/wopian/smooth-corners/network/dependents'><img alt='repoDependants' src='https://flat.badgen.net/github/dependents-repo/wopian/smooth-corners'></a>--> | ||
<a href='https://github.com/wopian/smooth-corners/graphs/contributors'><img alt='devDeps' src='https://flat.badgen.net/github/contributors/wopian/smooth-corners'></a> | ||
<a href='https://github.com/sponsors/wopian'><img alt='sponsor' src='https://flat.badgen.net/badge/sponsor/%E2%9D%A4/pink?icon=github'></a> | ||
</p> | ||
<p align=center>Superellipse masks using the <a href='https://developer.mozilla.org/en-US/docs/Web/Houdini'>CSS Houdini</a> API</p> | ||
@@ -29,3 +43,3 @@ | ||
.mask { | ||
/* Integer 1 to 100. Scopped locally or globally in :root {} | ||
/* Integer 1 to 100. Scoped locally or globally in :root {} | ||
2 is a perfect circle | ||
@@ -48,4 +62,4 @@ < 2 are diamonds / asteroids | ||
- https://unpkg.com/smooth-corners | ||
- https://cdn.jsdelivr.net/npm/smooth-corners/paint.js | ||
- [unpkg.com/smooth-corners](https://unpkg.com/smooth-corners) | ||
- [cdn.jsdelivr.net/npm/smooth-corners/paint.js](https://cdn.jsdelivr.net/npm/smooth-corners/paint.js) | ||
@@ -66,2 +80,3 @@ ```html | ||
``` | ||
```js | ||
@@ -68,0 +83,0 @@ // src/assets/paint.js |
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
6725
4
99