diff --git a/confetti/confetti.go b/confetti/confetti.go index b3aee21..faf3a9a 100644 --- a/confetti/confetti.go +++ b/confetti/confetti.go @@ -64,7 +64,10 @@ func InitialModel() model { if err != nil { panic(err) } + return InitialModelWithSize(width, height) +} +func InitialModelWithSize(width, height int) model { return model{system: &simulation.System{ Particles: Spawn(width, height), Frame: simulation.Frame{ diff --git a/fireworks/fireworks.go b/fireworks/fireworks.go index 715731c..3824221 100644 --- a/fireworks/fireworks.go +++ b/fireworks/fireworks.go @@ -65,7 +65,10 @@ func InitialModel() model { if err != nil { panic(err) } + return InitialModelWithSize(width, height) +} +func InitialModelWithSize(width, height int) model { return model{system: &simulation.System{ Particles: Spawn(width, height), Frame: simulation.Frame{