automated snapshot
This commit is contained in:
@@ -76,7 +76,7 @@ type Actor struct {
|
|||||||
|
|
||||||
func (a *Actor) Draw() {
|
func (a *Actor) Draw() {
|
||||||
v := a.field.Get(a.position.X, a.position.Y)
|
v := a.field.Get(a.position.X, a.position.Y)
|
||||||
rad := rl.Remap(v, 0, 1, 0, 3*math.Pi)
|
rad := rl.Remap(v, 0, 1, 0, 10*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)))}
|
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)
|
rl.DrawLineV(a.position, nextPosition, a.color)
|
||||||
a.position = nextPosition
|
a.position = nextPosition
|
||||||
|
|||||||
2
main.go
2
main.go
@@ -260,7 +260,7 @@ func (fl *FieldLayer) Draw(ctx *RenderCtx) {
|
|||||||
for x := range ctx.SourceWidth {
|
for x := range ctx.SourceWidth {
|
||||||
for y := range ctx.SourceHeight {
|
for y := range ctx.SourceHeight {
|
||||||
v := fl.field.Get(float32(x), float32(y))
|
v := fl.field.Get(float32(x), float32(y))
|
||||||
clr := LerpCurve(v, 1.0, fl.loColor, fl.hiColor)
|
clr := LerpCurve(v, 1.3, fl.loColor, fl.hiColor)
|
||||||
rl.DrawPixel(x, y, clr)
|
rl.DrawPixel(x, y, clr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user