"""Damped water ripples with reflecting edges and interacting impulses. Run with python -m bruhanimate.demos.water_demo."""frombruhanimateimportResizePolicy,effectsfrombruhanimate.effectsimportWaterPreset
[docs]defrun(*,frames:int|None=None,fps:float=30,preset:WaterPreset="pond",on_resize:ResizePolicy="resize",)->int:"""Play a typed preset at 30 simulation updates/sec; resize retains state."""returneffects.water.play(preset=preset,frames=frames,fps=fps,updates_per_second=30,on_resize=on_resize,)