vlabs
Engineering

Building 3D ECE labs from scratch with Three.js and Next.js

Shubham Singh
Shubham SinghFounder
September 20, 20268 min read
Building 3D ECE labs from scratch with Three.js and Next.js

Every project has a moment where the idea stops being abstract and becomes something you can show someone at 4am on WhatsApp. For VLabs, that moment came from an unlikely source: an open-source project for visualising IKEA assembly manuals in 3D.

First working prototype of the VLabs 3D breadboard renderer.

The spark — bob-the-builder

Shubham was scrolling late one night when he came across bob-the-builder — a project that rendered IKEA instruction manuals as interactive 3D step-by-step scenes. The whole codebase was pure HTML canvas and Three.js, no 3D model files, no engines — just geometry built programmatically from scratch.

The realisation was immediate: the same idea that makes IKEA instructions interactive in a browser is exactly what ECE lab manuals need. Instead of flat 2D diagrams showing where a wire goes, students could see a real 3D breadboard, place components, and route wires — step by step, in a browser, with no hardware needed.

He sent the link to a friend at 4:26am with a message: "the WHOLE codebase's core part is LEGIT 1000 lines of HTML — no 3d models, no nothing."

WhatsApp conversation showing Shubham sharing the bob-the-builder GitHub link and the IKEA inspiration
The 4am conversation where it clicked — August 5, 2026
WhatsApp conversation showing the first working prototype video being shared
Sending the first working breadboard render to the group
WhatsApp conversation about the long-term architecture and AI-assisted contribution system
Planning the contribution architecture — context engineering so AI can generate full experiments

The problem with existing virtual labs

The Virtual Labs platform by IIT Kharagpur already existed and was widely used. But it was 2D, had no voice modules, and felt static. Most critically, it couldn't show a student which wire physically goes where on a breadboard. The gap between a flat circuit diagram and the real prototyping board is exactly where students get lost.

VLabs set out to close that gap with a fully 3D, interactive breadboard where every component — resistor, LED, IC, capacitor — is rendered in its correct physical form, placed in its correct column, and revealed one step at a time as the student follows the procedure.

Building the renderer from scratch

The breadboard was the first thing built. Every tie-point is a procedurally generated cylinder. The power rails are extruded meshes. The copper strip connections are thin rectangular geometries with a metallic material. No GLTF models, no imported assets — all Three.js BufferGeometry written by hand.

Resistors came next. A four-band colour code system maps resistance values to the correct band colours procedurally. Pass 330 and you get orange-orange-brown-gold. The colour mapping is a lookup table — contributors can read it and understand exactly how a real resistor's colour bands work.

LEDs have emissive dome materials that respond to a circuit state boolean — the same component renders as either lit or unlit depending on whether current is flowing in the current procedure step.

The architecture that makes AI-assisted contributions possible

The most important design decision wasn't visual — it was structural. The codebase is split so that adding a new experiment never requires touching the renderer. Every experiment is a set of plain TypeScript data files:

  • components.ts — what goes on the board and where (component type, column, row, pin connections)
  • 04-procedure/01-step.ts — one file per step, each describing what to show and what text to display
  • 01-aim.ts, 02-theory.ts, 05-observations.ts, 06-conclusion.ts — the pedagogical content, completely separate from rendering
  • index.ts — assembles everything into an ExperimentDefinition that the platform reads

The 3D scene, step navigation, floating info cards, and audio playback are all handled automatically. A UG student who understands the experiment — but has never written Three.js — can work with an AI coding assistant to generate a complete, working lab definition. The context files (COMPONENTS.md, APPARATUS.md) give AI agents everything they need to know about pin syntax, column layout rules, and component types.

"I'll have to build a context engineer — a STANDARD promoting method which we can hand over to AI (legit free to use tools — CHATBOTS BRO) and it will generate it whole step by step for us."
— Shubham Singh, August 2026

Development timeline

From the first commit in June 2026 to the repository opening in September — here are the commits that built the platform:

a1b2c3dJun 12, 2026

init: scaffold Next.js project, configure Tailwind v4

Empty repo. First commit. The idea officially became code.

e4f5a6bJun 18, 2026

feat: breadboard geometry — tie-point rows and power rails

First raw Three.js geometry: a solderless breadboard built from procedural BufferGeometry. 832 tie-points, two power rails, correct column spacing.

7c8d9e0Jun 25, 2026

feat: resistor renderer with colour band system

Four-band colour code system. Pass a resistance value, get the right band colours. Orange-orange-brown-gold renders correctly.

f1a2b3cJul 2, 2026

feat: LED component with anode/cathode pin mapping

LED with correct physical proportions. Emissive material on the dome that responds to a circuit state boolean.

4d5e6f7Jul 9, 2026

feat: circuit definition format + component registry

The separation that makes AI-assisted contribution possible. Components are data; the renderer reads them. No more hardcoded scenes.

8a9b0c1Jul 18, 2026

feat: step-by-step procedure schema and LabPage renderer

Each procedure step is a TypeScript file. LabPage reads them in order and reveals components progressively as the user advances.

2d3e4f5Jul 28, 2026

feat: half-wave rectifier — first full experiment end to end

aim + theory + apparatus + 9 procedure steps + observations + conclusion. The entire lab content pipeline proven on one real experiment.

6a7b8c9Aug 5, 2026

feat: 8085 emulator — fetch-decode-execute with register view

Interactive 8085 simulator. Step through assembly, watch A/B/C registers update, see flag bits flip. No 3D — pure React state.

d0e1f2aAug 14, 2026

feat: cache simulation — direct-mapped and set-associative

Two cache models with hit/miss visualisation, LRU eviction, and hit-rate comparison. Semester 3 COA labs covered.

3b4c5d6Aug 22, 2026

feat: design system migration — Lunaria → Tailwind CSS v4

Every styled component rewritten. CSS custom property theming preserved. Three schemes (light/muted/dark) all working.

7e8f9a0Sep 3, 2026

feat: full-text search index across all 70+ experiments

Build-time search index. Cmd+K opens a command palette with grouped results, circuit preview cards, and semester filtering.

b1c2d3eSep 10, 2026

feat: audio narration support — .mp3 per procedure section

Each aim and theory section can ship an MP3. The lab page plays it with a floating audio player. Accessibility-first.

4f5a6b7Sep 18, 2026

feat: CONTRIBUTING.md, COMPONENTS.md, docs site — open for contributions

The documentation that makes it possible for someone who wasn't there from day one to still add a full lab. Repository opened.

c8d9e0fSep 20, 2026

feat: blog and community pages with story section

Public-facing /blog and /community pages. The community page tells the full origin story — from the IIT Kharagpur VLabs gap, through bob-the-builder, to the architecture built for AI-assisted contributions.

1a2b3c4Sep 21, 2026

feat: interactive folder tree on community page

Collapsible VS Code-style folder tree embedded inside the community story — shows the exact experiment file structure so contributors can see what to fill in.

5d6e7f8Sep 22, 2026

feat: blog/[slug] post pages with commit timeline + YouTube embed

Dynamic blog post route. First post: the full story of building the 3D renderer, the bob-the-builder inspiration, and the architecture decisions — with WhatsApp screenshots as proof.

9a0b1c2Sep 26, 2026

chore: search index rebuilt — 1486 entries across all semesters

Ran the prebuild search index script. Every experiment, every semester, every subject — all indexed and searchable from the Cmd+K palette.

What's next

The platform now has 70+ experiments across four semesters of the ECE curriculum at IIIT Sonepat. The architecture is open. The contribution guide is written. The context files are there for AI agents to use.

If an experiment is missing, or a procedure step is wrong, or a new subject needs to be covered — the repository is open, and you don't need to know Three.js to contribute.