You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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().
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
The text was updated successfully, but these errors were encountered:
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
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
scroll
option ofuseMouse
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 alocal
boolean prop that then pass the option of the target touseMouse()
The prop should also enable
useElementSize()
as the source forwidth
andheight
instead ofuseWindowSize()
.Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: