From fb3c45505f61629081471613aabfd89d2e6be15b Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Tue, 24 Sep 2024 23:14:32 -0400 Subject: [PATCH] BatchedMesh: add deleteInstance() --- types/three/src/objects/BatchedMesh.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/types/three/src/objects/BatchedMesh.d.ts b/types/three/src/objects/BatchedMesh.d.ts index 326479a2d..80523ef62 100644 --- a/types/three/src/objects/BatchedMesh.d.ts +++ b/types/three/src/objects/BatchedMesh.d.ts @@ -195,6 +195,13 @@ declare class BatchedMesh extends Mesh { */ 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.