automated snapshot

This commit is contained in:
sumi
2025-12-23 11:08:12 -06:00
parent ecac2dcebe
commit 2c61cd2f46
3 changed files with 29 additions and 15 deletions

View File

@@ -1,6 +1,7 @@
package main
import (
"fmt"
rl "github.com/gen2brain/raylib-go/raylib"
)
@@ -9,6 +10,8 @@ type SierpinskiArrow struct{
}
func (s *SierpinskiArrow) Draw(ctx *RenderCtx) {
rl.Translatef(float32(ctx.SourceWidth) / 2.0, float32(ctx.SourceHeight) / 2.0, 0)
rl.ClearBackground(rl.NewColor(0, 0, 0, 0))
sierpinskiArrow(ctx, int(ctx.Ports["sierpinskiArrowDepth"]), ctx.Ports["sierpinskiArrowLength"])
}
@@ -21,6 +24,7 @@ func (s *SierpinskiArrow) IsDirty() bool {
}
func sierpinskiArrow(ctx *RenderCtx, order int, length float64) {
fmt.Printf("drawing SierpinskiArrow, order = %d, length = %.2f\n", order, length)
if order == 0 {
curve(ctx, order, length, ctx.Ports["sierpinskiArrowAngle"])
} else {