Code Gravity 🌌
Code Gravity transforms your static workspace directory into an interactive, multi-dimensional HTML5 celestial physics simulation. By analyzing code volume, nesting depth, and architecture distributions, it translates your project into a living solar system where files dynamically orbit based on real-world gravity formulas.
🚀 Core Features
- Automated Project Scanning Engine: Automatically scans and maps your active directory workspace trees into graphical nodes on a dedicated interactive panel canvas layout.
- Astrodynamic Heatmapping: System nodes dynamically change scale and color hues (from deep space neon blue to hot incandescent amber) depending on file size metrics and structural complexity parameters.
- Interactive HUD & Telemetry Data: Hovering over any planet freezes its tracking vector and generates an overlay telemetry view highlighting raw paths, precise Lines of Code (LOC), and relative orbital masses.
- Bidirectional Click-to-Open Bridge: Click any orbiting node or monolithic star cluster to instantly focus and open that specific document text layer right alongside the visualization pane inside your editor column view (
ViewColumn.One).
- Global Accessibility Bindings: Fire up the universe instantly using high-speed custom macro controls from anywhere inside your active workflow frame.
🛠️ Global Command & Shortcut Map
Launch the visualization environment using the standard Command Palette utility options or via the built-in keyboard macro mappings:
- Windows / Linux:
Ctrl + Shift + 0
- macOS:
Cmd + Shift + 0
- Command Palette Hook:
Code Gravity: Visualize Codebase
📐 The Physics Framework (How it Works)
The client rendering canvas runs a precise frame-by-frame structural adaptation of classical Newtonian orbital mechanics. The vector force ($F$) keeping your files in balanced geometric trajectories is calculated dynamically via:
$$F = G \times \frac{m_1 \times m_2}{r^2}$$
- $G$ is a scaled gravitational constant fine-tuned for visual performance on display grids.
- $m_1$ is the structural mass metric of the target codebase anchor.
- $m_2$ represents the density weight of the orbiting component file.
- $r$ indicates the direct linear space distance offset separating the coordinate points.
To provide an immersive, fluid visual state, a continuous breathing modification scalar shifts anchor node diameters via harmonic tracking formulas:
$$R_{pulse} = R_{base} + A \times \sin(\psi)$$
(Where $\psi$ measures the current runtime tracking frames, strictly wrapped inside safety boundary checks to guarantee zero null animation crashes before asynchronous background file structures complete initialization loops).
📋 Recommended package.json Alignment
Ensure your top-level extension configuration file contains matching attributes to enable flawless publishing verification checks:
{
"name": "code-gravity",
"displayName": "Code Gravity",
"version": "0.1.0",
"publisher": "arxo",
"engines": {
"vscode": "^1.80.0"
},
"categories": [
"Visualization",
"Other"
]
}