SettingsΒΆ
Every effect in bruheffect is configured through a settings dataclass. Construct
a settings object, populate only the fields you care about (all have defaults), and
pass it to the effect constructor. Settings can also be omitted entirely β each
effect falls back to its own defaults.
from bruhanimate import EffectRenderer, Screen, SnowSettings
def demo(screen):
renderer = EffectRenderer(screen, float("inf"), 0.05, "snow", " ", False)
renderer.effect.set_wind(0.6) # runtime setter
renderer.run()
Screen.show(demo)
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.bruheffect.settings.AudioSettings(mode: str = 'bars', bar_char: str = '|', smoothing: float = 0.7, num_bars: int = 0, color: bool = True, sensitivity: float = 1.0, compact: bool = False)[source]ΒΆ
Bases:
object
- class bruhanimate.bruheffect.settings.DrawLinesSettings(char: str = None, thin: bool = False)[source]ΒΆ
Bases:
object
- class bruhanimate.bruheffect.settings.FireSettings(intensity: float = 0.2, wind_direction: float = 0.0, wind_strength: float = 0.0, use_char_color: bool = False, background_color: bool = False, swell: bool = False, swell_halt: int = 1, turbulence: float = 0.0, heat_spot_intensity: float = 0.1)[source]ΒΆ
Bases:
object
- class bruhanimate.bruheffect.settings.FireworkSettings(firework_type: str = 'circular', color_enabled: bool = False, color_type: str = 'solid', rate: float = 0.05)[source]ΒΆ
Bases:
object
- class bruhanimate.bruheffect.settings.GameOfLifeSettings(decay: bool = False, color: bool = False, color_type: str = 'GREYSCALE', scale: str = 'random')[source]ΒΆ
Bases:
object
- class bruhanimate.bruheffect.settings.MatrixSettings(character_halt_range: tuple = (1, 2), color_halt_range: tuple = (1, 2), character_randomness_one: float = 0.7, character_randomness_two: float = 0.6, color_randomness: float = 0.5, gradient_length: int = 1)[source]ΒΆ
Bases:
object
- class bruhanimate.bruheffect.settings.NoiseSettings(intensity: int = 200, color: bool = False)[source]ΒΆ
Bases:
object
- class bruhanimate.bruheffect.settings.OffsetSettings(direction: str = 'right')[source]ΒΆ
Bases:
object
- class bruhanimate.bruheffect.settings.PlasmaSettings(color: bool = False, characters: bool = True, random_colors: bool = False, show_info: bool = False)[source]ΒΆ
Bases:
object
- class bruhanimate.bruheffect.settings.RainSettings(intensity: int = 1, wind_direction: str = 'none', swells: bool = False, collision: bool = False, lightning: bool = False, lightning_chance: float = 0.02)[source]ΒΆ
Bases:
object
- class bruhanimate.bruheffect.settings.SnowSettings(intensity: float = 0.01, wind: float = 0.0, show_info: bool = False, collision: bool = False)[source]ΒΆ
Bases:
object
- class bruhanimate.bruheffect.settings.StarSettings(color_type: str = 'GREYSCALE')[source]ΒΆ
Bases:
object
- class bruhanimate.bruheffect.settings.TwinkleSettings(twinkle_chars: list = <factory>, density: float = 0.05)[source]ΒΆ
Bases:
object
- class bruhanimate.bruheffect.settings.BoidsSettings(num_boids: int = 60, color: bool = True, char: str = '*', max_speed: float = 1.5, perception: float = 12.0)[source]ΒΆ
Bases:
object
- class bruhanimate.bruheffect.settings.SandSettings(color: bool = True, char: str = '#', spawn_rate: float = 0.2)[source]ΒΆ
Bases:
object
- class bruhanimate.bruheffect.settings.DiffusionSettings(color: bool = True, char: str = '.', f: float = 0.055, k: float = 0.062, steps_per_frame: int = 8)[source]ΒΆ
Bases:
object
- class bruhanimate.bruheffect.settings.AutomatonSettings(color: bool = True, char: str = '#', rule: int = 30)[source]ΒΆ
Bases:
object
- class bruhanimate.bruheffect.settings.VoronoiSettings(color: bool = True, char: str = '#', num_seeds: int = 12, seed_speed: float = 0.3)[source]ΒΆ
Bases:
object