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

Fixes code example #4851

Merged
merged 2 commits into from
Aug 7, 2024
Merged

Fixes code example #4851

merged 2 commits into from
Aug 7, 2024

Conversation

Hamidrzash
Copy link
Contributor

Fixed code example for pickMaterialExample to work in webXR

About #4847

Fixed code example for pickMaterialExample to work in webXR
Copy link

google-cla bot commented Aug 7, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@Hamidrzash Hamidrzash changed the title Fixed code example Fixes code example Aug 7, 2024
@@ -766,7 +766,7 @@ <h2 class="demo-title">Materials API</h2>
}
};

modelViewer.addEventListener("click", changeColor);
document.addEventListener("click", changeColor);
Copy link
Contributor

Choose a reason for hiding this comment

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

Have you tested this whole page? I'm guessing since there are multiple examples, this might have odd behavior. Maybe add a check in changeColor to ensure the event came through the right element?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

add a check in changeColor to ensure the event came through the right element?

You are right. i think my new commit fixes this

Copy link
Contributor

@elalish elalish left a comment

Choose a reason for hiding this comment

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

Thanks!

@elalish elalish merged commit 8b9ef5d into google:master Aug 7, 2024
3 checks passed
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