# Heart Lab visual assets

## Internal cutaway

`heart-detailed-3d.glb` is adapted from the [Grab3D Human Heart Cutaway](https://grab3d.com/models/anatomy/human-heart-cutaway/), listed by its publisher under CC0 1.0. It is one illustrative, textured cutaway surface with a localized visual pulse. Its chambers and valves are not separately selectable, and the pulse does not represent pressure-driven wall or valve mechanics.

## External surface

`heart-exterior-3d.glb` is a web ready conversion of [“Realistic Human Heart” by neshallads](https://sketchfab.com/3d-models/realistic-human-heart-3f8072336ce94d18b3d0d055a1ece089), licensed [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). We obtained a glTF package from [ZeroXR's free model page](https://0xr.space/m/bt685-realistic-human-heart), repackaged it as a self contained GLB with its three textures, and scale it in the viewer to match the cutaway. Attribution is displayed in the External surface panel. The GLB has one mesh and 22,562 triangles, so its coronary and great vessels cannot be selected individually. It has no internal chambers, animation, or blood flow simulation. This source is an illustrative model, not a clinically validated reconstruction.

The downloaded glTF, buffer, textures, and Blender conversion script are in `model/exterior/`. Run `blender -b --python model/exterior/build_exterior.py` from `assets/heart-lab/` to regenerate the runtime GLB, then copy it into `out/assets/heart-lab/` when rebuilding the hosted copy.

## Anatomy, flow, and exterior cycle views

The Anatomy & flow button displays the Grab3D cutaway, and Exterior & cycle displays the neshallads outer surface. Both keep the educational cycle controls and a list of 102 named reference entries from the original `heart-cycle.glb` artwork. That procedural geometry runs only as hidden timing and metadata support in these views. Its old 3D flow dots and conduction paths remain hidden. The route diagram beside the model follows the cycle phase. Clicking a realistic mesh reports only an approximate region; selecting a named entry shows information without a precise mesh highlight or isolation.

`realistic-flow-routes.json` holds six visual routes registered to the cutaway: systemic venous inlet, right AV filling, right ventricular outlet, pulmonary venous inlet, left AV filling, and left ventricular outlet. `heart-blood-flow.js` renders depth-tested moving blood surfaces along these routes in the open chamber portions, including small AV transfer jets and advancing ventricular menisci. Opaque vessel walls conceal much of the proximal outflow. Its shader paints separate phase-dependent fill levels on the existing right and left atrial and ventricular surfaces: the atria fill first, the AV transfer advances into the ventricles, and ventricular outflow follows. `heart-valve-motion.js` adds timed, illustrative leaflet and aperture overlays at the AV and semilunar valves so their opening and closure can be seen with the flow stages. The source cutaway is one mesh without independently deformable valve leaflets; the overlays are visual cues rather than deformation of its native valves. The cardiac cycle gates AV and semilunar routes and supports right, left, or both sides. Internal cutaway has play, scrub, rate, chamber zoom, and Show blood flow controls. No blood surfaces are shown on the distinct closed exterior model. These effects are a visual teaching animation placed by cutaway raycasts, not a computational fluid simulation, volumetric segmentation, or clinical flow measurement.
