A visualization of Kruskal's Algorithm using three.js and Svelte.
Kruskal's algorithm is a well-known graph algorithm that finds a minimum spanning forest out of an undirected edge-weighted graph. In our case, for maze generation, the graph is connected so the algorithm produces a minimum spanning tree. The minimum spanning tree is the created maze.
After cloning the repo, run
npm i
and then
npm run dev
Open the webpage on the specified port (i.e. http://localhost:5173/)
This is a continuation of a series of repo's on Kruskal's alogorithm and specifically its use in maze generation. The implementation in C can be found here.
The use of Svelte is very much so overengineering for this small webpage, but the project was originally built for use in my portfolio site, which is built using Svelte and Sveltekit. This repo is simply a port from the implementation on my site.