pmndrs / react-three-fiber

🇨🇭 A React renderer for Three.js
https://docs.pmnd.rs/react-three-fiber
MIT License
27.62k stars 1.6k forks source link

fix(types): fix React typings, fault tolerant Node type #3362

Closed lukaselmer closed 1 month ago

lukaselmer commented 2 months ago

Fixes https://github.com/pmndrs/react-three-fiber/issues/3361 by making the Node type fault tolarant: if the three object does not exist (and the type ends up as being any), the Node type will catch this and reduce the any type to {}

codesandbox-ci[bot] commented 2 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 22e604ddd1da197067b906ce9599903cbc4783df:

Sandbox Source
example Configuration
CodyJasonBennett commented 1 month ago

Great work. This fixes the same issues reported in Drei https://github.com/pmndrs/drei/issues/823 https://github.com/pmndrs/drei/issues/1193.