automated snapshot
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user