Skip to content

Commit

Permalink
Use old API for loadTextureLOD
Browse files Browse the repository at this point in the history
  • Loading branch information
marwie committed Sep 23, 2024
1 parent dbbec3f commit 8b7e3ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package/Runtime/Facefilter/FaceFilter~/src/Behaviours.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ export class FaceFilterRoot extends Behaviour {
const vertices = t.geometry.getAttribute("position") as BufferAttribute;
if (!vertices?.array || vertices.array.length < 100_000) {
NEEDLE_progressive.assignMeshLOD(t, 0);
NEEDLE_progressive.assignTextureLOD(t, 0);
if(Array.isArray(t.material)) t.material.forEach(m => NEEDLE_progressive.assignTextureLOD(m, 0));
else NEEDLE_progressive.assignTextureLOD(t.material, 0);
}
else {
console.debug(`Will not automatically load progressive mesh for ${t.name} because it has too many vertices (${vertices.array?.length})`);
Expand Down

0 comments on commit 8b7e3ca

Please sign in to comment.