Update tests to check collider kind and flatten triangles

This commit is contained in:
2026-04-05 02:33:19 +02:00
parent 8f8f6894af
commit 8cc5804278
2 changed files with 6 additions and 3 deletions

View File

@@ -80,10 +80,11 @@ describe("box brush geometry", () => {
const diagnostics = validateBoxBrushGeometry(brush);
const derivedMesh = buildBoxBrushDerivedMeshData(brush);
const triangles = derivedMesh.faceSurfaces.flatMap((surface) => surface.triangles);
expect(diagnostics).toEqual([]);
expect(derivedMesh.faceSurfaces).toHaveLength(6);
expect(derivedMesh.faceSurfaces.every((surface) => surface.triangles).flat()).toHaveLength(12);
expect(triangles).toHaveLength(12);
expect(Array.from(derivedMesh.colliderIndices)).toHaveLength(36);
});