Skip to content

Refactor: ChaseCamera optimization, bugfix, javadoc #2505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

capdevon
Copy link
Contributor

@capdevon capdevon commented Jun 18, 2025

This PR introduces significant improvements to the ChaseCamera class:

  1. Refactoring and Code Structure:

    • The modified version introduces improved organization and grouping of class fields, separating configuration, state, and internal-use fields.
    • Several fields are renamed or re-ordered for clarity and logical grouping.
  2. Documentation and Comments:

    • JavaDoc comments across the class and its methods have been expanded, clarified, and improved for better readability and API documentation.
    • Explanatory comments are added throughout, clarifying the intent and logic in many methods.
  3. Input Management Improvements:

    • Input mappings are now managed via a single static array for default mappings.
    • Helper methods like addAxisMapping are introduced to streamline and clarify input mapping code, especially for axis inversion handling.
    • Input cleanup/unregistration is improved for robustness and clarity.
  4. Feature and Logic Enhancements:

    • Methods for registering, cleaning up, and customizing input mappings are made more robust and flexible.
    • Smooth motion and trailing logic have been made clearer, with more explicit state handling and comments.
    • The new version adds better handling for drag-to-rotate and cursor visibility logic.
    • Inversion of mouse axes is handled more flexibly with helper functions and less code repetition.
  5. Serialization:

    • The new version explicitly disables serialization/deserialization of the ChaseCamera via UnsupportedOperationException, clarifying that this is not supported.
  6. API Changes and Additional Getters/Setters:

    • Additional and improved getters/setters are provided, with more detailed documentation.
    • Parameter names and descriptions have been improved for clarity.
  7. Miscellaneous:

    • Some default values for fields have been clarified or made explicit.
    • The copyright year has been updated.

In summary, the proposed changes significantly refactor and document the ChaseCamera class, making the codebase more readable, maintainable, and robust, while improving API documentation and input management flexibility. No major new features are introduced, but the overall quality and clarity of the code are substantially improved.

@yaRnMcDonuts yaRnMcDonuts added this to the v3.9.0 milestone Jun 19, 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