automated snapshot

This commit is contained in:
sumi
2025-12-23 22:39:45 -06:00
parent a4f58ab0e8
commit dedea78dbc
2 changed files with 4 additions and 3 deletions

View File

@@ -1,7 +1,6 @@
package main
import (
"fmt"
"math"
"math/rand"
"github.com/gen2brain/raylib-go/raylib"
@@ -52,7 +51,6 @@ func (s *ContourLayer) AddActors(n, sourceWidth, sourceHeight int32) {
func (s *ContourLayer) Update(ctx *RenderCtx) {
s.AddActors(100, ctx.SourceWidth, ctx.SourceHeight)
fmt.Printf("num actors = %d\n", len(s.actors))
}
func (s *ContourLayer) Draw(ctx *RenderCtx) {
@@ -81,7 +79,6 @@ func (a *Actor) Draw() {
rad := rl.Remap(v, 0, 1, 0, 3*math.Pi)
nextPosition := rl.Vector2{X: a.position.X + a.stepSize*float32(math.Cos(float64(rad))), Y: a.position.Y + a.stepSize*float32(math.Sin(float64(rad)))}
rl.DrawLineV(a.position, nextPosition, a.color)
//fmt.Printf("position %v -> nextPosition %v \n", a.position, nextPosition)
a.position = nextPosition
}

View File

@@ -1,6 +1,7 @@
package main
import (
"fmt"
"math"
"github.com/gen2brain/raylib-go/raylib"
)
@@ -145,6 +146,9 @@ func (s *Sketch) Draw(ctx *RenderCtx) {
b = config.b
}
tint := rl.NewColor(r, g, b, config.a)
fmt.Printf("rendering layer '%s' with config %v\n", instance.name, instance.config)
rl.DrawTexturePro(instance.texture.Texture, src, dst, rl.Vector2{}, 0, tint)
}
}