Bidi Reordering Lab: The Unicode Bidirectional Algorithm
Build a mixed left-to-right / right-to-left token sequence and watch the real Unicode Bidirectional Algorithm (UBA) assign embedding levels and reorder it for display — the exact mechanism behind RTL support in every localized mobile app.
Localizing a mobile app for Arabic or Hebrew users is not just translation — text that mixes right-to-left words with left-to-right words and numbers has to be reordered for display while its underlying storage order never moves, or copy-paste, search and screen readers all break. This lab implements the real embedding-level assignment and the L2 reversal rule from the Unicode Bidirectional Algorithm (UAX #9): build a token sequence of Latin words, Arabic/Hebrew words and numbers, choose a left-to-right or right-to-left paragraph base, and watch the 3D scene compute embedding levels (block height) and the resulting visual permutation, with connecting threads showing exactly which storage slot maps to which screen slot.
Build a mixed left-to-right / right-to-left token sequence and watch the real Unicode Bidirectional Algorithm assign embedding levels and reorder it for display — the exact mechanism behind RTL support in every localized mobile app.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install