You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Without it it becomes pretty complicated to know how many objects/geometries have been added to a BatchedMesh instance and do operations like traversing all of them to set the matrices, make sure you are in the range before updating one of them, etc.
Solution
I see that the BatchedMesh implementation is already using a private _geometryCount property, it should be as easy as to rename it as count and update the docs.
Alternatives
I think the proposed solution is the best as it would converge the API with InstancedMesh.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Kikedao
changed the title
Expose count in BatchedMesh
Expose 'count' property in BatchedMesh
Apr 10, 2024
Description
BatchedMesh
doesn't have a publiccount
property,InstancedMesh
does though (https://threejs.org/docs/#api/en/objects/InstancedMesh.count).Without it it becomes pretty complicated to know how many objects/geometries have been added to a
BatchedMesh
instance and do operations like traversing all of them to set the matrices, make sure you are in the range before updating one of them, etc.Solution
I see that the
BatchedMesh
implementation is already using a private_geometryCount
property, it should be as easy as to rename it ascount
and update the docs.Alternatives
I think the proposed solution is the best as it would converge the API with
InstancedMesh
.Additional context
No response
The text was updated successfully, but these errors were encountered: