Framework-agnostic core
Plain TypeScript. The engine has zero runtime deps — bring Angular, React, or no framework at all.
A TypeScript-first interpolation engine that drops straight into your map. Smooth motion between position updates — WebSocket, polling, or anything else — without writing your own animation loop.
Both maps read the same position stream at a 2.2 s server period. Left snaps on every update; right runs the Kinesis.js tick loop.
Plain TypeScript. The engine has zero runtime deps — bring Angular, React, or no framework at all.
Ring-slot buffers keep two points per vehicle. Allocation-free hot path, bounded memory across an 8-hour shift.
Reads the feed period per vehicle and switches between snap, lerp and fade zones — no manual tuning.
Vehicles flow through active → warning → stale → completed, with events at every transition.
Anomalous jumps and sharp turns are caught automatically — fade behavior and cubic fallback, no opt-out.
Adapter and interpolation failures surface as typed error events — the tick loop never dies.
The Angular wrapper accepts a Signal or Observable of positions and wires lifecycle to DestroyRef.
Move the tick loop off the main thread with one flag — keep map pan and zoom buttery under huge fleets.
Pick an adapter, hand the tracker your position stream, and start the loop. Everything else has production-grade defaults.
Tip: set renderLagMs ≈ feed period so the engine always has two points to interpolate between. The default is 1000.
import { Tracker } from '@kinesisjs/core';
import { OpenLayersAdapter } from '@kinesisjs/openlayers';
const tracker = new Tracker({
adapter: new OpenLayersAdapter(map),
interpolation: 'adaptive',
});
tracker.start();
ws.onmessage = (e) => tracker.ingest(JSON.parse(e.data));Five built-in strategies plus an adaptive meta-mode that reads each vehicle's feed period and chooses at runtime.
Straight-line lerp between the two latest points. The default — right for most feeds.
Smoothstep easing — softer acceleration into and out of each segment.
Great-circle arc across the globe. For ships, aircraft and long distances.
3-point centripetal Catmull-Rom. Rounds the path through turns once a third ping lands.
Reads feed period per vehicle → snap, lerp, or fade. Zero manual tuning.
Reactive inputs (Signal / Observable / Hook) and lifecycle wired to the framework's teardown.
Create, update and remove features; styling, trails and viewport. One small adapter per map library.
Clock (rAF · 60fps), Interpolator, Sweeper lifecycle, typed EventBus and math utils. Zero deps.
A tiny core plus opt-in adapters and wrappers. Every package ships ESM + CJS and full type definitions.
The framework-agnostic interpolation engine: clock, modes, lifecycle, events.
OpenLayers adapter with vehicle styling, fading trails and gap visualization.
Standalone kinesisMap directive — Signals/RxJS in, auto-teardown out.
Leaflet adapter with heading-aware markers that co-exist with your own layers.
OSRM-backed road-snapping CustomInterpolator with an LRU cache.
Read it all back live with getStats() — p50/p95/p99 tick times, ingest rate, dropped ticks and a memory breakdown. Need more headroom? Move the loop off-thread with Web Worker mode (v0.2).
| Capability | Kinesis.js | leaflet-realtime | MovingMarker | raw setCoords |
|---|---|---|---|---|
| 60fps interpolation | ● | partial | partial | — |
| Map-library agnostic | ● | Leaflet only | Leaflet only | ● |
| Adaptive period handling | ● | — | — | — |
| Bounded memory profile | ● | partial | — | — |
| Multi-state lifecycle | ● | — | — | — |
| Error-as-event | ● | — | — | — |
| TypeScript-first | ● | types | — | — |
Drop in the tracker, hand it your stream, and watch the jumps turn into motion. Five kilobytes, zero dependencies.