-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Any plans to support ambient XRFrame definition? #2501
Comments
We have a v9 branch that addresses this (#2331), yes. We're also catching up the rest of the ecosystem (three-stdlib, Drei, react-xr) since it is such a breaking change. |
Great news!! |
I'm not sure of a way for us to fix this outside of major semver, but another workaround could be: type XRFrameImpl = XRFrame
type XRFrameRequestCallbackImpl = XRFrameRequestCallback
declare module 'three' {
interface XRFrame extends XRFrameImpl {}
type XRFrameRequestCallback = XRFrameRequestCallbackImpl
} |
Yeah, that was my concern since it narrows supported three versions down. The alternative approach you wrote might help, but when I tried in the same approach, I got so many errors and I gave up. Some additional tricks may be needed, I believe. |
Correction: the approach works. Only problem that remains is this approach still does not compatible for older versions three.js (<141) since there's no webxr's ambient declarations and the top-level Though, for my problem, this will suffice. Thank you! |
I'm not seeing this problem fixed right now, though #2377 has been merged, and the GitHub UI says it should close this issue. |
IIUC, v9 has not been released yet and the fix was merged into v9 branch only, v8 users could still affect this problem. |
That makes sense to me. Apologies, I did not know which versions were affected. |
Published v8.15.1 with a workaround. |
Hi,
I recently bumped into a problem that transpiling ts code using the combination of the latest react-three/fiber and @types/three results in a following compilation error.
Setting
skipLibCheck: true
avoids the problem but I don't want to skip it if we could.So, are there any plans to support ambient XRFrame as well as the latest three?
I understand the situation that the breaking change in r141 was intended and therefore @types/three has no motivation to fix it, so I wish react-three-fiber would make some fixes in its usage.
The text was updated successfully, but these errors were encountered: