Skip to content

Commit b858de8

Browse files
authored
Merge pull request #7971 from acgillette/saveObj_failing_download_fix
Replace fn with direct downloadFile import to fix issue where fn was not found
2 parents 6d4540c + cbb3328 commit b858de8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/webgl/p5.Geometry.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import * as constants from '../core/constants';
1212
import { DataArray } from './p5.DataArray';
1313
import { Vector } from '../math/p5.Vector';
14+
import { downloadFile } from '../io/utilities';
1415

1516
class Geometry {
1617
constructor(detailX, detailY, callback, renderer) {
@@ -413,7 +414,7 @@ class Geometry {
413414
});
414415

415416
const blob = new Blob([objStr], { type: 'text/plain' });
416-
fn.downloadFile(blob, fileName , 'obj');
417+
downloadFile(blob, fileName , 'obj');
417418

418419
}
419420

@@ -536,7 +537,7 @@ class Geometry {
536537
modelOutput += 'endsolid ' + name + '\n';
537538
}
538539
const blob = new Blob([modelOutput], { type: 'text/plain' });
539-
fn.downloadFile(blob, fileName, 'stl');
540+
downloadFile(blob, fileName, 'stl');
540541
}
541542

542543
/**

0 commit comments

Comments
 (0)