question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

InstancedBufferGeometry: maxInstancedCount property

See original GitHub issue

The maxInstancedCount property is poorly-named, IMO.

I suggest that the property be renamed to .instanceDrawCount, which specifies the number of instances to render. That is how the property is being used.

Also, the renderer should silently ensure the draw count does not exceed the maximum possible, based on the buffer size – as we currently do with BufferGeometry.drawRange.

  • [ x ] Dev
  • [ x ] r115

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
Mugen87commented, May 12, 2020

I would make it a mandatory parameter similar to InstancedMesh.

0reactions
WestLangleycommented, Apr 2, 2020

OK. Does #11209 have any bearing on this issue?

Do you think .count should be initialized to Infinity, as is .drawRange.count?

Read more comments on GitHub >

github_iconTop Results From Across the Web

three.js - Updating InstancedBufferGeometry and ...
... r124 InstancedBufferGeometry does not have a maxInstanceCount property. With r117 maxInstancedCount was renamed to just instanceCount .
Read more >
InstancedBufferGeometry – three.js docs
An instanced version of BufferGeometry. Constructor. InstancedBufferGeometry( ). Properties. See BufferGeometry for inherited properties. # .instanceCount : ...
Read more >
How to use Three.js InstancedBufferGeometry ... - iTecNote
Apparently Three's InstancedBufferGeometry & InstancedBufferAttribute objects ... InstancedBufferGeometry and THREE. ... maxInstancedCount = 8; cubeGeo.
Read more >
Instancing with three.js — Part 2 | by Dusan Bosnjak
InstancedBufferGeometry () //this is going to wrap both geometry and a bit of the scene ... There is one missing though, the property...
Read more >
Rendering 100k spheres, instantiating and draw calls
InstancedBufferGeometry ().copy(baseGeometry);. let instanceCount = 7000;. instancedGeometry.maxInstancedCount = instanceCount;.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found