@codexstar/pi-pompom 1.2.0 → 1.3.0

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.
@@ -9,7 +9,7 @@
9
9
  // Widget dimensions — set once, used by renderPompom
10
10
  let W = 50;
11
11
  let H = 14; // character rows (each = 2 logical pixels via half-block)
12
- const VIEW_OFFSET_Y = 0.18; // shift camera down so ground is visible in compact mode
12
+ const VIEW_OFFSET_Y = 0.2; // shift camera down so ground is visible in compact mode
13
13
 
14
14
  const PHYSICS_DT = 0.016; // 60fps physics sub-stepping
15
15
 
@@ -91,7 +91,7 @@ function say(text: string, duration = 4.0) {
91
91
  }
92
92
 
93
93
  function project2D(x: number, y: number): [number, number] {
94
- const effectDim = Math.max(40, Math.min(W, H * 2.8));
94
+ const effectDim = Math.max(40, Math.min(W, H * 4));
95
95
  const scale = 2.0 / effectDim;
96
96
  const cx = (x / scale) + (W / 2.0);
97
97
  const cy = ((y - VIEW_OFFSET_Y) / scale + H) / 2.0;
@@ -255,9 +255,9 @@ function shadeObject(hit: ReturnType<typeof getObjHit>, px: number, py: number,
255
255
  if (eDist1 < 0.004 || eDist2 < 0.004) {
256
256
  r = 15; g = 10; b = 20;
257
257
  if (ey1 > 0 || ey2 > 0) { r = 50; g = 180; b = 100; }
258
- if ((ex1 + 0.012) ** 2 + (ey1 + 0.012) ** 2 < 0.0003 || (ex2 + 0.012) ** 2 + (ey2 + 0.012) ** 2 < 0.0003) {
258
+ if ((ex1 + 0.012) ** 2 + (ey1 + 0.012) ** 2 < 0.0008 || (ex2 + 0.012) ** 2 + (ey2 + 0.012) ** 2 < 0.0008) {
259
259
  if (!isTired) { r = 255; g = 255; b = 255; }
260
- } else if ((ex1 - 0.015) ** 2 + (ey1 - 0.015) ** 2 < 0.0001 || (ex2 - 0.015) ** 2 + (ey2 - 0.015) ** 2 < 0.0001) {
260
+ } else if ((ex1 - 0.015) ** 2 + (ey1 - 0.015) ** 2 < 0.0005 || (ex2 - 0.015) ** 2 + (ey2 - 0.015) ** 2 < 0.0005) {
261
261
  if (!isTired) { r = 255; g = 255; b = 255; }
262
262
  }
263
263
  }
@@ -463,7 +463,7 @@ function buildObjects(): RenderObj[] {
463
463
  }
464
464
 
465
465
  function getScreenEdgeX(): number {
466
- const effectDim = Math.max(40, Math.min(W, H * 2.8));
466
+ const effectDim = Math.max(40, Math.min(W, H * 4));
467
467
  const scale = 2.0 / effectDim;
468
468
  return (W / 2.0) * scale;
469
469
  }
@@ -488,7 +488,7 @@ function updatePhysics(dt: number) {
488
488
  // Weather particles
489
489
  const isRaining = new Date().getMinutes() % 10 < 3 && !getWeatherAndTime().isNight;
490
490
  if (isRaining && Math.random() < 0.3) {
491
- const effectDim = Math.max(40, Math.min(W, H * 2.8));
491
+ const effectDim = Math.max(40, Math.min(W, H * 4));
492
492
  const scale = 2.0 / effectDim;
493
493
  particles.push({
494
494
  x: (Math.random() - 0.5) * W * scale, y: -H * scale,
@@ -645,7 +645,7 @@ function updatePhysics(dt: number) {
645
645
  }
646
646
 
647
647
  function renderToBuffers() {
648
- const effectDim = Math.max(40, Math.min(W, H * 2.8));
648
+ const effectDim = Math.max(40, Math.min(W, H * 4));
649
649
  const scale = 2.0 / effectDim;
650
650
  const objects = buildObjects();
651
651
  const skyColors = getWeatherAndTime();
@@ -676,7 +676,7 @@ function renderToBuffers() {
676
676
  if (d > maxD) maxD = d;
677
677
  }
678
678
 
679
- if (maxD > 60) {
679
+ if (maxD > 30) {
680
680
  // EDGE CELL — use quadrant character for 2× horizontal detail
681
681
  const lum0 = tl[0] * 77 + tl[1] * 150 + tl[2] * 29;
682
682
  const lum1 = tr[0] * 77 + tr[1] * 150 + tr[2] * 29;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codexstar/pi-pompom",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "A 3D raymarched virtual pet companion for Pi CLI",
5
5
  "type": "module",
6
6
  "author": "codexstar69 <engazedigital@gmail.com>",