asciify-engine 1.0.18 → 1.0.19

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
@@ -468,12 +468,12 @@ function renderWaveBackground(ctx, width, height, time, mousePos = { x: 0.5, y:
468
468
  const alpha = 0.015 + finalIntensity * 0.07;
469
469
  const isAccent = finalIntensity > accentThreshold;
470
470
  if (isAccent) {
471
- const accentAlpha = Math.min(lightMode ? 0.4 : 0.28, alpha * (lightMode ? 4 : 2.8));
471
+ const accentAlpha = Math.min(lightMode ? 0.9 : 0.28, alpha * (lightMode ? 14 : 2.8));
472
472
  ctx.fillStyle = `rgba(${acR},${acG},${acB},${accentAlpha})`;
473
473
  } else if (baseColor) {
474
474
  ctx.fillStyle = baseColor.replace("{a}", String(alpha));
475
475
  } else if (lightMode) {
476
- ctx.fillStyle = `rgba(0,0,0,${alpha * 1.3})`;
476
+ ctx.fillStyle = `rgba(0,0,0,${alpha * 7})`;
477
477
  } else {
478
478
  ctx.fillStyle = `rgba(255,255,255,${alpha})`;
479
479
  }
@@ -1078,7 +1078,7 @@ function renderRainBackground(ctx, width, height, time, options = {}) {
1078
1078
  if (k === tailLength) {
1079
1079
  ctx.fillStyle = `rgba(${acR},${acG},${acB},${lightMode ? 0.7 : 0.85})`;
1080
1080
  } else {
1081
- const alpha = lightMode ? tRatio * 0.22 : tRatio * 0.15;
1081
+ const alpha = lightMode ? tRatio * 0.85 : tRatio * 0.15;
1082
1082
  ctx.fillStyle = `rgba(${br},${bg},${bb},${alpha})`;
1083
1083
  }
1084
1084
  ctx.fillText(ch, x, y);
@@ -1139,8 +1139,8 @@ function renderStarsBackground(ctx, width, height, time, mousePos = { x: 0.5, y:
1139
1139
  const charIdx = Math.min(charArr.length - 1, Math.floor(r * charArr.length));
1140
1140
  const ch = charArr[charIdx];
1141
1141
  const isAccent = r > 0.72;
1142
- const alpha = lightMode ? r * 0.28 : r * 0.2;
1143
- ctx.fillStyle = isAccent ? `rgba(${acR},${acG},${acB},${Math.min(lightMode ? 0.45 : 0.32, alpha * 2.2)})` : `rgba(${br},${bg},${bb},${alpha})`;
1142
+ const alpha = lightMode ? r * 0.85 : r * 0.2;
1143
+ ctx.fillStyle = isAccent ? `rgba(${acR},${acG},${acB},${Math.min(lightMode ? 0.92 : 0.32, alpha * 2.2)})` : `rgba(${br},${bg},${bb},${alpha})`;
1144
1144
  ctx.fillText(ch, x, y);
1145
1145
  }
1146
1146
  ctx.textAlign = "left";
@@ -1211,8 +1211,8 @@ function renderPulseBackground(ctx, width, height, time, mousePos = { x: 0.5, y:
1211
1211
  ctx.font = `${fontSize}px monospace`;
1212
1212
  const charIdx = Math.floor(totalIntensity * (charArr.length - 1));
1213
1213
  const ch = charArr[Math.min(charIdx, charArr.length - 1)];
1214
- const alpha = lightMode ? totalIntensity * 0.32 : totalIntensity * 0.22;
1215
- ctx.fillStyle = isAccent ? `rgba(${acR},${acG},${acB},${Math.min(lightMode ? 0.5 : 0.4, totalIntensity * 0.55)})` : `rgba(${br},${bg},${bb},${alpha})`;
1214
+ const alpha = lightMode ? totalIntensity * 0.88 : totalIntensity * 0.22;
1215
+ ctx.fillStyle = isAccent ? `rgba(${acR},${acG},${acB},${Math.min(lightMode ? 0.95 : 0.4, totalIntensity * 0.55)})` : `rgba(${br},${bg},${bb},${alpha})`;
1216
1216
  ctx.fillText(ch, px, py);
1217
1217
  }
1218
1218
  }
@@ -1291,8 +1291,8 @@ function renderNoiseBackground(ctx, width, height, time, mousePos = { x: 0.5, y:
1291
1291
  const ch = chars[charIdx];
1292
1292
  if (ch === " ") continue;
1293
1293
  const isAccent = norm2 > accentThreshold;
1294
- const alpha = lightMode ? norm2 * 0.2 : norm2 * 0.13;
1295
- ctx.fillStyle = isAccent ? `rgba(${acR},${acG},${acB},${lightMode ? 0.42 : 0.28})` : `rgba(${br},${bgc},${bb},${alpha})`;
1294
+ const alpha = lightMode ? norm2 * 0.82 : norm2 * 0.13;
1295
+ ctx.fillStyle = isAccent ? `rgba(${acR},${acG},${acB},${lightMode ? 0.92 : 0.28})` : `rgba(${br},${bgc},${bb},${alpha})`;
1296
1296
  ctx.fillText(ch, col * charW, row * lineH);
1297
1297
  }
1298
1298
  }
@@ -1362,8 +1362,8 @@ function renderGridBackground(ctx, width, height, time, mousePos = { x: 0.5, y:
1362
1362
  const charIdx = Math.floor(intensity * (chars.length - 1));
1363
1363
  const ch = chars[charIdx];
1364
1364
  const isAccent = bandIntensity > 0.55;
1365
- const alpha = lightMode ? intensity * 0.2 : intensity * 0.12;
1366
- ctx.fillStyle = isAccent ? `rgba(${acR},${acG},${acB},${lightMode ? 0.46 : 0.28})` : `rgba(${br},${bgv},${bb},${alpha})`;
1365
+ const alpha = lightMode ? intensity * 0.82 : intensity * 0.12;
1366
+ ctx.fillStyle = isAccent ? `rgba(${acR},${acG},${acB},${lightMode ? 0.92 : 0.28})` : `rgba(${br},${bgv},${bb},${alpha})`;
1367
1367
  ctx.fillText(ch, col * charW, row * lineH);
1368
1368
  }
1369
1369
  }
@@ -1448,8 +1448,8 @@ function renderAuroraBackground(ctx, width, height, time, mousePos = { x: 0.5, y
1448
1448
  const charIdx = Math.min(chars.length - 1, Math.floor(normalized * chars.length));
1449
1449
  const ch = chars[charIdx];
1450
1450
  const isAccent = curved > 0.82;
1451
- const alpha = lightMode ? curved * 0.18 : curved * 0.14;
1452
- ctx.fillStyle = isAccent ? `rgba(${acR},${acG},${acB},${lightMode ? 0.5 : 0.32})` : `rgba(${cr},${cg},${cb},${alpha})`;
1451
+ const alpha = lightMode ? curved * 0.82 : curved * 0.14;
1452
+ ctx.fillStyle = isAccent ? `rgba(${acR},${acG},${acB},${lightMode ? 0.92 : 0.32})` : `rgba(${cr},${cg},${cb},${alpha})`;
1453
1453
  ctx.fillText(ch, col * charW, row * lineH);
1454
1454
  }
1455
1455
  }
@@ -1522,8 +1522,8 @@ function renderSilkBackground(ctx, width, height, time, options = {}) {
1522
1522
  const charIdx = Math.floor(angleNorm * dirChars.length) % dirChars.length;
1523
1523
  const ch = dirChars[charIdx];
1524
1524
  const isAccent = intensity > 0.8;
1525
- const alpha = lightMode ? intensity * 0.16 : intensity * 0.13;
1526
- ctx.fillStyle = isAccent ? `rgba(${acR},${acG},${acB},${lightMode ? 0.44 : 0.26})` : `rgba(${cr},${cg},${cb},${alpha})`;
1525
+ const alpha = lightMode ? intensity * 0.8 : intensity * 0.13;
1526
+ ctx.fillStyle = isAccent ? `rgba(${acR},${acG},${acB},${lightMode ? 0.9 : 0.26})` : `rgba(${cr},${cg},${cb},${alpha})`;
1527
1527
  ctx.fillText(ch, col * charW, row * lineH);
1528
1528
  }
1529
1529
  }
@@ -1582,7 +1582,7 @@ function renderVoidBackground(ctx, width, height, time, mousePos = { x: 0.5, y:
1582
1582
  if (r > 1) {
1583
1583
  const outerNoise = hash2(col * 3, row * 7) * Math.max(0, 1 - (r - 1) * 3);
1584
1584
  if (outerNoise < 0.62) continue;
1585
- const alpha2 = outerNoise * (lightMode ? 0.05 : 0.04);
1585
+ const alpha2 = outerNoise * (lightMode ? 0.28 : 0.04);
1586
1586
  ctx.fillStyle = `rgba(${cr},${cg},${cb},${alpha2})`;
1587
1587
  ctx.fillText(chars[1], col * charW, row * lineH);
1588
1588
  continue;
@@ -1595,8 +1595,8 @@ function renderVoidBackground(ctx, width, height, time, mousePos = { x: 0.5, y:
1595
1595
  const charIdx = Math.min(chars.length - 1, densityI);
1596
1596
  const ch = chars[charIdx];
1597
1597
  const isAccent = pulseRing > 0.35 || r < 0.08;
1598
- const alpha = lightMode ? intensity * 0.22 : intensity * 0.18;
1599
- ctx.fillStyle = isAccent ? `rgba(${acR},${acG},${acB},${lightMode ? 0.55 : 0.38})` : `rgba(${cr},${cg},${cb},${alpha})`;
1598
+ const alpha = lightMode ? intensity * 0.85 : intensity * 0.18;
1599
+ ctx.fillStyle = isAccent ? `rgba(${acR},${acG},${acB},${lightMode ? 0.95 : 0.38})` : `rgba(${cr},${cg},${cb},${alpha})`;
1600
1600
  ctx.fillText(ch, col * charW, row * lineH);
1601
1601
  }
1602
1602
  }
@@ -1659,8 +1659,8 @@ function renderMorphBackground(ctx, width, height, time, options = {}) {
1659
1659
  const charIdx = Math.min(chars.length - 1, Math.floor(remapped * chars.length));
1660
1660
  const ch = chars[charIdx];
1661
1661
  const isAccent = norm > 0.88;
1662
- const alpha = lightMode ? remapped * 0.17 : remapped * 0.13;
1663
- ctx.fillStyle = isAccent ? `rgba(${acR},${acG},${acB},${lightMode ? 0.45 : 0.28})` : `rgba(${cr},${cg},${cb},${alpha})`;
1662
+ const alpha = lightMode ? remapped * 0.82 : remapped * 0.13;
1663
+ ctx.fillStyle = isAccent ? `rgba(${acR},${acG},${acB},${lightMode ? 0.92 : 0.28})` : `rgba(${cr},${cg},${cb},${alpha})`;
1664
1664
  ctx.fillText(ch, col * charW, row * lineH);
1665
1665
  }
1666
1666
  }