Kinesis Engine
Real-time gravitational force fields, interactive wells, and browser-native particle motion.
An interactive HTML5 Canvas physics sandbox running multi-body attraction/repulsion vectors, user-placed gravity wells, configurable fluid damping, and viewport-aware rendering pause logic.
Demo Parameters & Baseline
Invariants & Edge Cases Checked
playwright test tests/showcase-kinesis.spec.tsSystem Invariants
Edge Cases Covered
Problem Statement
Naive browser particle demos frequently blow up numerically when particles approach zero distance from an attractor, leak animation loops on resize/unmount, or drain mobile batteries offscreen.
Design Solution
Implemented bounded gravity-well queues, minimum-radius force clamping, modular boundary wrapping, and IntersectionObserver lifecycle hooks inside a clean React canvas component.
Critical Technical Decisions
Minimum-Radius Distance Clamping
Clamping effective distance to >= 15px prevents inverse-distance singularities and runaway particle ejection.
Offscreen Loop Suspension via IntersectionObserver
Suspending requestAnimationFrame outside the viewport keeps idle CPU and mobile battery overhead low.
Bounded Gravity Well Queue
Evicting the oldest attractor above 4 wells guarantees predictable O(N) per-frame cost during rapid user clicks.
Capabilities & Behaviour
Cursor-guided attraction and repulsion vector fields with real-time damping sliders.
Click-to-place gravity wells capped cleanly at 4 active attractors via FIFO eviction.
Minimum-distance clamping (20px / 15px guards) to prevent division-by-zero velocity spikes.
IntersectionObserver loop gating to halt animation frames when scrolled offscreen.
Zero external physics runtime dependencies—pure TypeScript vector integration.
Technology Stack
Explore Source Code & QA Playbook
Inspect repositories on GitHub or review my QA automation and test design approach.