$ account protectwise
Troika is a monorepo for a collection of JavaScript libraries focused on building interactive 3D/2D data visualizations and immersive WebXR experiences using Three.js. The core framework (troika-core) provides a declarative facade system with lifecycle hooks, scene descriptors, event handling, and transitions, enabling developers to describe complex scenes with simple property setters. Higher-level packages (troika-3d, troika-3d-ui, troika-xr) extend this with 3D objects, flexbox-based UI blocks, and XR controller/teleport support. Standalone utilities like troika-three-text and troika-three-utils offer high-quality SDF text rendering and generic shader derivation, while troika-worker-utils offloads heavy computation (e.g., font parsing, layout) to web workers. The repository also includes three-instanced-uniforms-mesh for per-instance uniforms, troika-animation for tweening, and a bespoke flex layout engine built on Yoga. Though primarily an application framework, several packages are reusable libraries for any Three.js project, and the examples showcase data-driven scenes (e.g., globe connections, city grids, animated curves). Architecture is modular (monorepo with Lerna) with peer dependencies on Three.js and optional React integration.