Add method to tag entity group with ID and kind

This commit is contained in:
2026-04-13 17:23:17 +02:00
parent a904626307
commit b02b6512fb

View File

@@ -3669,6 +3669,26 @@ export class ViewportHost {
group.add(mesh);
}
private tagEntityGroup(
group: Group,
entityId: string,
entityKind: EntityInstance["kind"]
): Mesh[] {
const meshes: Mesh[] = [];
group.traverse((object) => {
if (!(object instanceof Mesh)) {
return;
}
object.userData.entityId = entityId;
object.userData.entityKind = entityKind;
meshes.push(object);
});
return meshes;
}
private createPointLightGizmoRenderObjects(
entityId: string,
position: Vec3,