Glossary
Alphabetical definitions for all terms used across the MVT documentation. Each entry links to the page where the concept is explained in depth.
Related: Architecture Rules · Style Guide · Project Structure
| Term | Definition |
|---|---|
| Barrel file | An index.ts that re-exports the public API of a directory module. All cross-directory imports must go through the barrel. Project Structure |
| Bindings | A plain object bridging view and model. Contains get*() accessors for reading state and on*() handlers for relaying user input. Bindings · Bindings in Depth |
| Change detection | A technique where the view polls a binding each frame and acts only when the value differs from the previous frame. Avoids expensive rebuilds for infrequently changing state. Change Detection |
deltaMs | Milliseconds elapsed since the last tick. The sole mechanism by which time flows into models. Models · Time Management |
| Domain units | Position, distance, and velocity units meaningful to the game domain (tiles, world-units, slots) rather than presentation-layer measures (pixels, points). Models |
| Factory function | A createXxx(options) function that returns an object satisfying an interface. Used instead of classes for encapsulation via closures. This is a project convention, not an MVT requirement. Style Guide |
| Frame sequence | The strict per-frame order: model.update(deltaMs) then view.refresh() then the renderer draws. The Ticker |
| GSAP timeline | A paused GSAP timeline used inside models to tween state over time, advanced manually via update(deltaMs). Never auto-playing. This is a project convention for time management, not an MVT requirement. Time Management |
| Hot path | Code that runs every tick (~60fps) - update() and refresh() and everything they call. Must avoid unnecessary allocations. Hot Paths |
| Leap-safe model | A model whose update() produces correct results for any deltaMs size (including large leaps). Purely arithmetic models are typically leap-safe; GSAP-based models with orchestration guards are typically not. Time Management |
| Model | A stateful object that owns domain logic and advances via update(deltaMs). Has no knowledge of views or rendering. Models |
| MVT | Model-View-Ticker. An architecture for visual, interactive applications that separates state from presentation with a ticker-driven frame loop. What is MVT? |
| Presentation state | Limited view-internal state used purely for cosmetic transitions (e.g. animating a score counter). The exception to the "views are stateless" rule. Presentation State |
refresh() | A view's per-frame function that reads bindings and updates the presentation output to match current state. Called after all models have updated. Views |
| Skills file | A self-contained instruction document that an AI agent can load for a specific task (writing a model, writing a view, following code conventions). Located in docs/ai-agents/. |
| Ticker | The frame loop that drives the application: calls model.update(deltaMs), then view.refresh(), then the renderer draws. The Ticker |
update(deltaMs) | A model's per-frame method that advances state based on elapsed milliseconds. The sole mechanism for time to flow into a model. Models · Time Management |
| View | A stateless renderer that reads state through bindings (or model properties, for top-level views) and writes to the presentation output via refresh(). Views |
| Watch | A helper (watch()) that accepts a record of named getter functions, polls them each frame, and reports which values changed. Each watched property exposes changed, value, and previous. Change Detection |