rename movingwave to rainbowwave

This commit is contained in:
Patrick Moessler 2023-02-23 02:02:57 +01:00
parent d9f06edb1e
commit 9422ccce07
2 changed files with 7 additions and 7 deletions

View file

@ -12,7 +12,7 @@ from effects.drops import Drops
from effects.bouncingspot import BouncingSpot from effects.bouncingspot import BouncingSpot
from effects.doublespot import DoubleSpot from effects.doublespot import DoubleSpot
from effects.moonflower import Moonflower from effects.moonflower import Moonflower
from effects.movingwave import MovingWave from effects.rainbowwave import RainbowWave
from effects.rotatingpoly import RotatingPoly from effects.rotatingpoly import RotatingPoly
from effects.scanreticle import ScanReticle from effects.scanreticle import ScanReticle
from effects.spiro import Spiro from effects.spiro import Spiro
@ -98,14 +98,14 @@ class Presets:
def CollidingWaves(self) -> List[Effect]: def CollidingWaves(self) -> List[Effect]:
return [ return [
MovingWave( RainbowWave(
bounds=pg.rect.Rect(0, 0, self.bounds.width, self.bounds.height), bounds=pg.rect.Rect(0, 0, self.bounds.width, self.bounds.height),
wave_count=5, wave_count=5,
wave_height=self.bounds.height // 6, wave_height=self.bounds.height // 6,
thickness=20, thickness=20,
mover=transform_oscillate(self.bounds, 60, (0, 0)), mover=transform_oscillate(self.bounds, 60, (0, 0)),
), ),
MovingWave( RainbowWave(
bounds=pg.rect.Rect(0, 0, self.bounds.width, self.bounds.height), bounds=pg.rect.Rect(0, 0, self.bounds.width, self.bounds.height),
hue=180, hue=180,
wave_count=5, wave_count=5,
@ -121,7 +121,7 @@ class Presets:
def FallingWave(self) -> List[Effect]: def FallingWave(self) -> List[Effect]:
bounds = pg.rect.Rect(0, 0, self.bounds.width, self.bounds.height // 3) bounds = pg.rect.Rect(0, 0, self.bounds.width, self.bounds.height // 3)
return [ return [
MovingWave( RainbowWave(
bounds=bounds, bounds=bounds,
wave_count=8, wave_count=8,
wave_height=self.bounds.height // 8, wave_height=self.bounds.height // 8,

View file

@ -1,12 +1,12 @@
from typing import Any, Optional, Tuple from typing import Any, Optional
import pygame as pg import pygame as pg
from effects.effect import MovingEffect from effects.effect import MovingEffect
from util.color import Colors, rainbow_surface from util.color import Colors, rainbow_surface
from util.transform import PositionGenerator, transform_oscillate from util.transform import PositionGenerator
import math import math
class MovingWave(MovingEffect): class RainbowWave(MovingEffect):
def __init__( def __init__(
self, self,
bounds: pg.Rect, bounds: pg.Rect,