Effect Renderer¶

Copyright 2023 Ethan Christensen

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

class bruhanimate.bruhrenderer.effect_renderer.EffectRenderer(screen: Screen, frames: int = 100, frame_time: float = 0.1, effect_type: Literal['static', 'offset', 'noise', 'stars', 'plasma', 'gol', 'rain', 'matrix', 'drawlines', 'snow', 'twinkle', 'audio', 'chat', 'firework', 'fire', 'julia'] = 'static', background: str = ' ', transparent: bool = False)[source]¶

Bases: BaseRenderer

Class for rendering the Effect and only the Effect

__init__(screen: Screen, frames: int = 100, frame_time: float = 0.1, effect_type: Literal['static', 'offset', 'noise', 'stars', 'plasma', 'gol', 'rain', 'matrix', 'drawlines', 'snow', 'twinkle', 'audio', 'chat', 'firework', 'fire', 'julia'] = 'static', background: str = ' ', transparent: bool = False)[source]¶
render_img_frame(frame_number: int)[source]¶

No-op implementation since EffectRenderer doesn’t render images.

Parameters:

frame_number (int) – The current frame number.

Returns:

None

render_effect_frame(frame_number: int)[source]¶

Renders a single frame of the effect. This method is kept for backwards compatibility but isn’t needed since the base renderer handles effect rendering automatically.

Parameters:

frame_number (int) – The current frame number.

Returns:

None