Inspirations

The human body, layer by layer

A living 3D anatomy atlas: a real anatomical model peels away skin, muscles, skeleton, vessels, lungs, nerves, gut and kidneys one layer at a time, with a beating heart, breathing lungs, flowing blood, nerve impulses and labelled structures.

Made in Claude Code (Claude subscription) with claude-opus-5.5. The agent wrote code, looked at the preview and fixed it over several iterations. This is not a single-shot result: comparisons on this site show models in one attempt.

Starting prompt

Build "The human body, layer by layer": an interactive anatomical animation of a living human body that peels away one body system at a time, explains each one and loops. Single self-contained HTML file; Three.js and its addons from a CDN via an import map are fine. The body is a real anatomical model, provided below: use it for every organ and structure, and do not build substitutes.

The model: https://www.aicontenders.dev/models/anatomy/human-body-layers-v1.glb (glTF binary, about 6.5 MB, meshopt-compressed, served with CORS). Load it exactly like this:

```js
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
import { MeshoptDecoder } from 'three/addons/libs/meshopt_decoder.module.js';
const loader = new GLTFLoader();
loader.setMeshoptDecoder(MeshoptDecoder);
loader.load('https://www.aicontenders.dev/models/anatomy/human-body-layers-v1.glb', (gltf) => { /* gltf.scene */ });
```

- Units are metres, y is up, the feet stand at y = 0, the body faces +z and the patient's left is +x. It is an adult man about 1.72 m tall in the anatomical position.
- Hierarchy: a root node `HumanBody` with eight group nodes, one per system. Each group holds named meshes, one per structure, each with its own PBR material. GLTFLoader replaces the spaces in node names with underscores, so look them up with underscores, for example `getObjectByName('Integumentary_system')` or `getObjectByName('Pectoralis_major')`; the original name stays in `object.userData.name`.
  - `Integumentary system`: Skin; Eyes; Irises.
  - `Muscular system`: Pectoralis major; Deltoid; Biceps brachii; Triceps brachii; Rectus abdominis; External oblique; Trapezius; Latissimus dorsi; Gluteus maximus; Quadriceps femoris; Sartorius; Gastrocnemius; Tibialis anterior; Sternocleidomastoid; Serratus anterior; Tendons and aponeuroses; Other muscles.
  - `Skeletal system`: Skull; Vertebral column; Rib cage; Pelvis; Clavicle; Scapula; Humerus; Radius; Ulna; Hand bones; Femur; Patella; Tibia; Fibula; Foot bones; Hyoid bone.
  - `Circulatory system`: Heart; Aorta; Venae cavae; Pulmonary trunk; Pulmonary veins; Carotid arteries; Jugular veins; Subclavian arteries; Brachial arteries; Radial arteries; Femoral arteries; Renal arteries; Other arteries; Other veins.
  - `Respiratory system`: Right lung; Left lung; Trachea; Bronchi; Larynx; Pharynx; Diaphragm.
  - `Nervous system`: Cerebrum; Cerebellum; Brainstem; Spinal cord; Brachial plexus; Median nerve; Ulnar nerve; Radial nerve; Sciatic nerve; Femoral nerve; Tibial nerve; Intercostal nerves; Vagus nerve; Other nerves.
  - `Digestive system`: Oesophagus; Stomach; Liver; Gallbladder; Pancreas; Small intestine; Large intestine; Tongue.
  - `Urinary system`: Right kidney; Left kidney; Ureters; Urinary bladder; Urethra; Adrenal glands.
- A paired structure such as Femur or Ureters is one mesh holding both sides, so place a label on one side of it, not at its centre.
- You may replace or clone the materials, but keep the colours an anatomy atlas uses: red arteries, blue veins, yellow nerves.
- Show this credit on the page: "Anatomy model: BodyParts3D (© DBCLS, CC BY 4.0) and Z-Anatomy (CC BY-SA 4.0)".

It is alive the whole time, and every system keeps working while it is visible, not only during its own chapter:
- the heart beats at about 70 per minute;
- the lungs, diaphragm and chest breathe about 14 times a minute;
- pulses of blood travel along the arteries in time with the beat and flow back through the veins;
- glowing nerve impulses run from the brain down the spinal cord into the limbs and back;
- peristaltic waves move through the oesophagus and the intestines;
- fluid trickles down the ureters while the bladder slowly fills.

Animate the real meshes to do this, with transforms, vertex shaders or effects that follow their geometry.

The layers, in this order, about 9 seconds each (roughly 75 seconds in total, then it loops back to the skin):
1. Skin;
2. Muscles;
3. Skeleton;
4. Circulatory system;
5. Respiratory system;
6. Nervous system;
7. Digestive system;
8. Urinary system.

How the layers change:
- Each new layer builds up on the body, while the previous layers fade to a faint translucent ghost, so the silhouette and the skeleton always give context.
- The camera works for each layer: it turns slowly around the body and moves closer to the region that matters (the chest for the heart and lungs, the head for the brain, the abdomen for the gut and kidneys), so the body is seen from several sides.

Descriptions (they are central to the piece):
- For each layer, a panel shows the system's name, a two-sentence overview and its key numbers (for example a heart rate of 70 beats a minute and 5 litres of blood; 206 bones; about 600 muscles; about 72 km of nerves).
- The most important structures of that layer are labelled one after another. Each label has a leader line to a point on the surface of the named mesh and a short description of one to two sentences of what it does, with one memorable fact. At least four labelled structures per layer.
- Hovering over or tapping a structure highlights its mesh and shows its description.

Interface (a clean, light medical-atlas style):
- A play/pause control, and clicking the empty background also pauses and resumes.
- A timeline across the bottom with a marker for each layer. Dragging it scrubs the animation backwards and forwards, and the layers, camera and descriptions follow exactly. Layer buttons jump to a layer.
- Drag to rotate the body and scroll to zoom, also while paused. The camera returns to its path a few seconds after the last input while playing.
- Live readouts of heart rate and breathing rate, and an option to show all layers together.
- While the model loads, show a short loading indicator. Then everything starts automatically and is visibly moving, without any interaction. The layout works on a phone.

Rendering: soft studio lighting with shadows, physically based materials that read as skin, wet muscle, ivory bone, glossy vessels and organs. ACES tone mapping. Bloom only on the nerve impulses. The frame must stay clean and readable, never washed out by glare or haze.

Engineering rules (the page must work on the first load, with no fixes):
- Use Three.js r170 and only methods that exist on each of its classes. Give every custom ShaderMaterial `fog: false`, and declare every uniform, constant and varying its shaders use.
- Declare each identifier once. Inside one calculation, never reuse a shared scratch vector for two values that are both still needed; use local vectors.
- Guard every animated value against NaN.
- Answer with the complete file exactly once, in a single ```html code block: no drafts, partial snippets or notes.

Keep planning brief and write the code. Aim for roughly 800 to 1,200 lines, compact and well structured.

Sources and licenses

Anatomy model: BodyParts3D (© DBCLS, CC BY 4.0) and Z-Anatomy (CC BY-SA 4.0).