pygfx.helpers.DirectionalLightHelper

class pygfx.helpers.DirectionalLightHelper(ray_length=1, color=None, show_shadow_extent=False)

Bases: Line

Light source indicator for directional lights.

Helper class to visualize a directional light. It shows arrows eminating from the light’s position. If show_shadow_extent is True, it also shows the vector to the target and the extent of the shadowmap. The helper object should be a child of the light object.

Parameters:
  • ray_length (float) – The length of the indicator arrows.

  • color (Color) – The color of the arrows. If None, match the color of the light.

  • show_shadow_extent (bool) – If True, indicate the extent of the shadow map.

property ray_length

The length of the arrows indicating light rays.

property show_shadow_extent

Whether to also show the extent of the shadowmap.