cloneFor method
Clones carry the light, sharing the light object like other clone payloads (geometry, materials).
Implementation
@override
Component? cloneFor(Node cloneOwner) {
if (_usesLightDirection) {
return DirectionalLightComponent.fromLightDirection(light);
}
final localDirection = _localDirection;
return DirectionalLightComponent._copy(
light,
usesLightDirection: false,
localDirection: localDirection,
);
}