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
Convert Boost to tsx #128
Convert Boost to tsx #128
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/pmndrs/racing-game/4Ac8gmrd9oSF3kQBWMzPJ4EsVBKi |
Ok, now we're left with:
|
You're not going to like this one. <instancedMesh ref={ref} args={[null as unknown as BufferGeometry, null as unknown as Material, length]}> You cant cast null to a defined type, but with a little MITM of Or you could go the easy way and use <instancedMesh ref={ref} args={[null as any, null as any, length]}> These type declarations of this TSX are are a bit incorrect as the |
yes, looks like TS types for instancedmesh are wrong, they are most definitively optional. imesh inherits from mesh: Mesh( geometry : BufferGeometry, material : Material )
geometry — (optional) an instance of BufferGeometry. Default is a new BufferGeometry.
material — (optional) a single or an array of Material. Default is a new MeshBasicMaterial @joshuaellis could we change these for the next @types/three release? |
@drcmda hm, we have to pass count, so null wouldn't suffice as part of the args call anyway, you'd have to replace it with Maybe @bjornstar you could open an issue in |
Sure, I've created an issue here: three-types/three-ts-types#92 |
I've opened an issue in |
Excellent, thank you! |
* Convert Boost to tsx * use null! in useRef * Add comment for workaround * Add Props and return value * Add ts-expect-error * ordering
There are 4 typescript errors that I don't know how to deal with:
I figure I should ask for help first before I try more files.