Skip to content

Commit

Permalink
updates, need to rework for better intellisense
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanlchristensen committed Oct 7, 2024
1 parent 74ae55d commit 99f5673
Show file tree
Hide file tree
Showing 24 changed files with 392 additions and 344 deletions.
4 changes: 2 additions & 2 deletions bruhanimate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from .bruhutil import (
Screen,
Buffer,
images,
bruhimage,
get_image,
text_to_image,
LIFE_COLORS,
Expand Down Expand Up @@ -144,7 +144,7 @@
"PanRenderer",
"FocusRenderer",
"BackgroundColorRenderer",
"images",
"bruhimage",
"__version__",
"__valid_demos__",
"LIFE_COLORS",
Expand Down
71 changes: 46 additions & 25 deletions bruhanimate/bruheffect/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,53 @@
from .snow_effect import SnowEffect
from .twinkle_effect import TwinkleEffect, TWINKLE_SPEC
from .offset_effect import OffsetEffect
from .rain_effect import RainEffect
from .rain_effect import RainEffect
from .noise_effect import NoiseEffect


__all__ = [
"BaseEffect",
"StaticEffect",
"StarEffect",
"ChatbotEffect",
"DrawLinesEffect",
"GameOfLifeEffect",
"MatrixEffect",
"PlasmaEffect",
"SnowEffect",
"TwinkleEffect",
"OffsetEffect",
"RainEffect",
"NoiseEffect",
"GradientNoise",
"Loading",
"StringStreamer",
"Key",
"Line",
"TWINKLE_SPEC"
]

if sys.platform == 'win32':
if sys.platform == "win32":
from .audio_effect import AudioEffect
__all__.append("AudioEffect")
__all__ = [
"BaseEffect",
"AudioEffect",
"StaticEffect",
"StarEffect",
"ChatbotEffect",
"DrawLinesEffect",
"GameOfLifeEffect",
"MatrixEffect",
"PlasmaEffect",
"SnowEffect",
"TwinkleEffect",
"OffsetEffect",
"RainEffect",
"NoiseEffect",
"GradientNoise",
"Loading",
"StringStreamer",
"Key",
"Line",
"TWINKLE_SPEC",
]
else:
__all__ = [
"BaseEffect",
"StaticEffect",
"StarEffect",
"ChatbotEffect",
"DrawLinesEffect",
"GameOfLifeEffect",
"MatrixEffect",
"PlasmaEffect",
"SnowEffect",
"TwinkleEffect",
"OffsetEffect",
"RainEffect",
"NoiseEffect",
"GradientNoise",
"Loading",
"StringStreamer",
"Key",
"Line",
"TWINKLE_SPEC",
]
22 changes: 13 additions & 9 deletions bruhanimate/bruhrenderer/background_color_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,27 @@
limitations under the License.
"""

from bruhcolor import bruhcolored
from typing import List
from .base_renderer import BaseRenderer
from bruhcolor import bruhcolored
from ..bruhutil.bruhtypes import EffectType


class BackgroundColorRenderer(BaseRenderer):
def __init__(
self,
screen,
frames,
time,
img,
on_color_code,
effect_type="static",
background=" ",
transparent=False,
img: List[str],
frames: int = 100,
frame_time: float = 0.1,
effect_type: EffectType = "static",
background: str = " ",
transparent: bool = False,
collision: bool = False,
on_color_code: int = 27,
):
super(BackgroundColorRenderer, self).__init__(
screen, frames, time, effect_type, background, transparent
screen, frames, frame_time, effect_type, background, transparent, collision
)

self.img = img
Expand Down
Loading

0 comments on commit 99f5673

Please sign in to comment.