How it works: The engine uses a three-step pipeline to transform raw text into art:
1. Frequency Mapping: It analyzes word frequency to determine visual weight of each word.
2. Scaling & Rotation: High-frequency words get bolded and enlarged, with a 15% chance of vertical rotation.
3. Collision Detection: It uses a randomized coordinate generator with a retry loop (up to 70 attempts per word) to pack the canvas as tightly as possible without overlapping.
The Goal:
Beyond just a word cloud, it is something relaxing to watch. It’s built with vanilla JS to keep it lightweight as possible.
GitHub Repo: https://github.com/j-ncel/word-doodle
koalux•1h ago