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
fixing merge() function not accepting with BufferGeometry-typed argument #21207
Conversation
TS2345: Argument of type 'Geometry | BufferGeometry' is not assignable to parameter of type 'Geometry'.
types/three/three-core.d.ts to authors (@gyohk @florentpoujol @SereznoKot @omni360 @ivoisbelongtous @piranha771 @qszhusightp @nakakura @s093294 @Pro @efokschaner Kon (account can't be detected)). Could you review this PR? |
@salaros Please fix the failures indicated in the Travis CI log. |
@RyanCavanaugh I don't know if you have already read the log, but the failures reported by Travis-CI has nothing to do with my fix! The errors reported by Travis are tests-related (ban-comma-operator). Do you want me to create yet another PR with fixes for this errors? Because IMO ban-comma-operator error has to be fixed apart. It's not a good practice to mix fixes for the main code-base with test-related stuff (I mean when tests failing are not directly affected by the changes committed to the code), I hope you understand what I mean. Please accept this PR and I will create another one which fixes tests.
|
Hey @salaros , judging from the implementation, you cannot pass a Does that seem right to you? |
So might this definition be a problem? I mean if BufferGeometry type doesn't have isGeometry could we really use it as an alternative to Geometry type on Mesh/Object3D.geometry property?
I feel that in vanilla Three.js or @types/three there is some sort of type inconsistency across Geometry-related methods and properties.
However if you think my there is still something wrong with TS wrapper, just let me know - I really willing to help. |
I don't think the Instead of excluding
I will say that I appreciate you taking the time to help, and if you find anything else that could be improved I'd be pleased to hear from you again. |
OK, thanks for the interesting solution, I will definitely give it a try |
Example of the error I was getting before applying this fix:
How to reproduce: