automated snapshot
This commit is contained in:
3
main.go
3
main.go
@@ -62,7 +62,8 @@ func main() {
|
|||||||
|
|
||||||
imageLayer := NewImageLayer("/home/d/Dropbox/photos/Events/2025/Aurora/Photo Nov 11 2025, 9 52 03 PM.jpg")
|
imageLayer := NewImageLayer("/home/d/Dropbox/photos/Events/2025/Aurora/Photo Nov 11 2025, 9 52 03 PM.jpg")
|
||||||
|
|
||||||
sketch.AddColorLayer("background-black", rl.Black)
|
//sketch.AddColorLayer("background-black", rl.Black)
|
||||||
|
sketch.AddColorLayer("background-magenta", rl.Magenta)
|
||||||
sketch.AddLayer("field", &FieldLayer{field: field, dirty: true})
|
sketch.AddLayer("field", &FieldLayer{field: field, dirty: true})
|
||||||
contourLayer := NewContourLayer(&sketch, rng, field)
|
contourLayer := NewContourLayer(&sketch, rng, field)
|
||||||
sketch.AddLayer("contours", contourLayer)
|
sketch.AddLayer("contours", contourLayer)
|
||||||
|
|||||||
@@ -101,13 +101,11 @@ func (s *Sketch) Draw(ctx *RenderCtx) {
|
|||||||
layer.Draw(ctx)
|
layer.Draw(ctx)
|
||||||
rl.PopMatrix()
|
rl.PopMatrix()
|
||||||
rl.EndTextureMode()
|
rl.EndTextureMode()
|
||||||
//rl.GenTextureMipmaps(&instance.texture.Texture)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// composite all layers to screen
|
// composite all layers to screen
|
||||||
|
|
||||||
outputRect := s.calcOutputRectKeepingAspectRatio(ctx)
|
|
||||||
|
|
||||||
// copy from full texture for compositing, with vertical flipping
|
// copy from full texture for compositing, with vertical flipping
|
||||||
src := rl.Rectangle {
|
src := rl.Rectangle {
|
||||||
@@ -124,7 +122,7 @@ func (s *Sketch) Draw(ctx *RenderCtx) {
|
|||||||
viewport := s.CalcViewport(ctx)
|
viewport := s.CalcViewport(ctx)
|
||||||
|
|
||||||
rl.BeginTextureMode(s.composite)
|
rl.BeginTextureMode(s.composite)
|
||||||
rl.ClearBackground(rl.Black)
|
//rl.ClearBackground(rl.Black)
|
||||||
for _, instance := range s.layerToolsOrdered {
|
for _, instance := range s.layerToolsOrdered {
|
||||||
config := instance.config
|
config := instance.config
|
||||||
if config.visible {
|
if config.visible {
|
||||||
@@ -146,6 +144,7 @@ func (s *Sketch) Draw(ctx *RenderCtx) {
|
|||||||
}
|
}
|
||||||
rl.EndTextureMode()
|
rl.EndTextureMode()
|
||||||
|
|
||||||
|
outputRect := s.calcOutputRectKeepingAspectRatio(ctx)
|
||||||
rl.DrawTexturePro(s.composite.Texture, viewport, outputRect, rl.Vector2{}, 0, rl.White)
|
rl.DrawTexturePro(s.composite.Texture, viewport, outputRect, rl.Vector2{}, 0, rl.White)
|
||||||
|
|
||||||
outlineRect := outputRect.ToInt32()
|
outlineRect := outputRect.ToInt32()
|
||||||
|
|||||||
Reference in New Issue
Block a user