Scripting API

Scripting API

SceneLight

Record struct in Abyss.Core, from Abyss.Core.

A light's color and strength, as World.LightOf reads them: a sun of 2,000 lux is a bright day, 100 lux moonlight. The color is sRGB.

public readonly record struct SceneLight

Remarks

Laid out as abyss_core::lighting::SceneLight is, 20 bytes.

Constructors

SceneLight

public SceneLight(LightKind Kind, Vector3 Color, float Intensity)

A light's color and strength, as World.LightOf reads them: a sun of 2,000 lux is a bright day, 100 lux moonlight. The color is sRGB.

Parameters

  • Kind: Which kind of light it is: the light's own, which World.SetLight does not change.
  • Color: Its color, sRGB.
  • Intensity: How strong it is: lux for a directional light, lumens for a point or a spot light.

Laid out as abyss_core::lighting::SceneLight is, 20 bytes.

Properties

Kind

public LightKind Kind { get; init; }

Which kind of light it is: the light's own, which World.SetLight does not change.

Color

public Vector3 Color { get; init; }

Its color, sRGB.

Intensity

public float Intensity { get; init; }

How strong it is: lux for a directional light, lumens for a point or a spot light.