Replies: 2 comments 1 reply
-
should be fixed, this was due to a missing type. as for |
Beta Was this translation helpful? Give feedback.
-
what are the other problems you are having with types? myself, i know nothing about TS, i mostly just receive types by contribution. all types are kept here: https://github.com/react-spring/react-three-fiber/blob/master/src/three-types.ts you can make PRs if something's missing. |
Beta Was this translation helpful? Give feedback.
-
Passing a number to
layers
prop on meshes isn't allowed in typescript, while it is in plain javascript.As you can see in this sandbox it's possibile to set
layers={1}
in meshes. In typescript this won't compile becauselayers
is of type Layers in threejs.This sound a bit strange to me, but if we follow the original threejs layers example no compilation error will throw in ts + threejs:
In my opinion threejs types are a bit strange but somehow works, while in
react-three-fiber
right now I'm forced to do something like this:Do you think this issue should be fixed here? I'm having other issues with the types of
react-three-fiber
, maybe we can try to improve our types apart from threejs.That's actually more a bug but since it's not pressing and it involves three.js I tought it was better to open a discussion.
Beta Was this translation helpful? Give feedback.
All reactions