Skip to content

Commit

Permalink
Fix avatar labels turning grey when display name changes
Browse files Browse the repository at this point in the history
Calling `labelMesh.dispose()` with `disposeMaterialAndTextures` set to `true` removed the memoized label materials from the scene without updating the memo. This meant memo entries pointed to empty textures/materials.
  • Loading branch information
Gigabyte5671 committed Oct 24, 2023
1 parent 55c963f commit 1162454
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/entity/entities/LabelEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ export class LabelEntity {
if (!labelMesh || !(/^Label/iu).test(labelMesh.name)) {
return;
}
labelMesh.dispose(false, true);
labelMesh.dispose(false, false);
}

/**
Expand All @@ -441,6 +441,6 @@ export class LabelEntity {
return;
}
const labelMeshes = object.getChildMeshes(false, (node) => (/^Label/iu).test(node.name));
labelMeshes.forEach((labelMesh) => labelMesh.dispose(false, true));
labelMeshes.forEach((labelMesh) => labelMesh.dispose(false, false));
}
}

0 comments on commit 1162454

Please sign in to comment.