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:
Azgaar 2026-03-10 03:05:07 +01:00
parent cbed9af783
commit bf22c5eaf6
11 changed files with 504 additions and 385 deletions

View file

@ -424,7 +424,10 @@ export const findAllCellsInRadius = (
* @param {number} i - The index of the packed cell
* @returns {Array} - An array of polygon points for the specified cell
*/
export const getPackPolygon = (cellIndex: number, packedGraph: any) => {
export const getPackPolygon = (
cellIndex: number,
packedGraph: any,
): [number, number][] => {
return packedGraph.cells.v[cellIndex].map(
(v: number) => packedGraph.vertices.p[v],
);