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

feat(core): allow using window as pointer events source #583

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

acvigue
Copy link

@acvigue acvigue commented Mar 9, 2024

Added a useWindowPointer prop to TresCanvas that states whether or not to use the window as the source of pointer events.

Closes #581

Added the prop to docs page, let me know if I'm missing anything 😄

Copy link

netlify bot commented Mar 9, 2024

Deploy Preview for tresjs-docs ready!

Name Link
🔨 Latest commit e1184db
🔍 Latest deploy log https://app.netlify.com/sites/tresjs-docs/deploys/6620d98c3f87620008e0a8da
😎 Deploy Preview https://deploy-preview-583--tresjs-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@acvigue acvigue marked this pull request as draft March 9, 2024 06:02
@acvigue acvigue marked this pull request as ready for review March 9, 2024 14:59
@andretchen0
Copy link
Contributor

@alvarosabu @Tinoooo

What do you think about expanding the TresCanvas props here?

useWindowPointer: undefined,

My take:

I'm completely on board with allowing additional ways for the system to get events.

But, rather than passing a boolean flag that has to be implemented by the system for this particular case, I'd prefer to invert the dependencies. E.g., define a default PointerEventSource and allow the users to optionally provide their own.

Maybe that's something that can wait though.

@alvarosabu alvarosabu added p2-nice-to-have Not breaking anything but nice to have (priority) on-hold labels Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on-hold p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use window for pointerevents
3 participants