Case study · 09 Retail · AR commerce

Try every frame.
Fit them perfectly.

A premium eyewear store with real-time virtual try-on and on-device PD measurement — across web and mobile.

Buyers see frames on their own face, measure their pupillary distance with a camera, and order glasses that actually fit.

Role Lead Engineer · AR
Year 2023 — 2024
Surfaces Web · iOS & Android
Status Live
spectme.optics
SpectMe Optics — find your perfect eyewear
01 / The brief

Selling glasses you can't try on.

The hardest problem in online eyewear is trust: will they suit my face, and will the prescription sit right? SpectMe answers both before checkout — with the phone already in the customer's hand.

SpectMe Optics set out to sell premium frames online — but eyewear is the one product people refuse to buy blind. We had to recreate the optician's mirror, in the browser.

Two features carry the whole experience: a virtual try-on that maps frames onto a live camera feed in real time, and a PD measurement tool that reads pupillary distance from a selfie using a standard card for scale.

Everything else — catalog, frame detail, prescription capture, checkout — wraps around those two moments of confidence. Built once for web and shipped to iOS & Android with a shared try-on core.

Tech stack
React React Native Three.js MediaPipe WebGL TensorFlow.js Node.js Stripe
02 / The two moments

See it on your face.
Measure it to the mm.

Two camera-driven experiences do the heavy lifting of trust — one answers "does it suit me?", the other answers "will it fit?". Both run on-device, in real time.

Virtual try-on

Frames on your real face.

A face-mesh model tracks 468 points at camera frame-rate and renders the 3D frame in place — rotate your head, the glasses follow. Swap colors and styles live.

468Face points
60fpsLive render
3DFrame models
PD measurement

Pupillary distance, no optician.

Hold a standard card to your forehead for scale; the model finds both pupils and returns your PD in millimetres — the number lens labs need to centre your prescription.

±0.5mm accuracy
1Selfie
10sTo result
03 / The storefront

A gallery, not a grid of SKUs.

Black, editorial, red-accented — frames are shot like jewellery. The web store leads with the try-on, then lets the catalog and detail pages do the selling.

Confidence before checkout

The whole funnel is built around two moments of certainty — seeing the frame on your face and knowing it'll fit — so returns drop and conversion climbs.

  • Live try-on on any frame, any colour
  • PD captured and saved to the order automatically
  • Prescription upload & lens options at checkout

One core, three platforms

The face-tracking & rendering engine is shared between the web app and the React Native mobile apps — write the hard part once, ship it everywhere.

  • Web — WebGL + MediaPipe in the browser
  • iOS & Android — native camera, same 3D core
  • Frames authored once as 3D models
04 / The try-on engine

Frames rendered in real 3D.

Every frame is a true 3D model — so it catches light, turns with your head, and sits at the right depth on your face. Watch it spin; drop your camera in beside it.

acetate · gloss 52□18 · 145 3D · real-time
Model · Halo Round — rotating preview
Live try-on tracking · 60 fps
// drop your selfie / camera feed here
Looks good · add $189
PD measurement · livecard-scaled
63.5 mm
card · scale ref
1

Hold a card to your forehead

Any standard bank card. Its fixed width gives the model a real-world ruler to scale the image.

2

We find both pupils

The face-mesh locks onto your eyes and measures the distance between pupil centres in pixels.

3

Get your PD in millimetres

Pixels become millimetres via the card scale. The value saves straight to your order so lenses centre correctly.

05 / In your hand

The whole shop, on your phone.

The native iOS & Android apps put the camera front and centre — browse frames, try them on with the front camera, measure your PD, and check out, all without leaving the app.

iOS & Android · React Native
9:41
SPECTME
1
Luxury eye-wear

Find your
perfect frame.

Acetate
Halo Round
$189Try on
Titanium
Edge Square
$249Try on
Shop
Try-on
PD
Me
9:41
Virtual Try-On
tracking · Halo Round
Acetate · red
Halo Round · $189
Add
Shop
Try-on
PD
Me
9:41
PD Measure
63.5 mm
Hold a card for scale
PD saved to your profile ✓
Shop
Try-on
PD
Me
9:41
Your Bag
Halo Round · Red
PD 63.5 · single vision
$189
Edge Square
PD 63.5 · blue-light
$249
Total · 2 frames
$438
Checkout securely
Shop
Try-on
PD
Me
Shop · Virtual try-on · PD measurement · Bag — one shared try-on core across web & native
People won't buy glasses they can't try. So we built the mirror and the optician's ruler straight into the camera.
Pasan W. · Lead Engineer · AR
06 / The outcomes

Trust, engineered in.

A storefront where the two scariest questions in online eyewear are answered before the customer ever reaches checkout.

3
Platforms shipped
Web, iOS & Android on a shared core.
468
Face mesh points
Real-time tracking for fit & try-on.
±0.5mm
PD accuracy
Card-scaled pupillary distance from a selfie.
2
Camera features
Try-on & PD — the heart of the funnel.
Start over · 01 / 09

Lanka Medical Audio

That's the full set. Loop back to the start — storefront, clinic, POS, finance & an AI advisor on one platform.