progress using my own graphics interface

This commit is contained in:
2026-01-06 00:35:24 -06:00
parent 59a2f08349
commit bbad63c60a
7 changed files with 230 additions and 195 deletions

View File

@@ -4,12 +4,12 @@ import (
rl "github.com/gen2brain/raylib-go/raylib"
)
type SierpinskiArrow struct{
type SierpinskiArrow struct {
dirty bool
}
func (s *SierpinskiArrow) Draw(ctx *RenderCtx) {
rl.Translatef(float32(ctx.SourceWidth) / 2.0, float32(ctx.SourceHeight) / 2.0, 0)
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"])
}
@@ -45,5 +45,3 @@ func curve(ctx *RenderCtx, order int, length float64, angle float64) {
curve(ctx, order-1, length/2, -angle)
}
}