Skip to content

Conversation

capdevon
Copy link
Contributor

@capdevon capdevon commented May 23, 2025

This PR refactors the CameraControl class to improve code clarity and maintainability. Key changes include:

  • Enhanced and expanded Javadoc comments for the class and constructors, clearly explaining usage and synchronization directions.
  • Refactored the control update logic by extracting synchronization operations into separate spatialToCamera() and cameraToSpatial() methods for better readability and separation of concerns.
  • Updated enum declaration style and improved parameter names and descriptions.
  • Replaced magic strings with explicit string literals for serialization field names.
  • Updated copyright.

These improvements clarify how CameraControl works, make the codebase easier to understand, and provide better guidance for future contributors. No behavioral changes are introduced.


Edit:
Serializing the Camera is unnecessary and incorrect because deserializing the CameraControl object causes the Camera to no longer match the one in the SimpleApplication.

@yaRnMcDonuts yaRnMcDonuts added this to the v3.9.0 milestone May 23, 2025
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