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

Partially refactor JS utilities to support future webapps in separate folder structure #1364

Merged
merged 6 commits into from
Jul 12, 2021

Conversation

ldcWV
Copy link
Contributor

@ldcWV ldcWV commented Jun 30, 2021

Motivation and Context

vr_utils.js has been added to src/esp/bindings_js/modules. This is a new file that contains functions that help with setting up the eye sensors and updating the sensor locations based on the user's pose.

Changes were also made to utils.js so that it no longer needs to import infoSemanticFileName from defaults.js. This allows it to be independently included as a module in webapps.

How Has This Been Tested

The WebXR Hand Demo port to the new folder structure (#1366) which uses these utils functions was launched and ran successfully.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jun 30, 2021
@ldcWV ldcWV changed the title Changes to the JS utilities Partially refactor JS utilities to support future webapps in separate folder structure Jul 1, 2021
@ldcWV ldcWV marked this pull request as ready for review July 1, 2021 00:42
@ldcWV ldcWV requested a review from eundersander July 1, 2021 00:42
Copy link
Contributor

@eundersander eundersander left a comment

Choose a reason for hiding this comment

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

Let's discuss this PR more in person. I'm not sure about the best way forward.

src/esp/bindings_js/utils/utils.js Outdated Show resolved Hide resolved
src/esp/bindings_js/utils/vr_utils.js Outdated Show resolved Hide resolved
src/esp/bindings_js/utils/vr_utils.js Outdated Show resolved Hide resolved
@ldcWV ldcWV requested a review from eundersander July 6, 2021 22:44
eundersander
eundersander previously approved these changes Jul 7, 2021
Copy link
Contributor

@eundersander eundersander left a comment

Choose a reason for hiding this comment

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

Please make the requested small fix but otherwise LGTM! Oops, actually I'd like to understand the possible code redundancy before we merge this.

src/esp/bindings_js/modules/vr_utils.js Outdated Show resolved Hide resolved
@@ -0,0 +1,80 @@
// Copyright (c) Facebook, Inc. and its affiliates.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any code redundancy between this file and the existing vr_demo.js?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, see here: #1364 (comment)

The existing vr_demo.js will be deleted in #1366, so this redundancy will be resolved as soon as that PR gets merged.

@eundersander eundersander dismissed their stale review July 7, 2021 00:46

I added new comments.

Copy link
Contributor

@eundersander eundersander left a comment

Choose a reason for hiding this comment

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

LGTM

@ldcWV ldcWV merged commit 9b272ef into facebookresearch:master Jul 12, 2021
@ldcWV ldcWV deleted the ldchen/js_utilities_folder branch July 12, 2021 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants