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
InstancedBufferGeometry.maxInstancedCount => .instanceCount #19135
Conversation
Don't you think it's better to name the property just |
@Mugen87 OK, if you want. But now that I think about it, I am wondering if this PR is even a good idea... Having a Maybe leave the API the same? |
I think the thing is that you want to align the API towards When creating an instance of @mrdoob What is your preference here? 😊 |
With With |
Yes, that's important to highlight. |
I think this PR is good-to-go. |
@mrdoob tl;dr Currently, This PR renames the property to |
Thanks! |
Since mrdoob/three.js#19135 the default value for instanceCount is Infinity. The copy function of InstancedBufferGeometry overwrites this value with undefined from the source. If instanceCount is undefined, the Math.min() in the renderer leads to NaN and zero instances are rendered.
Fixes #18990.
I'll update the migration docs if this is merged.