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.SetStrokeWeight(1.0)
|
||||||
g.SetStroke(true)
|
g.SetStroke(true)
|
||||||
c := a.color
|
g.SetStrokeColor(a.color)
|
||||||
c.A = 255
|
|
||||||
g.DrawLine(a.position, nextPosition)
|
g.DrawLine(a.position, nextPosition)
|
||||||
//rl.DrawLineV(a.position, nextPosition, a.color)
|
//rl.DrawLineV(a.position, nextPosition, a.color)
|
||||||
a.position = nextPosition
|
a.position = nextPosition
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ var (
|
|||||||
FlourescentColors = makeFlourescentColors()
|
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(
|
return rl.NewColor(
|
||||||
uint8(rl.Clamp(float32(c.R), float32(min), float32(max))),
|
uint8(rl.Clamp(float32(c.R), float32(min), float32(max))),
|
||||||
uint8(rl.Clamp(float32(c.G), 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 (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
|
"image/color"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"math"
|
"math"
|
||||||
@@ -121,7 +122,7 @@ func main() {
|
|||||||
&AdderField{
|
&AdderField{
|
||||||
fields: []Field{
|
fields: []Field{
|
||||||
&ScaleField{scale: 3, field: imageField},
|
&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.AddColorLayer("background-black", rl.Black)
|
||||||
//sketch.AddLayer("moses", imageLayer)
|
//sketch.AddLayer("moses", imageLayer)
|
||||||
sketch.AddLayer("field", &FieldLayer{field: field, loColor: rl.NewColor(0, 0, 0, 0), hiColor: fieldColor, dirty: true})
|
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)
|
fmt.Printf("actor color = %v\n", actorColor)
|
||||||
|
|
||||||
hsv := rl.ColorToHSV(actorColor)
|
hsv := rl.ColorToHSV(actorColor)
|
||||||
|
|||||||
Reference in New Issue
Block a user