mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 10:01:23 +01:00
more porting work
This commit is contained in:
parent
37391c8e8b
commit
7f31969f50
38 changed files with 3673 additions and 463 deletions
|
|
@ -1,13 +1,13 @@
|
|||
// main.js (Viewer Entry Point)
|
||||
import './style.css';
|
||||
import { generateMap } from './src/engine/main.js'; // Import from our future engine
|
||||
import { generate } from './src/engine/main.js';
|
||||
|
||||
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
|
||||
|
||||
const generateButton = document.getElementById('generateButton'); // Assuming you have a button with this ID
|
||||
|
||||
generateButton.addEventListener('click', () => {
|
||||
console.log("Generating map...");
|
||||
|
||||
|
|
@ -19,11 +19,11 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
};
|
||||
|
||||
// 2. Call the engine
|
||||
const mapData = generateMap(config);
|
||||
|
||||
const mapData = generate(config);
|
||||
|
||||
console.log("Map data generated by engine:", mapData);
|
||||
|
||||
|
||||
// 3. Render the map (this function will be built out later)
|
||||
// renderMap(mapData);
|
||||
// renderMap(mapData);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue