Skip to content

Fixes code example#4851

Merged
elalish merged 2 commits intogoogle:masterfrom
Hamidrzash:master
Aug 7, 2024
Merged

Fixes code example#4851
elalish merged 2 commits intogoogle:masterfrom
Hamidrzash:master

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
@google-cla
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
};

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
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