automated snapshot

This commit is contained in:
sumi
2025-12-27 02:34:54 -06:00
parent 80d3a0fde8
commit 5e7006c194
2 changed files with 7 additions and 5 deletions

10
main.go
View File

@@ -10,6 +10,7 @@ import (
"time" "time"
g "github.com/d2fn/sumi/internal/graphics" g "github.com/d2fn/sumi/internal/graphics"
"github.com/ojrac/opensimplex-go"
gui "github.com/gen2brain/raylib-go/raygui" gui "github.com/gen2brain/raylib-go/raygui"
rl "github.com/gen2brain/raylib-go/raylib" rl "github.com/gen2brain/raylib-go/raylib"
@@ -57,7 +58,8 @@ func main() {
rng := rand.New(rand.NewSource(0)) rng := rand.New(rand.NewSource(0))
//imageField := NewImageField("/home/d/Dropbox/art/data/david.png") //imageField := NewImageField("/home/d/Dropbox/art/data/david.png")
imageField := NewImageField("/home/d/Dropbox/art/data/ramstatue.png") noiseField := &SimplexNoiseField { Noise: opensimplex.New32(0) }
//imageField := NewImageField("/home/d/Dropbox/art/data/ramstatue.png")
//imageField := NewImageField("/home/d/Dropbox/art/data/bassrockastro/Photo Dec 24 2025, 5 58 23 PM.jpg") //imageField := NewImageField("/home/d/Dropbox/art/data/bassrockastro/Photo Dec 24 2025, 5 58 23 PM.jpg")
//imageField := NewImageField("/home/d/Dropbox/art/data/bassrockastro/andromeda.jpg") //imageField := NewImageField("/home/d/Dropbox/art/data/bassrockastro/andromeda.jpg")
//imageField := NewImageField("/home/d/Dropbox/art/data/moses_statue.jpg") //imageField := NewImageField("/home/d/Dropbox/art/data/moses_statue.jpg")
@@ -66,8 +68,8 @@ func main() {
x: -float32(sourceWidth / 2.0), x: -float32(sourceWidth / 2.0),
y: -float32(sourceHeight / 2.0), y: -float32(sourceHeight / 2.0),
field: &ScaleField{ field: &ScaleField{
scale: 4.0, scale: 100.0,
field: imageField, field: noiseField,
}, },
} }
sierpinskiLayer := &SierpinskiArrow { dirty: true } sierpinskiLayer := &SierpinskiArrow { dirty: true }
@@ -93,7 +95,7 @@ func main() {
//NewColor(11, 35, 176, 50), //NewColor(11, 35, 176, 50),
//r //r
contourLayer := NewContourLayer(&sketch, rng, field, actorColor, -math.Pi, math.Pi) contourLayer := NewContourLayer(&sketch, rng, field, actorColor, -10*math.Pi, 10*math.Pi)
sketch.AddLayer("contours", contourLayer) sketch.AddLayer("contours", contourLayer)
sketch.AddLayer("sierpinski-arrowhead", sierpinskiLayer) sketch.AddLayer("sierpinski-arrowhead", sierpinskiLayer)
// aurora := NewImageLayer("/home/d/Dropbox/photos/Events/2025/Aurora/Photo Nov 11 2025, 9 52 03 PM.jpg") // aurora := NewImageLayer("/home/d/Dropbox/photos/Events/2025/Aurora/Photo Nov 11 2025, 9 52 03 PM.jpg")

View File

@@ -258,7 +258,7 @@ func (s *Sketch) Update(ctx *RenderCtx) {
// Zoom based on mouse wheel // Zoom based on mouse wheel
wheel := rl.GetMouseWheelMove() wheel := rl.GetMouseWheelMove()
if wheel != 0 { if wheel != 0 {
const zoomIncrement float32 = 0.05 const zoomIncrement float32 = 0.20
if wheel > 0 { if wheel > 0 {
s.cam.Zoom *= 1+zoomIncrement s.cam.Zoom *= 1+zoomIncrement
} else { } else {