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

Local parallax, using local mouse coordinates instead of window one. #397

Closed
4 tasks done
emavitta opened this issue May 2, 2024 · 3 comments
Closed
4 tasks done
Assignees

Comments

@emavitta
Copy link

emavitta commented May 2, 2024

Description

I added multiple scenes to one pages and added multiple <MouseParallax/>component.
Problem is, the ones after the first on top of tha page, had strange behaviour due to the fact that the component uses the position of the mouse in windows, not on the object.
IIt may be useful to add a prop to let the component use its local position instead.
Also it could be nice to add the possibilities to configure also the scrolloption of useMouse

I never proposed nor pushed PR to OSS and i really would like to start, and this seems something easy (i already reimplemented it in a project)...

Suggested solution

in MouseParallax.vue add a local boolean prop that then pass the option of the target to useMouse()
The prop should also enable useElementSize() as the source for widthand height instead of useWindowSize().

Alternative

No response

Additional context

No response

Validations

@emavitta emavitta changed the title Local parallax, using local mouse coordinates instead of windows one. Local parallax, using local mouse coordinates instead of window one. May 2, 2024
@JaimeTorrealba
Copy link
Member

I Love the Idea, PRs is welcome.

If any doubt about the process please feel free to ask me, also, please read the contribution guide first :D

Is it ok if I assign you here, right?

@emavitta
Copy link
Author

emavitta commented May 3, 2024

Yes please, assign it to me!
I'll contact with you if i enconunter some problem... thanks!

@JaimeTorrealba
Copy link
Member

Close by #402

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants