Significant work done porting to headless engine

This commit is contained in:
barrulus 2025-08-04 00:01:48 +01:00
parent ab08dc9429
commit d1b07fff01
573 changed files with 50603 additions and 0 deletions

29
procedural/main.js Normal file
View file

@ -0,0 +1,29 @@
// main.js (Viewer Entry Point)
import './style.css';
import { generateMap } from './src/engine/main.js'; // Import from our future engine
console.log("FMG Viewer Initialized!");
// Example of how you will eventually use the engine
document.addEventListener('DOMContentLoaded', () => {
const generateButton = document.getElementById('generateMapButton'); // Assuming you have a button with this ID
generateButton.addEventListener('click', () => {
console.log("Generating map...");
// 1. Build config from UI
const config = {
seed: document.getElementById('optionsSeed').value || '12345',
graph: { width: 1024, height: 768, points: 10000 },
// ... more config from UI
};
// 2. Call the engine
const mapData = generateMap(config);
console.log("Map data generated by engine:", mapData);
// 3. Render the map (this function will be built out later)
// renderMap(mapData);
});
});