Future Features

class arcade.future.light.Light(center_x: float, center_y: float, radius: float = 50.0, color: tuple[int, int, int] | tuple[int, int, int, int] = (255, 255, 255, 255), mode: str = 'hard')[source]

Bases:

Create a Light.

Note: It’s important to separate lights that don’t change properties and static ones with the usage parameter.

Parameters:
  • center_x – X position of the light

  • center_y – Y position of the light

  • radius – Radius of the light

  • color – Color of the light

  • mode – ‘hard’ or ‘soft’ light

HARD = 1.0
SOFT = 0.0
property position: tuple[float, float]

Get or set the light position

property radius: float

Get or set the light size

class arcade.future.light.LightLayer(width: int, height: int)[source]

Bases: RenderTargetTexture

Create a LightLayer

The size of a layer should ideally be of the same size and the screen.

Parameters:
  • width – Width of light layer

  • height – Height of light layer

🧙 iter(self) Iterator[Light][source]

Return an iterable object of lights

🧙 len(self) int[source]

Number of lights

add(light: Light)[source]

Add a Light to the layer

clear()[source]

Clear the light layer

property diffuse_texture

The diffuse texture

draw(position: tuple[float, float] = (0, 0), target=None, ambient_color: tuple[int, int, int] | tuple[int, int, int, int] = (64, 64, 64))[source]

Draw the lights

Parameters:
  • position – Position offset (scrolling)

  • target – The window or framebuffer we want to render to (default is window)

  • ambient_color – The ambient light color

extend(lights: Sequence[Light])[source]

Add a list of lights to the layer

property light_texture

The light texture

remove(light: Light)[source]

Remove a light to the layer

resize(width, height)[source]

Resize the light layer

class arcade.future.video.VideoPlayer(path: str | Path, loop: bool = False)[source]

Bases:

Primitive video player for arcade.

Parameters:
  • path – Path of the video that is to be played.

  • loop – Pass True to make the video loop.

draw(left: int = 0, bottom: int = 0, size: tuple[int, int] | None = None) None[source]

Draw the current video frame.

Parameters:
  • left – Window position from the left.

  • bottom – Window position from the bottom.

  • size – The size of the video rectangle. If None, the video will be drawn in its original size.

get_video_size() tuple[int, int][source]
property height: int

Video height.

property width: int

Video width.

class arcade.future.video.video_player.VideoPlayerView(path: str | Path)[source]

Bases: View

on_draw() None[source]