ModelLight class final

A punctual light, decoded from KHR_lights_punctual or held for a writer to encode into it — fmt-28's own row.

Values, not watts. intensity is exactly the number the extension carries — lux for ModelLightType.directional, candela for ModelLightType.point/ModelLightType.spot — and this class does no unit conversion of its own; a caller feeding it to a renderer with a different convention does that conversion at the seam, not here.

Constructors

ModelLight({required ModelLightType type, Vector3? color, double intensity = 1.0, double? range, double innerConeAngle = 0.0, double? outerConeAngle, String? name})

Properties

color → Vector3
Linear RGB, the same convention every other colour in this package (SurfaceMaterial.baseColor excepted, which is non-linear as authored) already uses for a light or a material factor.
final
hashCode → int
The hash code for this object.
no setterinherited
innerConeAngle → double
Spot-only: the angle, in radians, inside which a spot is at full intensity. Meaningless for the other two types and kept anyway, since ModelLightType.point/ModelLightType.directional never read it and a writer only emits it for a spot.
final
intensity → double
Lux for ModelLightType.directional, candela otherwise. The specification's own default when a file omits the key.
final
name → String?
final
outerConeAngle → double
Spot-only: the angle, in radians, past which a spot contributes nothing. Defaults to the specification's own quarter turn over four — 45 degrees.
final
range → double?
Distance at which a point or spot light stops contributing, or null for unbounded — the specification's own default when the key is absent, kept as null rather than folded into a number so a writer can tell "the file said no limit" from "the file said a very large number" and omit the key again rather than inventing one.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → ModelLightType
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited