Skip to content

Improve Gizmo API docs #7620

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

Merged
merged 1 commit into from
Apr 27, 2025
Merged

Improve Gizmo API docs #7620

merged 1 commit into from
Apr 27, 2025

Conversation

willeastcott
Copy link
Contributor

Add much more comprehensive docs for the Gizmo API.

I confirm I have read the contributing guidelines and signed the Contributor License Agreement.

@willeastcott willeastcott added docs Documentation related enhancement labels Apr 27, 2025
@willeastcott willeastcott self-assigned this Apr 27, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR significantly improves the Gizmo API documentation by adding comprehensive descriptions and usage examples for the TranslateGizmo, ScaleGizmo, and RotateGizmo.

  • Enhanced doc comments for TranslateGizmo with detailed description and a clear code example
  • Enhanced doc comments for ScaleGizmo including updated examples and API references
  • Enhanced doc comments for RotateGizmo with improved descriptive text and usage demonstration

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/extras/gizmo/translate-gizmo.js Updated documentation and code example for translation gizmo
src/extras/gizmo/scale-gizmo.js Updated documentation and code example for scaling gizmo
src/extras/gizmo/rotate-gizmo.js Updated documentation and code example for rotation gizmo
Comments suppressed due to low confidence (3)

src/extras/gizmo/translate-gizmo.js:45

  • [nitpick] The example uses 'cameraComponent' while the parameter documentation refers to the camera as 'camera'. Consider making the naming consistent across the API documentation.
* const gizmo = new pc.TranslateGizmo(cameraComponent, gizmoLayer);

src/extras/gizmo/scale-gizmo.js:39

  • [nitpick] The example uses 'cameraComponent' in contrast to the parameter description which uses 'camera'. Align the naming to avoid confusion.
* const gizmo = new pc.ScaleGizmo(cameraComponent, gizmoLayer);

src/extras/gizmo/rotate-gizmo.js:45

  • [nitpick] The variable 'cameraComponent' in the example should be consistently named in line with the parameter documentation (i.e., 'camera') to maintain uniformity across the API docs.
* const gizmo = new pc.RotateGizmo(cameraComponent, gizmoLayer);

@willeastcott willeastcott merged commit 404f9a4 into main Apr 27, 2025
7 checks passed
@willeastcott willeastcott deleted the gizmo-docs branch April 27, 2025 14:36
willeastcott added a commit that referenced this pull request Apr 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant