Menu

Building a 3D Virtual Pharmacology Lab in the Browser with React Three Fiber
📰

Building a 3D Virtual Pharmacology Lab in the Browser with React Three Fiber

DEV Community: react·Cologylabs·3 days ago
#OzLcbOlP
#devtoreact#devto#dev#const#animal
Long article (999 words) — no AI summary yet.
Reading 0:00
15s threshold

Pharmacology practicals are hard to practise. Students usually watch one demonstration, copy the readings and move on. At CologyLabs we started by recording 55+ practicals as guided videos for B.Pharm and B.V.Sc students. That fixed visibility, but students were still watching , not doing .

So for Phase 2 we're turning those experiments into an interactive 3D lab in the browser: the student walks around the lab, picks up the animal, weighs it, calculates a dose, injects it and runs a test like the rotarod. This post walks through how we're structuring that with React Three Fiber , drei and plain Three.js concepts.

The stack

React Three Fiber (R3F) for a declarative scene graph inside React

@react-three/drei for helpers like useGLTF , PointerLockControls and Html

GLTF/GLB models for the lab, apparatus and rigged animals, made by our 3D designer

A small state store for the experiment (current step, animal weight, dose, results). The examples below use Zustand, but any store works.

1.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.