setDirectionalLight method
Implementation
void setDirectionalLight(int entity, Flix3DDirectionalLight light) {
_ensureNotDisposed();
if (!light.isValid) {
throw ArgumentError.value(
light,
'light',
'Directional light settings are invalid.',
);
}
if (_api.setDirectionalLight(
_handle,
entity,
light.direction.x,
light.direction.y,
light.direction.z,
light.color.x,
light.color.y,
light.color.z,
light.intensity,
) ==
0) {
throw ArgumentError(
'The native scene rejected directional light for entity $entity.',
);
}
}