automated snapshot
This commit is contained in:
67
main.go
67
main.go
@@ -42,51 +42,31 @@ func main() {
|
||||
|
||||
BlendModeToggleGroupActive := int32(0)
|
||||
|
||||
Slider003Value := float32(0.0)
|
||||
|
||||
RTogglePressed := false
|
||||
GTogglePressed := false
|
||||
BTogglePressed := false
|
||||
|
||||
Slider008Value := float32(0.0)
|
||||
Slider009Value := float32(0.0)
|
||||
Slider010Value := float32(0.0)
|
||||
|
||||
ATogglePressed := false
|
||||
SaturationTogglePressed := false
|
||||
|
||||
SaturationSliderValue := float32(0.0)
|
||||
KSliderValue := float32(0.0)
|
||||
KTogglePressed := false
|
||||
// end layout vars
|
||||
|
||||
rl.SetTargetFPS(60)
|
||||
t0 := time.Now()
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
rng := rand.New(rand.NewSource(0))
|
||||
imageField := NewImageField("/home/d/Dropbox/art/passage/data/david.png")
|
||||
|
||||
field :=
|
||||
TranslateField{
|
||||
&TranslateField {
|
||||
x: -float32(sourceWidth / 2.0),
|
||||
y: -float32(sourceHeight / 2.0),
|
||||
field: &ScaleField{
|
||||
scale: 4.0,
|
||||
field: &imageField,
|
||||
field: imageField,
|
||||
},
|
||||
}
|
||||
rng := rand.New(rand.NewSource(0))
|
||||
|
||||
|
||||
sketch := NewSketch(sourceWidth, sourceHeight)
|
||||
|
||||
contourLayer := NewContourLayer(&sketch, rng, &field)
|
||||
contourLayer := NewContourLayer(&sketch, rng, field)
|
||||
//sketch.CreateLayer("testPattern", &TestPattern{}, int32(sourceWidth), int32(sourceHeight))
|
||||
//sketch.CreateLayer("actors", &contourLayer, int32(sourceWidth), int32(sourceHeight))
|
||||
//sketch.CreateLayer("field", &FieldLayer{field: &field, dirty: true}, int32(sourceWidth), int32(sourceHeight))
|
||||
sketch.CreateLayer("contours", &contourLayer)
|
||||
sketch.CreateLayer("contours", contourLayer)
|
||||
|
||||
ports := MakePorts()
|
||||
ports["sierpinskiArrowAngle"] = Sine {
|
||||
@@ -156,34 +136,31 @@ func main() {
|
||||
gui.GroupBox(rl.Rectangle{X: 20, Y: 20, Width: controlPanelWidth - 50, Height: 60 }, "Blending")
|
||||
BlendModeToggleGroupActive = gui.ToggleGroup(rl.Rectangle{X: 30, Y: 40, Width: (controlPanelWidth - 70) / 3.0, Height: 24}, "ONE;TWO;THREE", BlendModeToggleGroupActive)
|
||||
|
||||
gui.Label(rl.Rectangle{X: 20, Y: 90, Width: 120, Height: 24}, "Contour Layer")
|
||||
for _, layerTools := range sketch.layerToolsOrdered {
|
||||
|
||||
ATogglePressed = gui.LabelButton(rl.Rectangle{X: 40, Y: 136, Width: 16, Height: 16}, "A")
|
||||
Slider003Value = gui.Slider(rl.Rectangle{X: 64, Y: 136, Width: 264, Height: 16}, "", "", Slider003Value, 0, 255)
|
||||
config := layerTools.config
|
||||
|
||||
RTogglePressed = gui.LabelButton(rl.Rectangle{X: 40, Y: 160, Width: 16, Height: 16}, "R")
|
||||
Slider008Value = gui.Slider(rl.Rectangle{X: 64, Y: 160, Width: 264, Height: 16}, "", "", Slider008Value, 0, 100)
|
||||
gui.Label(rl.Rectangle{X: 20, Y: 90, Width: 120, Height: 24}, layerTools.name)
|
||||
|
||||
GTogglePressed = gui.LabelButton(rl.Rectangle{X: 40, Y: 184, Width: 16, Height: 16}, "G")
|
||||
Slider009Value = gui.Slider(rl.Rectangle{X: 64, Y: 184, Width: 264, Height: 16}, "", "", Slider009Value, 0, 100)
|
||||
config.visible = gui.Toggle(rl.Rectangle{X: 40, Y: 136, Width: 16, Height: 16}, "A", config.visible)
|
||||
config.a = uint8(gui.Slider(rl.Rectangle{X: 64, Y: 136, Width: 264, Height: 16}, "", "", float32(config.a), 0, 255))
|
||||
|
||||
BTogglePressed = gui.LabelButton(rl.Rectangle{X: 40, Y: 208, Width: 16, Height: 16}, "B")
|
||||
Slider010Value = gui.Slider(rl.Rectangle{X: 64, Y: 208, Width: 264, Height: 16}, "", "", Slider010Value, 0, 100)
|
||||
config.rVisible = gui.Toggle(rl.Rectangle{X: 40, Y: 160, Width: 16, Height: 16}, "R", config.rVisible)
|
||||
config.r = uint8(gui.Slider(rl.Rectangle{X: 64, Y: 160, Width: 264, Height: 16}, "", "", float32(config.r), 0, 255))
|
||||
|
||||
SaturationTogglePressed = gui.LabelButton(rl.Rectangle{X: 40, Y: 232, Width: 16, Height: 16}, "S")
|
||||
config.gVisible = gui.Toggle(rl.Rectangle{X: 40, Y: 184, Width: 16, Height: 16}, "G", config.gVisible)
|
||||
config.g = uint8(gui.Slider(rl.Rectangle{X: 64, Y: 184, Width: 264, Height: 16}, "", "", float32(config.g), 0, 255))
|
||||
|
||||
gui.Slider(rl.Rectangle{X: 64, Y: 232, Width: 264, Height: 16}, "", "", SaturationSliderValue, 0, 100)
|
||||
gui.Slider(rl.Rectangle{X: 64, Y: 256, Width: 264, Height: 16}, "", "", KSliderValue, 0, 100)
|
||||
config.bVisible = gui.Toggle(rl.Rectangle{X: 40, Y: 208, Width: 16, Height: 16}, "B", config.bVisible)
|
||||
config.b = uint8(gui.Slider(rl.Rectangle{X: 64, Y: 208, Width: 264, Height: 16}, "", "", float32(config.b), 0, 255))
|
||||
|
||||
KTogglePressed = gui.LabelButton(rl.Rectangle{X: 40, Y: 256, Width: 16, Height: 16}, "K")
|
||||
config.desaturate = !gui.Toggle(rl.Rectangle{X: 40, Y: 232, Width: 16, Height: 16}, "S", !config.desaturate)
|
||||
config.saturation = gui.Slider(rl.Rectangle{X: 64, Y: 232, Width: 264, Height: 16}, "", "", config.saturation, 0, 100)
|
||||
|
||||
// NOTE: LabelButton returns "pressed this frame" bool, so these are edge-triggered.
|
||||
_ = RTogglePressed
|
||||
_ = GTogglePressed
|
||||
_ = BTogglePressed
|
||||
_ = ATogglePressed
|
||||
_ = SaturationTogglePressed
|
||||
_ = KTogglePressed
|
||||
gui.Label(rl.Rectangle{X: 40, Y: 256, Width: 16, Height: 16}, "S")
|
||||
config.kValue = gui.Slider(rl.Rectangle{X: 64, Y: 256, Width: 264, Height: 16}, "", "", config.kValue, 0, 2)
|
||||
|
||||
}
|
||||
|
||||
rl.EndDrawing()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user