progress using my own graphics interface
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user