Skip to content

Voronoi computation now doesn't freeze the UI. Sundry bugfixes and library upgrades.#101

Merged
liotier merged 10 commits into
mainfrom
claude/remove-unused-variable-NCvPC
Mar 26, 2026
Merged

Voronoi computation now doesn't freeze the UI. Sundry bugfixes and library upgrades.#101
liotier merged 10 commits into
mainfrom
claude/remove-unused-variable-NCvPC

Conversation

@liotier

@liotier liotier commented Mar 26, 2026

Copy link
Copy Markdown
Owner

No description provided.

claude added 9 commits March 26, 2026 02:02
MapLibre v5 changed render() from two parameters (gl, matrix) to a
single destructured object ({ gl, modelViewProjectionMatrix }). The
previous fix incorrectly kept two parameters.

https://claude.ai/code/session_013SyD3xCEEcuzNN69ghKo3z
MapLibre v5 render() takes (gl, args) as two separate parameters,
not a single destructured object. The matrix is accessed via
args.modelViewProjectionMatrix with fallback to
args.defaultProjectionData.mainMatrix.

https://claude.ai/code/session_013SyD3xCEEcuzNN69ghKo3z
Temporary diagnostics to identify why gradient rendering fails:
- Log shader compilation errors (vertex, fragment, program link)
- Log render() args keys and matrix properties on first call

https://claude.ai/code/session_013SyD3xCEEcuzNN69ghKo3z
…32Array

MapLibre GL v5 provides modelViewProjectionMatrix as Float64Array, but
WebGL's uniformMatrix4fv requires Float32Array. Also removes debug logging.

https://claude.ai/code/session_013SyD3xCEEcuzNN69ghKo3z
MapLibre v5 custom layers need explicit renderingMode: '2d' and
gl.disable(gl.DEPTH_TEST) to render correctly over the map.

https://claude.ai/code/session_013SyD3xCEEcuzNN69ghKo3z
The official MapLibre v5 custom layer example uses
args.defaultProjectionData.mainMatrix, not args.modelViewProjectionMatrix.

https://claude.ai/code/session_013SyD3xCEEcuzNN69ghKo3z
Two optimizations to speed up Voronoi recomputation when adjusting
the coalesce slider:

1. Use turf.booleanWithin() to detect cells fully inside the boundary
   and skip the expensive turf.intersect() call (~90% of cells).

2. Replace string-heavy edge key generation (toFixed + join + sort)
   with pre-quantized integer comparison for faster deduplication.

https://claude.ai/code/session_013SyD3xCEEcuzNN69ghKo3z
The coalesce slider was blocking the main thread during expensive
turf.intersect operations. Now the full pipeline (coalescing +
Delaunay + boundary clipping) runs in a dedicated Web Worker.

Uses request IDs to discard stale results when the slider moves
faster than computation completes.

https://claude.ai/code/session_013SyD3xCEEcuzNN69ghKo3z
Keep async worker-based Voronoi computation from feature branch.
Incorporate renderWebGL error handling from main. Drop debug
logging that was added on main for troubleshooting.

https://claude.ai/code/session_013SyD3xCEEcuzNN69ghKo3z
@github-actions

github-actions Bot commented Mar 26, 2026

Copy link
Copy Markdown

🚀 Preview Deployment Ready!

Preview URL: https://liotier.github.io/Geogizmos/preview/claude-remove-unused-variable-NCvPC/Isosmfar/

Branch: claude/remove-unused-variable-NCvPC

This preview will update automatically with each push to this branch.

- Remove unused coalescedFeatures destructuring from worker callback
- Collapse identical branches (LineString/Point/else all continue)
- Use .at(-1) instead of [.length - 1]
- Log error in catch instead of swallowing silently

https://claude.ai/code/session_013SyD3xCEEcuzNN69ghKo3z
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
64.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@liotier liotier changed the title Claude/remove unused variable n cv pc Voronoi computation now doesn't freeze the UI. Sundry bugfixes and library upgrades. Mar 26, 2026
@liotier liotier merged commit 84dc717 into main Mar 26, 2026
2 of 3 checks passed
@liotier liotier deleted the claude/remove-unused-variable-NCvPC branch March 26, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants