-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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(docs): add r3f doc guide #2002
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
Be great to get thoughts and opinions from you both. |
This comment was marked as off-topic.
This comment was marked as off-topic.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
const x = (e.offsetX / width) * 2 - 1 | ||
const y = (e.offsetY / height) * -2 + 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this NDC math is inbuilt into R3F's state model as pointer
. I'd have to defer to @drcmda as for surrounding patterns but you could greatly reduce boilerplate with <Canvas onCreated={(state) => state.events.connect(window)} />
.
Co-authored-by: Kris <kjbaumgartner@gmail.com>
Co-authored-by: Kris <kjbaumgartner@gmail.com>
Co-authored-by: Kris <kjbaumgartner@gmail.com>
I haven't replied to every comment, but overall, thank you both very much for your feedbacks. I won't be re-asking you to review (don't want to pest) but until the PR is merged / comments are resolved, please feel free to comment adhoc. |
What
r3f
guide toreact-spring
documentation