Two.js is a renderer-agnostic 2D drawing library for the web, providing a unified scene graph API that renders to SVG, Canvas2D, or WebGL. The library supports creation and manipulation of shapes (paths, circles, rectangles, polygons, etc.), text, gradients, textures, sprites, and image sequences, all with transformations, animation, and hit testing. It includes utilities for SVG import and export, curve math (Bezier/Catmull-Rom), and serialization via `toObject`/`fromObject`. The architecture is modular: a core `Two` class manages the scene and animation loop, with a hierarchy of elements (Element → Shape → Path/Text/Points), a Group container for scene graph nesting, and separate renderer implementations for each target. Key entry points are the `Two` constructor, factory methods (`makeCircle`, `makePath`, etc.), `update()`, `play()`, and `pause()`. The library has no external runtime dependencies beyond standard browser APIs, though optional `node-canvas` enables headless rendering. Notably, the codebase demonstrates high craftsmanship with a flag-based dirty tracking system for efficient updates, an event system with cross-object observation, and a collection pattern with mutation events. However, it shows maintenance drift through some outdated development dependencies (e.g., `babel-eslint`, `underscore`) and manually maintained TypeScript declarations that may lag behind the source.
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.
Koharu is a desktop application for manga/comic translation, built with Rust (Tauri) and a React/TypeScript frontend. It provides an end-to-end pipeline: page import, AI-based layout detection, speech bubble segmentation, OCR (multiple models including Manga OCR, PP-OCRv6, Baberu OCR), text translation (local LLMs via llama.cpp and 13+ remote providers), inpainting (LaMa, AOT, FLUX.2 Klein, RORem mixed), and typesetting with CJK/RTL support. The application features a WebGPU canvas editor, project management with undo/redo, PSD export, and an AI agent (Codex) for natural-language editing. The architecture is modular: a scene graph document model (koharu-scene), content-addressed blob storage (koharu-storage), a pipeline orchestrator (koharu-pipeline), and a hardware abstraction layer (koharu-runtime) for CUDA/ROCm/Vulkan/Metal. The frontend uses a custom UI component library (packages/ui) built on @base-ui/react. While the codebase is well-structured and actively maintained, it has technical drift risks from pinned git dependencies, multiple ML model ports that must stay synchronized with upstream, and platform-specific runtime packages.