Light

Variables

Name

Type

Description

type

LightType

The light’s type.

color

Math::vec3

The light’s color.

intensity

float

The light’s intensity, it is multiplied with the color.

direction

Math::vec3

The light’s base direction vector. Only used by directional lights and spot lights.

cutoff

Math::vec2

The light’s cutoff values. Only used by spot lights. In radians.

distance

float

The light’s distance. Only used by point lights and spot lights.

Notes

JSON for the .ntsn - Scene scene file format:

Name

Type

Description

Possible values

light

Array of Object

The Light Component.

Name

Type

Description

Possible values

type

String

The LightType.

  • “Directional”

  • “Point”

  • “Spot”

  • “Ambient”

color

Array of Number

The light’s color.

Any array of 3 numbers.

intensity

Number

The light’s intensity, it is multiplied with the color.

Any number.

direction

Array of Number

The light’s base direction vector. Only used by directional lights and spot lights.

Any array of 3 numbers.

cutoff

Array of Number

The light’s cutoff values. Only used by spot lights. In degrees.

Any array of 2 numbers.

distance

Number

The light’s distance. Only used by point lights and spot lights.

Any number.