Skip to content

Conversation

@capdevon
Copy link
Contributor

@capdevon capdevon commented May 23, 2025

This PR refactors the Javadoc for the LightControl class to enhance clarity and completeness. It also introduces the validateSupportedLightType() method for robust light type validation.

  1. Class-level Javadoc: Expanded description outlining the control's purpose and typical use cases, particularly regarding dynamic light behavior.

  2. Constructor Javadoc: Clarified parameters and added @throws for invalid light types.

  3. Robust Light Type Validation: Implemented the new validateSupportedLightType() method. This ensures that the LightControl only accepts PointLight, DirectionalLight, and SpotLight instances, providing earlier error detection and preventing unexpected behavior with unsupported light types. This method is called in relevant constructors and setters.

  4. New Feature: Added axisRotation property to LightControl, enabling precise control over which of the spatial's world axes (X, Y, or Z) defines the direction of the light when using SpatialToLight synchronization. This allows for more flexible alignment of lights with complex models.

@yaRnMcDonuts yaRnMcDonuts added this to the v3.9.0 milestone May 23, 2025
@capdevon
Copy link
Contributor Author

Hi @yaRnMcDonuts ,
Please hold off on merging this class for now. I'd like to do some further verification on its functionality.
I'll let you know as soon as it's ready ;)

@capdevon
Copy link
Contributor Author

capdevon commented Jun 9, 2025

I think the PR is ready now!

@yaRnMcDonuts yaRnMcDonuts merged commit 15e978d into jMonkeyEngine:master Jun 15, 2025
16 checks passed
@capdevon capdevon deleted the capdevon-LightControl branch June 30, 2025 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants