Primitive collections (points, billboards, labels, polylines) were
attached directly to the Cesium Viewer instance as `_wwvX` properties
behind `(viewer as any)` casts. This created hidden coupling, blocked
multi-viewer setups, and left ~11 `as any` casts across three files.
Replace the viewer-mutation pattern with a module-level
`WeakMap<CesiumViewer, PrimitiveCollections>`:
- `initPrimitiveCollections` now writes into the WeakMap
- `getCollections` reads from the WeakMap and returns a destructurable
shape with optional fields, preserving the existing call pattern
- `AnimationLoop` and `useEntityRendering` use `getCollections(viewer)`
instead of direct `(viewer as any)._wwvX` reads
- Zero `(viewer as any)._wwv*` remain; collections GC cleanly when
the viewer is dropped
Adds `src/core/globe/EntityRenderer.test.ts` with 7 tests covering:
- WeakMap roundtrip (init populates, getCollections retrieves, per-viewer
isolation, graceful no-scene)
- Defer-clone behaviour from the previous commit (no clone on
iconUrl/model path; clone on auto-SVG path; original untouched)
Refs #95
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Replace `(window as any)._wwvFrameCount = frame` with a typed
`declare global { interface Window { _wwvFrameCount?: number } }`
and a plain `window._wwvFrameCount = frame` assignment.
The external plugin contract (a window-published frame counter for
throttling) is preserved; only the cast is removed.
Refs #95
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
- add HeadingPitchRoll-based camera tracking with smooth zoom easing for locked entities [Minor]
- add high-res playback timing in AnimationLoop with store-throttled UI updates [Minor]
- add wwv-lib-aviation, wwv-lib-facilities, wwv-lib-incidents shared base class libraries [Minor]
- refactor plugins to extend shared base classes (airports, aviation, military, facilities) [Patch]
- migrate civil unrest seeder from ACLED to GDELT API [Minor]
- expand international sanctions seeder with full entity coverage [Patch]
- fix all workspace:* dependency references across monorepo package.json files [Patch]
- fix WebGL vertex buffer rewrite at 60fps by removing per-frame trail position reassignment [Patch]
- update AGENTS.md with dev commands, Docker volumes, and Claude Code context [Patch]
- remove database-incident-recovery-procedures skill [Patch]
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Changes include:
- Style spiderifier background circles and fix clipping
- Implement horizon occlusion mapping for datapoints
- Stabilize spiderifier grouping persistence and smooth zooming scaling behavior
- Format intel panel timestamps and selection box UI
- Add backend and plugin for IranWarLive data scraping and historical events
- Add color cache (getCachedColor) to eliminate per-entity Color.fromCssColorString allocations
- Add scratch Cartesian3 position to avoid heap alloc per entity in renderSingleEntity
- Add stable array cache (getStableAnimatables) to eliminate Array.from per render cycle
- Add renderEntity memoization (renderOptionsCache) for static entity options
- Refactor animation loop into dynamic/static batching for branchless iteration
- Extract modules: renderCaches.ts, animationHelpers.ts, primitiveOps.ts, renderOptionsCache.ts
- All files under 150 lines per project guidelines
- Remove redundant JS frustum culling (Cesium handles natively via GPU)
- Static entities (no speed/heading) only horizon-culled every 30 frames
- Dynamic entities (aviation) still update per frame
- Cache animatables array to avoid per-frame allocation
- Use distanceSquared to avoid sqrt in hot path