Skip to content

Commit cf90178

Browse files
Add files via upload
1 parent 010875c commit cf90178

File tree

1 file changed

+15
-22
lines changed

1 file changed

+15
-22
lines changed

src/main.ts

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const DEFAULT_COLOUR_SCHEME: ColourScheme = {
2626
majorRoadColour: "#ffd265", // yellow/orange for major roads
2727
majorRoadOutline: "#b58c00", // gold/brown outline
2828
mainRoadColour: "#ffffff", // white for main roads
29-
mainRoadOutline: "#0055aa", // blue outline for main roads
29+
mainRoadOutline: "#0055aa", // blue outline for main roads
3030
outlineSize: 1,
3131
minorWidth: 2,
3232
majorWidth: 4,
@@ -55,7 +55,7 @@ class Main {
5555
private roadsFolder: dat.GUI;
5656
private styleFolder: dat.GUI;
5757
private optionsFolder: dat.GUI;
58-
private downloadsFolder: dat.GUI;
58+
// downloadsFolder removed
5959

6060
private domainController = DomainController.getInstance();
6161
private gui: dat.GUI;
@@ -81,10 +81,10 @@ class Main {
8181
private modelGenerator: ModelGenerator | undefined;
8282

8383
showTensorField(): boolean {
84-
// Change this logic based on your app's needs.
85-
// For now, always show city map (returns false).
86-
return false;
87-
}
84+
// Change this logic based on your app's needs.
85+
// For now, always show city map (returns false).
86+
return false;
87+
}
8888

8989
constructor() {
9090
// --- Deduplication: Destroy previous ---
@@ -98,7 +98,7 @@ class Main {
9898
this.roadsFolder = this.gui.addFolder('Map');
9999
this.styleFolder = this.gui.addFolder('Style');
100100
this.optionsFolder = this.gui.addFolder('Options');
101-
this.downloadsFolder = this.gui.addFolder('Download');
101+
// Download folder removed: no this.downloadsFolder
102102

103103
// Canvas setup
104104
this.canvas = document.getElementById(Util.CANVAS_ID) as HTMLCanvasElement;
@@ -130,7 +130,7 @@ class Main {
130130

131131
// Now set up controls
132132
this.setupStyleControls();
133-
this.setupOptionsAndDownloads();
133+
this.setupOptionsAndDownloads(); // this method no longer creates a Download folder
134134

135135
// Initial settings
136136
this.tensorField.setRecommended();
@@ -181,16 +181,12 @@ class Main {
181181
}
182182

183183
private setupOptionsAndDownloads(): void {
184-
// Only bind drawCentre to tensorField, not mainGui
185-
this.optionsFolder.add(this.tensorField, 'drawCentre');
186-
this.optionsFolder.add(this, 'highDPI').onChange((high: boolean) => this.changeCanvasScale(high));
187-
188-
// Download actions disabled (void functions)
189-
this.downloadsFolder.add({ "PNG": () => {} }, 'PNG');
190-
this.downloadsFolder.add({ "SVG": () => {} }, 'SVG');
191-
this.downloadsFolder.add({ "STL": () => {} }, 'STL');
192-
this.downloadsFolder.add({ "Heightmap": () => {} }, 'Heightmap');
193-
}
184+
// Only bind drawCentre to tensorField, not mainGui
185+
this.optionsFolder.add(this.tensorField, 'drawCentre');
186+
this.optionsFolder.add(this, 'highDPI').onChange((high: boolean) => this.changeCanvasScale(high));
187+
188+
// Download actions removed entirely — no Download folder or controllers created
189+
}
194190

195191
generate(): void {
196192
if (!this.firstGenerate) {
@@ -226,10 +222,7 @@ class Main {
226222
this.domainController.cameraDirection = new Vector(this.cameraX / 10, this.cameraY / 10);
227223
}
228224

229-
downloadPng(): void { /* Download PNG disabled */ }
230-
downloadSVG(): void { /* Download SVG disabled */ }
231-
downloadHeightmap(): void { /* Download Heightmap disabled */ }
232-
downloadSTL(): void { /* Download STL disabled */ }
225+
// Disabled placeholder download functions removed (no longer needed)
233226

234227
update(): void {
235228
if (this.modelGenerator) {

0 commit comments

Comments
 (0)