shared_player_demo

A native effect with ten simulation ticks and sixty presentations per second.

class bruhanimate.demos.shared_player_demo.StepEffect(buffer)[source]
__init__(buffer)[source]

Base class for all effects.

Parameters:
  • buffer (Buffer) – Effect buffer to push updates to.

  • background (str) – character or string to use for the background.

  • seed – Non-negative integer for independent Python and NumPy random streams. None uses fresh entropy. Global RNG state is untouched.

update(dt)[source]

Advance simulation by one tick; dt is the tick duration in seconds.

bruhanimate.demos.shared_player_demo.build(buffer)[source]
bruhanimate.demos.shared_player_demo.run(*, frames=None, fps=60, on_resize: Literal['raise', 'resize'] = 'resize')[source]