automated snapshot
This commit is contained in:
@@ -92,8 +92,7 @@ func (a *Actor) Draw(env *Env, g *sg.Graphics) {
|
||||
|
||||
g.SetStrokeWeight(1.0)
|
||||
g.SetStroke(true)
|
||||
c := a.color
|
||||
c.A = 255
|
||||
g.SetStrokeColor(a.color)
|
||||
g.DrawLine(a.position, nextPosition)
|
||||
//rl.DrawLineV(a.position, nextPosition, a.color)
|
||||
a.position = nextPosition
|
||||
|
||||
@@ -283,7 +283,7 @@ var (
|
||||
FlourescentColors = makeFlourescentColors()
|
||||
)
|
||||
|
||||
func Clamp(c rl.Color, min uint8, max uint8) rl.Color {
|
||||
func Clamp(c color.RGBA, min uint8, max uint8) rl.Color {
|
||||
return rl.NewColor(
|
||||
uint8(rl.Clamp(float32(c.R), float32(min), float32(max))),
|
||||
uint8(rl.Clamp(float32(c.G), float32(min), float32(max))),
|
||||
|
||||
5
main.go
5
main.go
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"image/color"
|
||||
"fmt"
|
||||
"log"
|
||||
"math"
|
||||
@@ -121,7 +122,7 @@ func main() {
|
||||
&AdderField{
|
||||
fields: []Field{
|
||||
&ScaleField{scale: 3, field: imageField},
|
||||
&ScaleField{scale: 750, field: noiseField},
|
||||
&ScaleField{scale: 250, field: noiseField},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -137,8 +138,8 @@ func main() {
|
||||
sketch.AddColorLayer("background-black", rl.Black)
|
||||
//sketch.AddLayer("moses", imageLayer)
|
||||
sketch.AddLayer("field", &FieldLayer{field: field, loColor: rl.NewColor(0, 0, 0, 0), hiColor: fieldColor, dirty: true})
|
||||
actorColor := colorCycle.Next()
|
||||
|
||||
actorColor := color.RGBA { R: 39, G: 58, B: 59, A: 50 }
|
||||
fmt.Printf("actor color = %v\n", actorColor)
|
||||
|
||||
hsv := rl.ColorToHSV(actorColor)
|
||||
|
||||
Reference in New Issue
Block a user