Skip to content

Commit

Permalink
Update stlSerializer.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
aWeirdo committed Oct 13, 2020
1 parent 4e1a56f commit ef1937d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion serializers/src/stl/stlSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export class STLExport {
if (binary) {
for (let i = 0; i < meshes.length; i++) {
let mesh = meshes[i];
faceCount += !mesh.isUnIndexed ? mesh.getIndices().length / 3 : 0;
let indices = mesh.getIndices();
faceCount += indices ? indices.length / 3 : 0;
}

let bufferSize = 84 + (50 * faceCount);
Expand Down

0 comments on commit ef1937d

Please sign in to comment.