"""Perspective flyover of seeded hills with shaded or contour rendering. Run with python -m bruhanimate.demos.terrain_demo."""frombruhanimateimportResizePolicy,effectsfrombruhanimate.effectsimportTerrainPreset
[docs]defrun(*,frames:int|None=None,fps:float=30,preset:TerrainPreset="hills",on_resize:ResizePolicy="resize",)->int:"""Play a typed preset at 30 simulation updates/sec; resize retains state."""returneffects.terrain.play(preset=preset,frames=frames,fps=fps,updates_per_second=30,on_resize=on_resize,)