automated snapshot

This commit is contained in:
sumi
2026-01-11 23:31:25 -06:00
parent 0efb08c1af
commit 92ff6034d4
2 changed files with 13 additions and 15 deletions

View File

@@ -21,21 +21,21 @@ func (l *BlindsLayer) Draw(env *Env, g *sg.Graphics) {
g.BeginAdditiveBlend()
rowHeight := float32(10.0)
rows := int32(g.Bounds.Height / rowHeight)
rows := 200
rowHeight := g.Bounds.Height / float32(rows)
g.Clear()
c := rl.White
c.A = 100
g.SetStrokeColor(c)
g.SetStrokeWeight(1.0)
y := float32(10.0)
for range rows {
for x := 10; x < int(g.Width()) - 10; x++ {
fieldValue := l.Field.Get(float32(x), float32(y))
strokeHeight := rl.Remap(fieldValue, 0.0, 1.0, 0.0, rowHeight * 1.3)
c := rl.White
c.A = uint8(rl.Remap(fieldValue, 0.0, 1.0, 10, 75))
g.SetStrokeColor(c)
strokeHeight := rl.Remap(fieldValue, 0.0, 1.0, 0, rowHeight * 10.0)
a := sg.Point { X: float32(x), Y: float32(y) - strokeHeight / 2.0 }
b := sg.Point { X: float32(x), Y: float32(y) + strokeHeight / 2.0 }
g.DrawLine(a, b)