A light source that illuminates ShadowCasters and casts shadows.
def __init__(self: Any, position: Tuple[float, float], shape: Literal['point', 'circle', 'rect'], color_key: Union[ColorKeys, List[Tuple[int, int, int, float]], List[Color]], brightness: float = 8.0, distance: float = 16.0, size: Optional[Union[float, Tuple[float, float]]] = None) -> Any
def _assert_color_key(self: Any, key: Any) -> Any
An object that casts a shadow when illuminated by a LightCaster.
x: Union[int, float] = None
y: Union[int, float] = None
shape: Literal['rect', 'circle', 'polygon', 'texture'] = None
color_key: ColorKeys = None
size: Union[Rect, Tuple[int, int], Tuple[float, float], None] = None
alpha_factor: float = None
shadow_depth: float = None
shadow_spread: float = None
def position(self: Any) -> Union[Tuple[int, int], Tuple[float, float]]
def __init__(self: Any, position: Union[Vector2, Rect, Tuple[int, int], Tuple[float, float]], shape: Literal['rect', 'circle', 'polygon', 'texture'], color_key: Union[ColorKeys, List[Tuple[int, int, int, float]], List[Color]], size: Optional[Union[Rect, Tuple[int, int], Tuple[float, float]]] = None, alpha_factor: float = 0.6, shadow_depth: float = 1.0, shadow_spread: float = 1.0) -> Any
def assert_color_key(self: Any, to_assert: Union[ColorKeys, List[Tuple[int, int, int, float]], List[Color]]) -> ColorKeys
def compute_shadow_polygon(self: Any, lx: float, ly: float, max_dist: float) -> List[Tuple[float, float]]
Manages all lights and shadow casters. Renders shadows with fallback,
optional gradient (per‑polygon), optional blur, and debug overlays.
def __init__(self: Any, engine: 'LunaEngine') -> Any
def add_shadow(self: Any, position: Any, shape: Any, color_key: Any, size: Any = None, alpha_factor: float = 0.6, shadow_depth: float = 1.0, shadow_spread: float = 1.0) -> ShadowCaster
def add_light(self: Any, position: Any, shape: Any, color_key: Any, brightness: float = 8.0, distance: float = 16.0, size: Any = None) -> LightCaster
def _draw_caster(self: Any, caster: ShadowCaster, renderer: OpenGLRenderer, color: Color) -> Any
def render(self: Any, renderer: OpenGLRenderer) -> Any
def get_stats(self: Any) -> Any
def pixel_to_centimeter(pixels: Union[int, float], dpi: int = 96) -> Union[int, float]
No documentation
def centimeter_to_pixel(centimeters: Union[int, float], dpi: int = 96) -> Union[int, float]
No documentation
def meter_to_pixel(meters: Union[int, float], dpi: int = 96) -> Union[int, float]
No documentation