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

Apply Scrolling Page Support #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davidbiga
Copy link

This adds an optional setter that allows you to add the scrolled y offset.
Use cases might entail if you have a component undeath a canvas that is rendered
that the user has to scroll to.

This adds an optional setter that allows you to add the scrolled y offset.
Use cases might entail if you have a component undeath a canvas that is rendered
that the user has to scroll to.
@davidbiga
Copy link
Author

davidbiga commented Jun 10, 2018

To give more context:

I have an interface that is part rendered via THREEjs and the other ReactJS. The problem I found was when the user scrolled down the page and hovered over the rendered model, there was an offset where the mouse was interpreted as being positioned at the top of the page. So what I did was create a scroll event listener and pass in the y offset as needed. Hence the new setter.

I would suppose others will find this helpful.

@Habacef
Copy link

Habacef commented Nov 7, 2021

I am using React and ThreeJS rendering together too. I see at multiple of my "react" interfaces that the meshes seem to think my mouse is "over" them. So I encorporated your code because I thought this may help. However it abolished all reaction and I couldn't get any object detected...

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