mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-04-07 07:57:24 +02:00
Refactor relief rendering and generation logic
- Migrate relief icon rendering from SVG to WebGL for improved performance. - Introduce a new relief generator module to handle relief icon creation. - Update event listeners in relief editor to use a consistent `byId` method. - Synchronize relief data with the current SVG DOM when exiting edit mode. - Enhance relief icon management by integrating new utility functions for generating and resolving relief icons. - Clean up legacy code and improve overall structure for better maintainability.
This commit is contained in:
parent
cbed9af783
commit
bf22c5eaf6
11 changed files with 504 additions and 385 deletions
|
|
@ -729,19 +729,22 @@ styleHeightmapCurve.on("change", e => {
|
|||
|
||||
styleReliefSet.on("change", e => {
|
||||
terrain.attr("set", e.target.value);
|
||||
drawReliefIcons();
|
||||
pack.relief = [];
|
||||
drawRelief();
|
||||
if (!layerIsOn("toggleRelief")) toggleRelief();
|
||||
});
|
||||
|
||||
styleReliefSize.on("change", e => {
|
||||
terrain.attr("size", e.target.value);
|
||||
drawReliefIcons();
|
||||
pack.relief = [];
|
||||
drawRelief();
|
||||
if (!layerIsOn("toggleRelief")) toggleRelief();
|
||||
});
|
||||
|
||||
styleReliefDensity.on("change", e => {
|
||||
terrain.attr("density", e.target.value);
|
||||
drawReliefIcons();
|
||||
pack.relief = [];
|
||||
drawRelief();
|
||||
if (!layerIsOn("toggleRelief")) toggleRelief();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue