hashvatar 0.1.1 → 0.1.2

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 CHANGED
@@ -286,7 +286,7 @@ function renderGradient(canvas, { size, colors, animated = false, seeds }) {
286
286
  { composite: "overlay", alpha: 0.4 },
287
287
  { composite: "soft-light", alpha: 0.6 }
288
288
  ];
289
- const blur = Math.max(8, Math.round(size * 0.21));
289
+ const blur = Math.max(2, Math.round(size * 0.21));
290
290
  const pad = Math.ceil(blur * 1.9);
291
291
  const useFilter = hasFilterBlur();
292
292
  const ROT_SPEEDS = [0.5, 0.6, 0.45, 0.55, 0.5, 0.65];
@@ -383,7 +383,7 @@ function renderDither(canvas, { size, colors, dotScale: dotScaleOpt, animated =
383
383
  canvas.style.width = `${size}px`;
384
384
  canvas.style.height = `${size}px`;
385
385
  const ctx = canvas.getContext("2d");
386
- const dotScaleLogical = dotScaleOpt ?? Math.max(2, Math.round(size / 35));
386
+ const dotScaleLogical = dotScaleOpt ?? Math.max(1, Math.round(size / 35));
387
387
  const dotScale = Math.max(1, Math.round(dotScaleLogical * dpr));
388
388
  const colA = hexToRgb2(oklchToHex(colors[0]));
389
389
  const colB = hexToRgb2(oklchToHex(colors[Math.min(1, colors.length - 1)]));
package/dist/index.js CHANGED
@@ -252,7 +252,7 @@ function renderGradient(canvas, { size, colors, animated = false, seeds }) {
252
252
  { composite: "overlay", alpha: 0.4 },
253
253
  { composite: "soft-light", alpha: 0.6 }
254
254
  ];
255
- const blur = Math.max(8, Math.round(size * 0.21));
255
+ const blur = Math.max(2, Math.round(size * 0.21));
256
256
  const pad = Math.ceil(blur * 1.9);
257
257
  const useFilter = hasFilterBlur();
258
258
  const ROT_SPEEDS = [0.5, 0.6, 0.45, 0.55, 0.5, 0.65];
@@ -349,7 +349,7 @@ function renderDither(canvas, { size, colors, dotScale: dotScaleOpt, animated =
349
349
  canvas.style.width = `${size}px`;
350
350
  canvas.style.height = `${size}px`;
351
351
  const ctx = canvas.getContext("2d");
352
- const dotScaleLogical = dotScaleOpt ?? Math.max(2, Math.round(size / 35));
352
+ const dotScaleLogical = dotScaleOpt ?? Math.max(1, Math.round(size / 35));
353
353
  const dotScale = Math.max(1, Math.round(dotScaleLogical * dpr));
354
354
  const colA = hexToRgb2(oklchToHex(colors[0]));
355
355
  const colB = hexToRgb2(oklchToHex(colors[Math.min(1, colors.length - 1)]));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hashvatar",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Deterministic avatar generation from any hash string. Zero dependencies.",
5
5
  "author": "Médhy",
6
6
  "license": "MIT",