Closed nturley closed 3 years ago
hi @nturley thanks for reporting. I think it's outside of the codegen. Type intersection on the props for each type with CustomProps
is done, so it should have been added there and that should be cleaned up to be more restrictive actually :)
https://github.com/brianzinn/react-babylonjs/blob/40412ad5056b51d96aef2386f2cd649d53d899f0/src/CreatedInstance.ts#L27
That will include it automatically in the JSX intrinsic elements everywhere :)
It looks like I'm getting props type errors for
fromInstance
, andsource
. The code executes just fine so I assume it's just a typing issue and not a functional issue.Issue seems to be present in version 2.3.1 even though
fromInstance
support was added around 2.2.8 and instancedMesh was added around 2.2.7.I'm guessing these props are missing from generatedProps.ts?
I'm happy to contribute a PR but I was having a hard time understanding how the codegen works. If you point me in the right direction, I could take a crack at it.
Screenshots
Minimal Example
https://stackblitz.com/edit/react-ts-wxuhxh?file=index.tsx