refactoring progress

This commit is contained in:
2026-01-08 11:54:35 -06:00
parent bbad63c60a
commit b3d9d0340a
7 changed files with 312 additions and 155 deletions

View File

@@ -101,15 +101,15 @@ type FieldLayer struct {
dirty bool
}
func (fl *FieldLayer) Update(ctx *RenderCtx) {
func (fl *FieldLayer) Update(env *Env) {
}
func (fl *FieldLayer) Draw(ctx *RenderCtx) {
func (fl *FieldLayer) Draw(env *Env) {
rl.ClearBackground(rl.Blank)
rl.BeginBlendMode(rl.BlendAlphaPremultiply)
for x := range ctx.SourceWidth {
for y := range ctx.SourceHeight {
for x := range int32(env.GetGraphicsHeight()) {
for y := range int32(env.GetGraphicsHeight()) {
v := fl.field.Get(float32(x), float32(y))
clr := LerpCurve(v, 1.3, fl.loColor, fl.hiColor)
rl.DrawPixel(x, y, clr)