Visualizes the BST ordering invariant (left keys < key(node) < right keys), then animates a comparison-guided search for a target key by highlighting the visited path and showing each comparison/decision. Finally, it demonstrates a local update via insertion: a new node slides into the correct null position and a single parent->child link is attached, emphasizing how the invariant is preserved by local pointer changes.
Responsive tree layout computed each frame; blocky grid snapping (6px*scale) for retro look. Animation cycles through SEARCH/INVARIANT/INSERT over ~4.2s using time-based phases and cubic easing. Highlights are drawn with green/green-dim strokes on black and elbow links for a blocky aesthetic.