Files
donlucasandClaude Fable 5.1 c0062e9cd4 The moon four ways: a study of what the cube can still carry
His question, with the session 7 mockup beside a Ghostty frame: is this the
best disc we can draw, and why did we leave the original? The answer to the
second is on record (a truecolor preview; the cube rounds its soft edge to
grey fringes and has no navy). For the first, three study switches on the
shore, off in production: a quadrant edge (canvas.SetBGQuad, four quarters
per cell as two backgrounds, drawn with the top edge as background wherever
the top quarters agree so Terminal.app shows no hairline there), a sun with
no unlit face by day, and a soft halo on the night sky's grey ramp. xscapes
-moon renders the five treatments by day and night at three context levels.

The first render's halo did nothing: night was keyed on the body's colour,
and at 22:20 the body is a pinkish grey that reads as warm. Both new
switches key on the sky's luma now. Found by sampling the page's pixels.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-05 13:30:22 -07:00

39 lines
1.1 KiB
Go

// haloprobe: does Shore.MoonHalo change any cell? Prints the background and
// the resolved 256 tone on the moon's row, with the switch off and on.
package main
import (
"fmt"
"github.com/donlucasx/xscapes/internal/canvas"
"github.com/donlucasx/xscapes/internal/scape"
"github.com/donlucasx/xscapes/internal/term"
)
func main() {
for _, halo := range []bool{false, true} {
c := canvas.New(130, 22, canvas.AlphaFar, canvas.AlphaMid, canvas.AlphaNear)
sh := scape.NewShore(7, false)
sh.MoonX = 0.28
sh.MoonEdge = "quad"
sh.MoonHalo = halo
act := scape.Activity{Working: true, Level: 0.65, ContextUsed: 0.05, TimeOfDay: 0.931}
sh.Update(c, 2, act)
mx, my := sh.MoonPos()
rx, ry := sh.MoonExtent()
fmt.Printf("halo=%v moon at (%d,%d) extent %dx%d\n", halo, mx, my, rx, ry)
for _, dy := range []int{-2, 0, 2, 4} {
if my+dy < 0 {
continue
}
fmt.Printf(" row %+d:", dy)
for dx := 0; dx <= rx+6; dx++ {
bg := c.BGAt(mx+dx, my+dy)
_, _, q := c.ResolveAt(mx+dx, my+dy, term.Profile256)
fmt.Printf(" %02x%02x%02x/%02x", bg.R, bg.G, bg.B, q.R)
}
fmt.Println()
}
}
}