Skip to content

Commit

Permalink
BatchedMesh: add deleteInstance()
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 committed Sep 25, 2024
1 parent 8a106b8 commit fb3c455
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions types/three/src/objects/BatchedMesh.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,13 @@ declare class BatchedMesh extends Mesh<BufferGeometry, Material> {
*/
addInstance(geometryId: number): number;

/**
* Removes an existing instance from the BatchedMesh using the given instanceId.
* @param instanceId The id of an instance to remove from the BatchedMesh that was previously added via
* "addInstance".
*/
deleteInstance(instanceId: number): this;

/**
* Replaces the geometry at `geometryId` with the provided geometry. Throws an error if there is not enough space
* reserved for geometry. Calling this will change all instances that are rendering that geometry.
Expand Down

0 comments on commit fb3c455

Please sign in to comment.