Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions src/data/maps/MapTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,19 +319,6 @@ export function createMineralLine(
return minerals;
}

// Legacy helper with direction parameter (backwards compatibility)
export function createMineralLineOld(
baseX: number,
baseY: number,
direction: 'horizontal' | 'vertical' = 'horizontal',
amount: number = 1500
): ResourceNode[] {
// Convert old API to new: assume base is ~10 units away in the direction
const offsetX = direction === 'horizontal' ? -10 : 0;
const offsetY = direction === 'vertical' ? -10 : 0;
return createMineralLine(baseX, baseY, baseX + offsetX, baseY + offsetY, amount);
}

// Helper to create plasma geysers (typically 2 per base)
// Places geysers at the ends of the mineral arc, forming a continuous crescent
// mineralCenterX/Y: center of the mineral arc
Expand Down
10 changes: 1 addition & 9 deletions src/rendering/Terrain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,20 +203,12 @@ function _voronoiNoise(x: number, y: number, frequency: number = 4): number {
return Math.sqrt(minDist);
}

// Legacy noise functions for compatibility
// Simple deterministic noise for color variation
function noise2D(x: number, y: number, seed: number = 0): number {
const n = Math.sin(x * 12.9898 + y * 78.233 + seed) * 43758.5453;
return n - Math.floor(n);
}

function _smoothNoise(x: number, y: number, scale: number, seed: number = 0): number {
return fbmNoise(x / scale + seed * 0.1, y / scale + seed * 0.1, 3, 2.0, 0.5) * 0.5 + 0.5;
}

function _fractalNoise(x: number, y: number, octaves: number, persistence: number, seed: number = 0): number {
return fbmNoise(x * 0.1 + seed * 0.01, y * 0.1 + seed * 0.01, octaves, 2.0, persistence) * 0.5 + 0.5;
}

// PERF: Terrain chunk size for frustum culling
// Each chunk is a separate mesh with its own bounding box
// Chunks outside the camera frustum are automatically culled by Three.js
Expand Down
Loading