feat: 3D dive views - single-dive, tissue, career terrain, spatial seascape#565
Merged
Conversation
ericgriffin
force-pushed
the
worktree-dive-3d-view
branch
from
July 11, 2026 12:10
3597942 to
3b42848
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
ericgriffin
force-pushed
the
worktree-dive-3d-view
branch
from
July 11, 2026 14:57
19e1e9b to
2322d2f
Compare
ericgriffin
marked this pull request as ready for review
July 11, 2026 15:30
three_js_core + three_js_angle_renderer + three_js_math at 0.3.x/0.0.1. The umbrella three_js package and three_js_controls are excluded: their loader chain requires archive ^4 and xml ^7, which conflict with the repo's excel and DiveCloud zip pins. Orbit controls are hand-rolled camera math instead (spherical coordinates around a target). Spike verified on macOS: ANGLE texture creation, vertex-colored indexed BufferGeometry rendering, and per-frame animation loop all work.
…nter viewport The software projector/painter pipeline is promoted to the one renderer: gestures drive the orthographic camera, the scrub cursor moves in a foregroundPainter keyed to the scrub listenable, and marker taps hit-test against the same projection. Deletes three_js_core/three_js_math/ three_js_angle_renderer, the flutter_angle fork override, the Windows longpaths and Android CMake CI workarounds, the libc++_shared pickFirst, the GL spike, and the GL-failure fallback path (nothing can fail to init). The viewport is now fully widget-testable; the coverage exclusion is gone with it.
- SceneProjector: orbit around the scene's actual Y center (bounds.sceneMin/MaxY) so custom-Y scenes (tissue) no longer pivot/drift wrong - TimeScrubBar: pause playback on scrub start so the slider stops fighting the animation controller (onScrubStart wired in all three players) - diveComparisonProfilesProvider: language-neutral '#<diveNumber>' fallback label instead of a hard-coded English 'Dive'
The title was never rendered; the standalone page shows its title via AppBar and the Computers mode is labeled by the scene switcher. Removed the param and its call sites/test args.
…ooltip - DiveIdSet defensively copies to an unmodifiable list so a later caller mutation can't change ==/hashCode and break provider caching (drops const) - TimeScrubBar play/pause button gets a localized tooltip (dive3d_play/pause, translated across all locales) for discoverability + screen readers
Resolved dive_detail_page.dart: kept the 3D-card removal (single-statement profile section) and took main's gauge-dive section filter + comment. Regenerated codegen (mocks/drift) for main's importProfile signature change.
…bPath) Delegating to CompareGeometryService gave career a ScrubPath (ridden on the reference profile), so the viewport drew a stray cursor dot on the static, timeline-less career scene. Strip it; keep layers/markers/bounds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A 3D visualization platform for dive data, rendered entirely with Flutter's own
Canvas.drawVertices(no external 3D engine). One scene-agnosticScene3d(layers + markers + bounds + scrub path) flows through a single CustomPainter renderer; every scene is just a list of mesh layers plus a cursor path.Four scenes
BuhlmannAlgorithm. %M-value coloring with the controlling-compartment ridge; helium-split toggle for trimix. Dive/Tissues switcher on the 3D page.Architecture
Scene3dgeneralization: painter/viewport/card are scene-agnostic;SceneBoundscarries explicit scene Y and Z ranges so the projector fits any scene's box;ScrubPathcarries an optional 3D (Z) cursor track.*GeometryService.build() -> Scene3d, unit-tested without GL. The interactive viewport is fully widget-tested (orbit, zoom, reset, marker hit-test, scrub).l10n
34 dive3d keys translated across all 11 locales.
Tests
~130 dive_3d feature tests; the broader suite (dive_log UI, dive_sites, deco, l10n — 1594 tests in the slice run locally) stays green.
Platform status
Pure Dart + Flutter's built-in renderer — no native plugin surface. CI validates all five platform builds.
Remaining / follow-ups
Design specs:
docs/superpowers/specs/2026-07-11-{dive-3d-view,tissue-saturation-3d,career-terrain-3d,spatial-site-3d}-design.md.