BUILDING 3D
MEDICAL SIMULATIONS

Build a walk-through 3D operating room that runs in any browser: load a compressed GLB model, walk it in first person with WASD and the mouse, bump into real equipment, and use a live patient monitor, a defibrillator and a surgical table that actually respond.

New in Part 2: an interactive 3D anatomy quiz. Tap any of 263 bones of a real skeleton to learn its name, then take the Bone Quest quiz. Play it below, or tap the patient on the operating table.

✓ FREE Level 2 · Intermediate PointerLockControlsDraco GLBCollisionAnatomy Quiz

By Shane Brumback · Updated November 14, 2026 · about 16 minute read

IFS MEDSIM 3D ANATOMY GAMES

9 free anatomy games built with Three.js and Z-Anatomy models, one for each body system. Tap any part to learn its name, then take the quiz. Click the patient on the table to open the hub.

All 9 IFS MedSim anatomy games →

See it live

LIVE DEMO

The operating room on the right of this page is the live scene on a slow tour. Launch the full-screen demo, press Click to walk, then use WASD or the arrow keys and the mouse. Hover equipment to learn what it does; click to use it. Launch asks for a free Google sign-in first. Press Esc or Exit to return.

Free Google sign-in · Click to walk · WASD / arrows + mouse · Esc to exit

Introduction

Medical training has a problem: real operating rooms are expensive, busy and full of patients. Simulation lets students practice the layout, the equipment and the emergency steps before they ever walk into one. Studies of simulation-based medical education consistently find better skills and confidence than lectures alone, and much of that benefit comes from repetition and immediate feedback, two things software is great at.

Three.js lets you deliver that simulation as a web page. No install, no app store, no special hardware: a student opens a link on a school laptop and is standing in the room. In this tutorial you build exactly that: a first-person walkthrough of an operating room with collision, plus an interaction layer where the patient monitor shows a live ECG, you can trigger ventricular fibrillation and shock it back with the defibrillator, raise the table and change an IV drip rate.

BUILDING MORE 3D LEARNING WORLDS?

Read Creating 3D Virtual Educational Worlds with Three.js: the five core systems behind interactive 3D learning worlds, a step-by-step build, and a solar system case study.

Creating 3D Virtual Educational Worlds: T-Rex castle educational world built with Three.js Read the Educational Worlds Article

What Makes a Good Training Simulation

  • Correct scale: build in real meters so eye height (1.6 m), table height and walking speed feel right. Wrong scale is the first thing clinicians notice.
  • Feedback for every action: a click should change something visible or audible, like the monitor rhythm or the defibrillator charge sound.
  • A goal: the HUD counts how many of the 12 equipment items you have explored. Small goals turn wandering into learning.
  • Fast loading: Draco geometry and WebP textures keep this whole room near 1.5 MB, so it opens quickly on hospital Wi-Fi.
  • No patient data: keep simulations free of real patient information so they never fall under health privacy rules like HIPAA.

Prerequisites

You should know the basics of a Three.js scene, camera and renderer; creating and animating simple 3D objects covers them. Loading a GLB is explained below step by step. Any GLB room model works; this one is a scan with added equipment.

Base scan: 'Charité University Hospital – Operating Room' by ChrisRE (Sketchfab), CC BY-NC. Cite: Queisner M. et al., VolumetricOR, Surg Innov 2022. Surgical equipment added for this demo. Patient body: merged skin-region meshes from Z-Anatomy (CC BY-SA 4.0), based on BodyParts3D, © The Database Center for Life Science (CC BY-SA 2.1 JP); the modified mesh (medsim-patient-skin-zanatomy.gltf) is shared under CC BY-SA 4.0.

Step-by-Step Code Breakdown

Every excerpt below is copied exactly from the full code further down, which is the same code running the live scene on this page.

1. Scene, camera and renderer

In plain words: we make the 3D world, a camera at standing eye height (1.6 meters, because this model is built in real meters), and a renderer. ACES tone mapping makes the bright surgical lights and white walls look natural instead of blown out.

const scene = new THREE.Scene();
scene.background = new THREE.Color(0x0a0b0f);

const camera = new THREE.PerspectiveCamera(60, innerWidth / innerHeight, 0.01, 100);
camera.position.set(2, 1.6, 2);

const renderer = new THREE.WebGLRenderer({ antialias: true });
renderer.setPixelRatio(Math.min(devicePixelRatio, 2));
renderer.setSize(innerWidth, innerHeight);
renderer.toneMapping = THREE.ACESFilmicToneMapping;
document.body.appendChild(renderer.domElement);

2. Light the room

In plain words: a sky-and-ground light fills the room evenly the way ceiling panels do, and a directional light adds shape. RoomEnvironment is a built-in fake room that Three.js turns into reflections, so the metal equipment and screens get believable highlights without any extra image files.

const hemi = new THREE.HemisphereLight(0xffffff, 0x8a8f99, 1.6);
scene.add(hemi);
const sun = new THREE.DirectionalLight(0xfff6e8, 1.6);
sun.position.set(1, 4, 1.5);
scene.add(sun);
scene.environment = new THREE.PMREMGenerator(renderer).fromScene(new RoomEnvironment(), 0.04).texture;

3. First-person controls and keys

In plain words: PointerLockControls hides the mouse and turns mouse movement into looking around, like a first-person game. The browser only allows that after a click, so the button in the corner calls controls.lock(). We track which movement keys are held down (WASD or the arrow keys) in a small object called move.

const controls = new PointerLockControls(camera, renderer.domElement);
const ui = document.getElementById('ui');
const walkBtn = document.createElement('button');
walkBtn.textContent = 'Click to walk: WASD + mouse, Esc to stop';
walkBtn.onclick = () => controls.lock();
ui.appendChild(walkBtn);
controls.addEventListener('lock', () => { walkBtn.style.display = 'none'; });
controls.addEventListener('unlock', () => { walkBtn.style.display = ''; });

const move = { f: false, b: false, l: false, r: false };
const KEYS = { KeyW: 'f', ArrowUp: 'f', KeyS: 'b', ArrowDown: 'b', KeyA: 'l', ArrowLeft: 'l', KeyD: 'r', ArrowRight: 'r' };
addEventListener('keydown', (e) => { if (KEYS[e.code]) move[KEYS[e.code]] = true; });
addEventListener('keyup', (e) => { if (KEYS[e.code]) move[KEYS[e.code]] = false; });

4. Load the compressed operating room

In plain words: the whole room is one .glb file of about 1.5 MB. It stays that small because its shapes are squeezed with Draco compression and its textures are WebP. DRACOLoader needs a small decoder program, which we load from the same pinned Three.js version. After loading, we measure the floor with a Box3 to get the walls (shrunk 30 cm so you cannot press your face into them), and we measure each big piece of equipment to make simple floor-plan boxes you cannot walk through.

const colliders = [];
let roomBounds = null;
const dracoLoader = new DRACOLoader();
dracoLoader.setDecoderPath('https://unpkg.com/three@0.160.0/examples/jsm/libs/draco/');
const loader = new GLTFLoader();
loader.setDRACOLoader(dracoLoader);
let sim = null;
loader.load('/models/operating-room-v2.glb?v=20261102b', (gltf) => {
  const room = gltf.scene;
  room.position.y = 0.009;
  scene.add(room);
  room.updateMatrixWorld(true);
  const floor = room.getObjectByName('OR_Floor') || room.getObjectByName('OR_Scan');
  if (floor) roomBounds = new THREE.Box3().setFromObject(floor).expandByScalar(-0.3);
  for (const n of ['OR_Table_Base', 'OR_Table_Lift', 'OR_SurgicalLights', 'OR_MonitorBoom', 'OR_PatientMonitor',
                   'OR_InstrumentTray', 'OR_IVStand', 'OR_AnesthesiaCart', 'OR_CrashCart']) {
    const o = room.getObjectByName(n);
    if (!o) continue;
    const box = new THREE.Box3().setFromObject(o);
    if (box.min.y > 1.7) continue;              // ceiling parts above your head can't be walked into
    colliders.push(box);
  }
  sim = initORInteractions({ THREE, scene, camera, renderer, root: room, controls, ambientLights: [hemi, sun] });
});

5. Collision: stop at walls and equipment

In plain words: blocked() asks one simple question: is this spot outside the room, or inside one of the equipment boxes? We pretend the player is a circle 25 cm wide (PLAYER_R), so each box is grown by that much. Checking only the floor plan (x and z) is plenty for walking and far cheaper than testing every triangle.

const PLAYER_R = 0.25;
function blocked(x, z) {
  if (roomBounds && (x < roomBounds.min.x || x > roomBounds.max.x || z < roomBounds.min.z || z > roomBounds.max.z)) return true;
  for (const b of colliders) {
    if (x > b.min.x - PLAYER_R && x < b.max.x + PLAYER_R && z > b.min.z - PLAYER_R && z < b.max.z + PLAYER_R) return true;
  }
  return false;
}

6. Walk with smooth acceleration and wall sliding

In plain words: instead of jumping a fixed distance per key press, the keys add to a velocity and friction slowly removes it, so you speed up and glide to a stop like a real person. If the new spot is blocked, we try moving along only one axis at a time. That lets you slide along a wall or a table edge instead of sticking to it.

const velocity = new THREE.Vector3();
function walk(dt) {
  velocity.x -= velocity.x * 10 * dt;            // friction
  velocity.z -= velocity.z * 10 * dt;
  const dz = Number(move.f) - Number(move.b), dx = Number(move.r) - Number(move.l);
  const len = Math.hypot(dx, dz) || 1;
  velocity.z -= (dz / len) * 30 * dt;            // acceleration from the keys
  velocity.x -= (dx / len) * 30 * dt;
  const prev = camera.position.clone();
  controls.moveRight(-velocity.x * dt);
  controls.moveForward(-velocity.z * dt);
  const p = camera.position;
  if (blocked(p.x, p.z)) {
    if (!blocked(p.x, prev.z)) p.z = prev.z;      // slide along x
    else if (!blocked(prev.x, p.z)) p.x = prev.x; // slide along z
    else p.copy(prev);
    velocity.set(0, 0, 0);
  }
}

7. Render loop: tour when idle, walk when locked

In plain words: while nobody is walking, the camera circles the operating table and looks at it, which makes a calm tour. Once the pointer is locked, walk() takes over. sim.update() runs the interactive layer every frame: the live ECG on the patient monitor, hover info cards, the defibrillator charge, the table lift and the IV drips.

const clock = new THREE.Clock();
let angle = 0;
function animate() {
  requestAnimationFrame(animate);
  const dt = Math.min(clock.getDelta(), 0.1);
  if (controls.isLocked) walk(dt);
  else {
    angle += dt * 0.12;
    camera.position.set(Math.sin(angle) * 3, 1.5 + Math.sin(angle * 0.5) * 0.3, Math.cos(angle) * 3);
    camera.lookAt(0, 1, 0);
  }
  if (sim) sim.update(dt);
  renderer.render(scene, camera);
}
animate();

The Full Code

Paste this into a file named index.html. It loads the operating room model from /models/operating-room-v2.glb and the interaction layer from /js/or-interactions.js on this site, so Launch Full Code runs it as is; to run it on your own server, copy those two files next to it. Launch Full Code opens this exact code as a standalone page in a new window.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Three.js 3D Operating Room Medical Simulation</title>
  <style>
    body { margin: 0; overflow: hidden; background: #000; font-family: system-ui, sans-serif; }
    #ui { position: fixed; left: 16px; bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
    #ui button { padding: 10px 16px; border: 1px solid rgba(42,209,214,0.5); border-radius: 8px; background: rgba(10,15,28,0.85); color: #fff; font: 600 14px system-ui, sans-serif; text-transform: capitalize; cursor: pointer; }
    #ui button:hover { background: #2ad1d6; color: #06252a; }
  </style>
  <script type="importmap">
  {
    "imports": {
      "three": "https://unpkg.com/three@0.160.0/build/three.module.js",
      "three/addons/": "https://unpkg.com/three@0.160.0/examples/jsm/"
    }
  }
  </script>
</head>
<body>
<div id="ui"></div>
<script type="module">
import * as THREE from 'three';
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
import { DRACOLoader } from 'three/addons/loaders/DRACOLoader.js';
import { PointerLockControls } from 'three/addons/controls/PointerLockControls.js';
import { RoomEnvironment } from 'three/addons/environments/RoomEnvironment.js';
import { initORInteractions } from '/js/or-interactions.js?v=20261109or';

// --- 1. Scene, camera and renderer ---
const scene = new THREE.Scene();
scene.background = new THREE.Color(0x0a0b0f);

const camera = new THREE.PerspectiveCamera(60, innerWidth / innerHeight, 0.01, 100);
camera.position.set(2, 1.6, 2);

const renderer = new THREE.WebGLRenderer({ antialias: true });
renderer.setPixelRatio(Math.min(devicePixelRatio, 2));
renderer.setSize(innerWidth, innerHeight);
renderer.toneMapping = THREE.ACESFilmicToneMapping;
document.body.appendChild(renderer.domElement);

// --- 2. Light the room ---
const hemi = new THREE.HemisphereLight(0xffffff, 0x8a8f99, 1.6);
scene.add(hemi);
const sun = new THREE.DirectionalLight(0xfff6e8, 1.6);
sun.position.set(1, 4, 1.5);
scene.add(sun);
scene.environment = new THREE.PMREMGenerator(renderer).fromScene(new RoomEnvironment(), 0.04).texture;

// --- 3. First-person controls and keys ---
const controls = new PointerLockControls(camera, renderer.domElement);
const ui = document.getElementById('ui');
const walkBtn = document.createElement('button');
walkBtn.textContent = 'Click to walk: WASD + mouse, Esc to stop';
walkBtn.onclick = () => controls.lock();
ui.appendChild(walkBtn);
controls.addEventListener('lock', () => { walkBtn.style.display = 'none'; });
controls.addEventListener('unlock', () => { walkBtn.style.display = ''; });

const move = { f: false, b: false, l: false, r: false };
const KEYS = { KeyW: 'f', ArrowUp: 'f', KeyS: 'b', ArrowDown: 'b', KeyA: 'l', ArrowLeft: 'l', KeyD: 'r', ArrowRight: 'r' };
addEventListener('keydown', (e) => { if (KEYS[e.code]) move[KEYS[e.code]] = true; });
addEventListener('keyup', (e) => { if (KEYS[e.code]) move[KEYS[e.code]] = false; });

// --- 4. Load the compressed operating room ---
const colliders = [];
let roomBounds = null;
const dracoLoader = new DRACOLoader();
dracoLoader.setDecoderPath('https://unpkg.com/three@0.160.0/examples/jsm/libs/draco/');
const loader = new GLTFLoader();
loader.setDRACOLoader(dracoLoader);
let sim = null;
loader.load('/models/operating-room-v2.glb?v=20261102b', (gltf) => {
  const room = gltf.scene;
  room.position.y = 0.009;
  scene.add(room);
  room.updateMatrixWorld(true);
  const floor = room.getObjectByName('OR_Floor') || room.getObjectByName('OR_Scan');
  if (floor) roomBounds = new THREE.Box3().setFromObject(floor).expandByScalar(-0.3);
  for (const n of ['OR_Table_Base', 'OR_Table_Lift', 'OR_SurgicalLights', 'OR_MonitorBoom', 'OR_PatientMonitor',
                   'OR_InstrumentTray', 'OR_IVStand', 'OR_AnesthesiaCart', 'OR_CrashCart']) {
    const o = room.getObjectByName(n);
    if (!o) continue;
    const box = new THREE.Box3().setFromObject(o);
    if (box.min.y > 1.7) continue;              // ceiling parts above your head can't be walked into
    colliders.push(box);
  }
  sim = initORInteractions({ THREE, scene, camera, renderer, root: room, controls, ambientLights: [hemi, sun] });
});

// --- 5. Collision: stop at walls and equipment ---
const PLAYER_R = 0.25;
function blocked(x, z) {
  if (roomBounds && (x < roomBounds.min.x || x > roomBounds.max.x || z < roomBounds.min.z || z > roomBounds.max.z)) return true;
  for (const b of colliders) {
    if (x > b.min.x - PLAYER_R && x < b.max.x + PLAYER_R && z > b.min.z - PLAYER_R && z < b.max.z + PLAYER_R) return true;
  }
  return false;
}

// --- 6. Walk with smooth acceleration and wall sliding ---
const velocity = new THREE.Vector3();
function walk(dt) {
  velocity.x -= velocity.x * 10 * dt;            // friction
  velocity.z -= velocity.z * 10 * dt;
  const dz = Number(move.f) - Number(move.b), dx = Number(move.r) - Number(move.l);
  const len = Math.hypot(dx, dz) || 1;
  velocity.z -= (dz / len) * 30 * dt;            // acceleration from the keys
  velocity.x -= (dx / len) * 30 * dt;
  const prev = camera.position.clone();
  controls.moveRight(-velocity.x * dt);
  controls.moveForward(-velocity.z * dt);
  const p = camera.position;
  if (blocked(p.x, p.z)) {
    if (!blocked(p.x, prev.z)) p.z = prev.z;      // slide along x
    else if (!blocked(prev.x, p.z)) p.x = prev.x; // slide along z
    else p.copy(prev);
    velocity.set(0, 0, 0);
  }
}

// --- 7. Render loop: tour when idle, walk when locked ---
const clock = new THREE.Clock();
let angle = 0;
function animate() {
  requestAnimationFrame(animate);
  const dt = Math.min(clock.getDelta(), 0.1);
  if (controls.isLocked) walk(dt);
  else {
    angle += dt * 0.12;
    camera.position.set(Math.sin(angle) * 3, 1.5 + Math.sin(angle * 0.5) * 0.3, Math.cos(angle) * 3);
    camera.lookAt(0, 1, 0);
  }
  if (sim) sim.update(dt);
  renderer.render(scene, camera);
}
animate();

addEventListener('resize', () => {
  camera.aspect = innerWidth / innerHeight;
  camera.updateProjectionMatrix();
  renderer.setSize(innerWidth, innerHeight);
});
</script>
</body>
</html>

What To Try Next

Part 2: Interactive Anatomy Quiz (Three.js + Z-Anatomy)

The operating room teaches the space. Part 2 teaches the body. The Skeletal System game loads 263 real bones, lets students tap any bone to see its name and region, show or hide the skull, spine, ribcage, arms and legs, and then take a 12-question Bone Quest quiz. It is built portrait-first for phones and runs on Indie Forge Studio; the hero above and the patient on the table both open it.

Play the Anatomy Quiz

Drag to rotate · pinch to zoom · tap a bone · quiz keys A to D

1. Export one body system from Blender

Z-Anatomy ships the whole body as one Blender file, split into numbered system collections (skeletal, muscular, joints, cardiovascular, nervous, visceral and more). Most of its objects are labels, so the export script appends only the system you want, keeps the real meshes, bakes their transforms and stores the anatomical name and region chain as custom properties, which glTF exports as extras.

# medsim_zanatomy_export_system_glb.py (run headless: blender -b --factory-startup --python ...)
with bpy.data.libraries.load(BLEND, link=False) as (src, dst):
    dst.collections = ['1: Skeletal system']          # append ONE system, not the 300 MB scene
col = bpy.data.collections['1: Skeletal system']
keep = [o for o in col.all_objects
        if o.type == 'MESH' and not re.search(r'\.(j|i|t|s|g)$', o.name)  # skip label lines/anchors
        and not o.hide_render and not any(k in o.name.lower() for k in NONCOMMERCIAL)]
for o in keep:                                         # bake transforms + modifiers into a clean copy
    me = bpy.data.meshes.new_from_object(o.evaluated_get(dg), depsgraph=dg)
    me.transform(o.matrix_world)
    copy = bpy.data.objects.new(o.name, me)
    copy['zname'], copy['chain'] = o.name, ' > '.join(chain(o))   # becomes glTF extras / userData

2. Decimate and compress for phones

The raw skeleton is about 675,000 triangles. A decimate pass on the large bones brings it to about 260,000, and gltf-transform welds, quantizes and meshopt-compresses it to a 2 MB file that loads fast on mobile data.

# decimate big meshes toward a triangle budget, then export with extras
m = obj.modifiers.new('dec', 'DECIMATE'); m.ratio = 0.28    # 675k -> 260k triangles
bpy.ops.export_scene.gltf(filepath=OUT, export_format='GLB', use_selection=True,
                          export_extras=True, export_materials='NONE', export_texcoords=False)

# weld + quantize + meshopt compression (4.9 MB -> 2.0 MB)
npx gltf-transform weld skeletal.raw.glb tmp.glb
npx gltf-transform meshopt tmp.glb anatomy-skeletal-system.glb --level medium

3. Load the GLB with GLTFLoader and MeshoptDecoder

The extras come through as userData on each mesh, so every bone knows its name and region without a separate lookup table. Three.js renames nodes with dots and spaces, so read the name from userData, not mesh.name.

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);             // required for EXT_meshopt_compression
loader.load('model/anatomy-skeletal-system.gltf', (gltf) => {
  gltf.scene.traverse((o) => {
    if (!o.isMesh) return;
    const { zname, label, chain } = o.userData;       // glTF extras from Blender
    const region = REGIONS.find((r) => r.match.test(chain));
    o.userData.part = { label, key: zname.replace(/\.(l|r)$/, ''), region: region.id };
  });
  scene.add(gltf.scene);
});

4. Tap to select with a raycaster

On a phone a drag rotates the camera, so a tap only counts as a selection when the finger barely moved and lifted quickly. Hover is only used with a mouse.

// tap = short press that did not orbit the camera
renderer.domElement.addEventListener('pointerdown', (e) => { down = { x: e.clientX, y: e.clientY, t: performance.now() }; });
renderer.domElement.addEventListener('pointerup', (e) => {
  if (Math.hypot(e.clientX - down.x, e.clientY - down.y) > 9 || performance.now() - down.t > 450) return;
  const r = renderer.domElement.getBoundingClientRect();
  ndc.set(((e.clientX - r.left) / r.width) * 2 - 1, -((e.clientY - r.top) / r.height) * 2 + 1);
  raycaster.setFromCamera(ndc, camera);
  const hit = raycaster.intersectObjects(visibleBones, false)[0];
  select(hit ? hit.object.userData.part : null);    // highlight + show name and region
});

5. The quiz engine and scoring

The quiz uses the same rules as the Falcon 9 Pad Quest quiz: shuffled questions and answers, instant green or red feedback, automatic advance, 100 points plus 20 per streak, a rank with up to three stars, and a best score saved on the device. Nine of twelve correct earns the Bone Expert badge. Each later system (muscles, organs, heart) reuses the same engine with a new config file.

// Falcon 9 / Planet Quest quiz rules: shuffled questions, A-D answers, streak bonus
function grade(ok) {
  if (ok) { correct++; score += 100 + streak * 20; streak++; best = Math.max(best, streak); }
  else streak = 0;                                   // a miss or skip resets the streak
  setTimeout(() => (++i < N ? ask() : end()), ok ? 1000 : 1900);   // auto-advance
}
// question types: 'tap' (find the bone on the model), 'name' (highlighted bone, 4 choices), 'fact'
const RANKS = [[1, 3, 'CHIEF OF ANATOMY'], [0.8, 3, 'ATTENDING PHYSICIAN'], [0.6, 2, 'RESIDENT'],
               [0.4, 1, 'MED STUDENT'], [0, 0, 'FIRST-DAY INTERN']];

Credits and license: anatomy models from Z-Anatomy (CC BY-SA 4.0), based on BodyParts3D, © The Database Center for Life Science (CC BY-SA 2.1 JP). The modified skeleton and patient meshes are shared under CC BY-SA 4.0. Z-Anatomy's inner-ear and kidney models are non-commercial and are not used. For learning only; not for diagnosis or clinical use.

Frequently Asked Questions

Can Three.js be used for medical simulations and training?

Yes. Three.js renders detailed anatomy models and full clinical rooms in the browser with GLTF loading, first-person navigation, physically based lighting and interactive equipment, with nothing to install.

What is PointerLockControls in Three.js?

PointerLockControls hides and locks the mouse cursor so mouse movement turns the camera like a first-person game. The browser only allows it after a user click, so call controls.lock() from a button, and the user presses Esc to unlock.

How do you load a compressed GLB model in Three.js?

Create a DRACOLoader, point setDecoderPath at the draco folder of the same Three.js version, attach it with gltfLoader.setDRACOLoader(dracoLoader), then call gltfLoader.load with the .glb path.

How do you stop the player walking through walls in Three.js?

Measure the floor and each large object with THREE.Box3, then before accepting a move check whether the new x and z fall inside a box grown by the player radius. If they do, undo the move on one axis at a time so the player slides along the wall.

What are the advantages of browser-based 3D medical simulations?

They need no installation, work on almost any device, update instantly for every learner and can be shared with a link, so students can practice anywhere without special hardware.

Is this medical simulation tutorial free?

Yes. The tutorial and the full code are free. Launch Full Code opens it in a new window, and the full-screen live demo only asks for a free Google sign-in.