asciify-engine 1.0.18 → 1.0.20

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