Add movingwave template

This commit is contained in:
Patrick Moessler 2023-02-19 22:54:40 +01:00
parent e6bbddb01d
commit 78b8dc3849

View file

@ -1,9 +1,12 @@
from random import choice import pygame as pg
from typing import List from typing import List
from random import choice
from effects.effect import Effect, color_wheel, Colors from effects.effect import Effect, color_wheel, Colors
from effects.bouncingspot import BouncingSpot from effects.bouncingspot import BouncingSpot
from effects.doublespot import DoubleSpot from effects.doublespot import DoubleSpot
import pygame as pg from effects.movingwave import MovingWave
class Presets: class Presets:
@ -40,6 +43,25 @@ class Presets:
BouncingSpot(bounds=self.bounds, color=color_wheel(hue=180)), BouncingSpot(bounds=self.bounds, color=color_wheel(hue=180)),
] ]
def CollidingWaves(self) -> List[Effect]:
return [
MovingWave(
bounds=pg.rect.Rect(0, 0, self.bounds.width, self.bounds.height),
wave_count=5,
wave_height=self.bounds.height // 6,
thickness=20,
),
MovingWave(
bounds=pg.rect.Rect(0, 0, self.bounds.width, self.bounds.height),
hue=180,
wave_count=5,
wave_height=self.bounds.height // 6,
start_phase=120,
start_pos=(0, self.bounds.height * 5 // 6),
thickness=20,
),
]
def BouncingSpotWhite(self) -> List[Effect]: def BouncingSpotWhite(self) -> List[Effect]:
return [ return [
BouncingSpot( BouncingSpot(