Skip to content
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

Tidy and document the codebase. #179

Merged
merged 52 commits into from Jul 22, 2023
Merged

Tidy and document the codebase. #179

merged 52 commits into from Jul 22, 2023

Conversation

Gigabyte5671
Copy link
Member

@Gigabyte5671 Gigabyte5671 commented Jun 27, 2023

This PR adds 141 documenting comments, removes 23 uses of eslint-disable, and addresses a few bugs.

Bugs Addressed:

Features added:

  • An FPS counter in the bottom right corner of the window, toggleable from the graphics settings menu.
  • The history of all log messages can be dumped to a text file via a button in the help menu.

To be addressed in further PRs:

  • (AudioIO) The function for calculating the audio level from the user's microphone should be rewritten as an AudioWorkletProcessor instead of the deprecated ScriptProcessorNode.
  • (object/GameObject.ts:165) The method of removing a GameObject from the scene is rather peculiar. This should be documented with comments and tested.
  • (entity/components/components/skybox.ts) Any changes to the skybox colour (from the Domain server) make it go transparent for a few seconds.

@Gigabyte5671 Gigabyte5671 added the housekeeping Code or documentation clean-up label Jun 27, 2023
@Gigabyte5671 Gigabyte5671 self-assigned this Jun 27, 2023
Expand API interface names from "...Req" and "...Res" to "...Request" and "...Response".
- Rename `findErrorMsg` to `findErrorMessage`.
- Move the `findErrorMessage` function from the Metaverse module to the Debugging module.
- Update the `findErrorMessage` function.
- Convert `Log` IIFE into a class for better readability.
- Document Log methods.
- Rename log type "COMM" to "NETWORK".
- Unite MetaverseOps functions as API class.
- Update API methods documentation.
- Move `MetaverseInfoAPI` path and `MetaverseInfoResponse` interface from the APIAccount module to the APIInfo module.
- Simplify the process of fetching data from the Metaverse API.
- Remove: `P` to print all meshes to console.
- Move `Shift+/` and `resetPosition` to the KeyboardInput module.
- Rename "DomainMgr" to "DomainManager" for clarity.
- Convert DomainManager from an object literal to a static class for clarity.
- Remove unused functions, methods, types, and variables.
- Use `private` syntax instead of `#_` for clarity and consistency.
- Add TSDoc comments to all necessary class members.
- Expand and clarify all method and variable names. For example: `pD` to `domain`, and `avaMixer` to `avatarMixer`.
- Clarify all log messages.
- Make unused promises synchronous.
- Rename "MetaverseMgr" to "MetaverseManager" for clarity.
- Convert MetaverseManager from an object literal to a static class for clarity.
- Remove unused functions, methods, types, and variables.
- Use `private` syntax instead of `#_` for clarity and consistency.
- Add TSDoc comments to all necessary class members.
- Convert AudioIO to a static class.
- Use `private` syntax instead of `$` for clarity.
- Add TSDoc comments to all necessary class members.
- Remove unused methods.
- Create AudioLevel UI component to simplify displaying the mic input level.
- Convert AvatarStoreInterface from an object literal to a static class for clarity.
- Add TSDoc comments to all class members.
- Rename "AvatarEntry" and "AvatarEntryMap" interfaces to "AvatarModel" and "AvatarModelMap" for clarity.
- Add TSDoc comments to all necessary component methods.
- Remove unused component methods.
- Clarify method names.
- Simplify component logic.
- Ensure consistent formatting:
  - Style-Template-Script for all components.
  - `return {};` syntax for data and setup options to ensure consistent handling of `this`.
  - One blank line between all component options for clarity.
- Convert Utility from an object literal to a static class for clarity.
- Clarify variable and method names.
- Add TSDoc comments to all methods.
- Rename "AudioMgr" to "AudioManager" for clarity.
- Convert AudioManager from an object literal to a static class for clarity.
- Remove unused methods and variables.
- Clarify variable and method names.
- Add TSDoc comments to various methods.
- Convert Places from an object literal to a static class for clarity.
- Add TSDoc comments.
- Fix incorrect global component name.
- Correct broken import of `AudioMgr` to `AudioManager`.
- Fix incorrect active Domain assignment.
- Fix typos and grammar.
- Add TSDoc comments to various classes and methods.
- Remove useless getters/setters.
- Use explicit type imports.
My bad, I forgot this was part of our coding standard.
Remove calls to the DefaultRenderingPipeline from VScene, since that pipeline is already managed by the ZoneEntityController.
Copy link
Contributor

@ctrlaltdavid ctrlaltdavid left a comment

Choose a reason for hiding this comment

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

A few minor things noticed in passing to address either in this PR or subsequently.

Note also that the vircadia-web-sdk.d.ts file should not be necessary - the typings are included in the Web SDK.

src/components/overlays/jitsi/Jitsi.vue Outdated Show resolved Hide resolved
src/modules/avatar/controller/inputs/keyboardInput.ts Outdated Show resolved Hide resolved
src/modules/debugging/log.ts Outdated Show resolved Hide resolved
src/modules/debugging/log.ts Outdated Show resolved Hide resolved
src/modules/domain/client.ts Outdated Show resolved Hide resolved
src/modules/domain/client.ts Show resolved Hide resolved
Gigabyte5671 and others added 6 commits July 22, 2023 11:17
Co-authored-by: David Rowe <david@ctrlaltstudio.com>
Signed-off-by: Giga <gigabyte5671@gmail.com>
Co-authored-by: David Rowe <david@ctrlaltstudio.com>
Signed-off-by: Giga <gigabyte5671@gmail.com>
@Gigabyte5671 Gigabyte5671 marked this pull request as ready for review July 22, 2023 01:48
@digisomni digisomni merged commit c6801bd into master Jul 22, 2023
3 checks passed
@Gigabyte5671 Gigabyte5671 deleted the fix/refactor-and-document branch October 25, 2023 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Code or documentation clean-up
Projects
None yet
Development

Successfully merging this pull request may close these issues.

There are hundreds of "NametagBackgroundMaterial" in the material list when viewed with the inspector.
3 participants