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

Types: Removed classes from three.js are still available at R3F #3210

Closed
satoshionoda opened this issue Mar 20, 2024 · 3 comments
Closed

Types: Removed classes from three.js are still available at R3F #3210

satoshionoda opened this issue Mar 20, 2024 · 3 comments
Labels
duplicate This issue or pull request already exists Typescript issues to do with TS

Comments

@satoshionoda
Copy link

**BufferGeometry such as boxBufferGeometry, circleBufferGeometry and others had been deprecated since three.js r144 and completely removed at r154. But they are still available at R3F and cause runtime error when we use.

Can I make a PR of changing three-types.ts?

@CodyJasonBennett
Copy link
Member

No, that is a breaking change which is why they are deprecated in those definitions. Maybe there's a way for TS to surface this in the JSX, otherwise this is not actionable until our next major where JSX is typed dynamically.

@satoshionoda
Copy link
Author

@CodyJasonBennett

Those **BufferGeometry are not deprecated anymore, it's completely removed from THREE and causes runtime error with the latest versions. Do we still need them on the R3F definition?

DEMO:
https://codesandbox.io/p/sandbox/loving-tereshkova-rcvl4h?file=%2Fsrc%2FApp.tsx%3A6%2C15

@CodyJasonBennett CodyJasonBennett changed the title Removed classes from three.js are still available at R3F Types: Removed classes from three.js are still available at R3F Mar 24, 2024
@CodyJasonBennett
Copy link
Member

Please see my prior comment. We have acknowledged this before in #3038 with #3052. We cannot remove even depreciated JSX since we support older three.js versions. Such is the status quo until our next major where these are dynamically typed into JSX and not hardcoded three-types.tsx@v9. This was the result of 3 years of work and is not possible to backport to v8. Please, no more pushback on this unless you fully acknowledge our API contract and constraints, because frankly I see no other solution nor dire problem this is worth undivided attention for.

@pmndrs pmndrs locked as off-topic and limited conversation to collaborators Mar 24, 2024
@CodyJasonBennett CodyJasonBennett added duplicate This issue or pull request already exists Typescript issues to do with TS labels Mar 24, 2024
@CodyJasonBennett CodyJasonBennett closed this as not planned Won't fix, can't repro, duplicate, stale Mar 25, 2024
@pmndrs pmndrs unlocked this conversation Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists Typescript issues to do with TS
Projects
None yet
Development

No branches or pull requests

2 participants