Scan your whole stack
From OX Research Newsroom
Are you using @eleven.spectacles/virtual-try-on?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v5.1.4
@eleven.spectacles/virtual-try-on was last scanned on 27 Nov 2026 at version 5.1.4. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 5.1.4 LATEST | 27 Nov 2026 | No rules fired |
| 5.1.3 | 26 Nov 2026 | No rules fired |
| 5.1.2 | 26 Nov 2026 | No rules fired |
| 5.1.1 | 26 Nov 2026 | Not shown |
| 5.1.0 | 25 Nov 2026 | Not shown |
Findings for v5.1.4. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 5.1.4; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Real-time virtual try-on for eyewear, as a Nuxt module. Renders 3D glasses
(GLB) on the user's face over a live front-camera feed: MediaPipe
FaceLandmarker tracks the face in a Web Worker, TresJS (Three.js) renders
the frame, and everything runs on-device.
Built by Eleven Spectacles — luxury eyewear, with virtual try-on for every frame in the catalog.
modules entry — components and composables register themselves. camera ─► <video> (mirrored in CSS, full resolution) ───────────────┐
│ │ shown
│ each new camera frame, downscaled to 480 px │ under
▼ │
Web Worker: MediaPipe FaceLandmarker (GPU, CPU fallback) │
│ 478 landmarks, head pose matrix, blink score │
▼ ▼
placement (main thread) ──────────────────────────────► WebGL canvas (TresJS/three)
iris-ruler scale, pose, smoothing, frame GLB, lenses, shadow,
tracking hold, temples, nose seat reflections, occluders
getUserMedia feeds a <video> behind a transparent WebGL
canvas. The feed is mirrored once, in CSS. The camera starts only on
start() (or autoStart) and stops on stop() or unmount.requestVideoFrameCallback), a
480 px copy is handed to a Web Worker as a transferable ImageBitmap.
MediaPipe FaceLandmarker returns 478 landmarks, the head's
transformation matrix and the blink blendshapes. One frame is in flight
at a time, so a slow device drops frames instead of queuing them. When
the tracker loses the face for under 300 ms (a hand, motion blur), the
last pose is held instead of the frame vanishing.utils/ map the landmarks into the
visible (object-fit: cover) window and into the 3D camera.roomReflections it is also
reflected in the lenses and aims the light.cameraMatch adds the webcam's grain, softness and
light wrap.hairOcclusion, a second worker segments hair
over the near arm.| Feature | low |
mid |
high |
Prop |
|---|---|---|---|---|
| Face tracking, metric placement, fit verdict | ✓ | ✓ | ✓ | — |
| Face-mesh occluder (far temple hidden by the head) | ✓ | ✓ | ✓ | occluder |
Reflections from an HDR environment (low: procedural, no download) |
✓ | ✓ | ✓ | environmentUrl |
| Physical lens (Fresnel, sheen) | — | ✓ | ✓ | physicalLens |
| Contact shadow on the skin | — | ✓ | ✓ | contactShadow |
| Room lighting from the camera | — | ✓ | ✓ | adaptiveLighting |
| Webcam match: grain, blur, light wrap (opt-in) | — | ✓ | ✓ | cameraMatch |
| Room reflections and light direction (opt-in, needs room lighting) | — | ✓ | ✓ | roomReflections |
| Hair occlusion (opt-in) | — | — | ✓ | hairOcclusion |
Neighbour prefetch (cache of 2 GLBs on low, 4–6 above) |
— | ✓ | ✓ | preload |
True-to-size sizing (trueToSize), card calibration, the ear bend
(templeEarBend), capture() and freeze() run on every tier. A feature
runs when its prop is on and the tier allows it. cameraMatch,
roomReflections, hairOcclusion and templeEarBend default to off; the
rest default to on. The tier comes from static signals at mount. Each
signal votes, and the lowest vote wins:
MAX_TEXTURE_SIZE: ≥ 8192 votes high, ≥ 4096 votes mid.navigator.deviceMemory: ≥ 8 GB votes high, ≥ 4 GB votes mid.mid.While a face is tracked, a tier steps down one level when the p95 frame time
stays over 33 ms (30 fps) for 5 s after a 5 s warm-up. Each step-down is
reported as TRY_ON_TIER. The tier prop pins a tier and disables the
step-down.
createImageBitmap and
getUserMedia — every current evergreen browser, desktop and mobile.
Unsupported browsers get an error state instead of a crash.localhost).npm i @eleven.spectacles/virtual-try-on
TresJS (@tresjs/nuxt, @tresjs/core), three and MediaPipe
(@mediapipe/tasks-vision) are regular dependencies of the module — your
app doesn't install them. The module registers @tresjs/nuxt itself;
listing it in your own modules too is harmless.
Register the module:
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['@eleven.spectacles/virtual-try-on']
})
That's all the wiring. The module registers TresJS, its components and composables.
The component renders the mirrored camera feed and the tracked frame, and fills its container — give it a size. Everything else is yours: consent, error messages, positioning hints, the frame picker, the modal. Build them in the default slot, which renders on top of the feed and receives the current state and actions:
<script setup lang="ts">
import { ref } from 'vue'
import type { TryOnModel } from '@eleven.spectacles/virtual-try-on'
const models: TryOnModel[] = [
{
label: 'Iris · Bronze',
file: 'iris-bronze',
family: 'iris',
color: 'Bronze',
colorClass: 'bg-amber-700'
}
]
const activeModel = ref('iris-bronze')
function onTrack(event: string, payload: Record<string, unknown>) {
// forward to your analytics
}
</script>
<template>
<div class="relative aspect-3/4 w-full">
<VirtualTryOnExperience
v-model:model="activeModel"
:models="models"
calibration-url="/models/virtual-try-on/calibration.json"
@track="onTrack"
>
<template #default="{ status, error, guideHint, isStarting, start }">
<div v-if="status !== 'active'" class="absolute inset-0 grid place-items-center">
<p v-if="error">Camera unavailable ({{ error }})</p>
<button :disabled="isStarting" @click="start">
{{ error ? 'Retry' : 'Allow camera access' }}
</button>
</div>
<p v-else-if="guideHint === 'noFace'" class="absolute inset-x-0 bottom-4">
Position your face in view
</p>
</template>
</VirtualTryOnExperience>
</div>
</template>
The component loads two kinds of static assets from your app:
| Asset | URL | Notes |
|---|---|---|
| Frame models | <modelBaseUrl>/<file>.glb |
modelBaseUrl defaults to /models/virtual-try-on. Draco compression is supported and recommended. |
| Calibration | calibrationUrl |
One JSON manifest covering all frames. |
With the defaults, put the files in public/models/virtual-try-on/.
Calibration lines every frame up to the same baseline, because GLB exports rarely share an origin or scale:
{
"schemaVersion": "1.0.0",
"reference": "iris-bronze", // model the others are normalised against
"models": {
"iris-bronze": {
"model": "iris-bronze", // GLB filename without .glb
"translation": { "x": 0, "y": 0, "z": 0 }, // metres
"rotation": { "x": 0, "y": 0, "z": 0 }, // radians
"scale": 1,
"lens": { "tint": "#3a4a5c", "category": 3 }, // optional lens colour/darkness override (see below)
"frameWidthMm": 139.7 // rendered width, written by generate-calibration (fit ranking)
}
}
}
The full types are exported as TryOnCalibrationFile and
TryOnModelCalibration.
Two optional fitting fields:
pads: { spacingMm }: the distance between the nose pads' contact
points. With it the frame seats lower on a narrow nose and higher on a
wide one (up to ±4 mm), from the shopper's nose profile on frontal frames.rotation.x sets the pantoscopic tilt. Worn frames tilt 7–12° (9° is
the usual fit). npx tsx scripts/audit-tilt.ts --input <glb dir> --calibration <calibration.json> measures each model's lens plane,
reports its effective tilt and suggests the rotation.x for 9°; it exits
non-zero when a model is out of range.The lens entry overrides the GLB's lens. Give its darkness in the
product's own units, from its sheet:
| Field | Meaning |
|---|---|
tint |
Lens colour, #rrggbb (sRGB). Replaces the GLB's lens colour and its texture. Its hue also tints the lens shadow. |
category |
ISO 12312-1 filter category 0–4 (cat. 2: 18–43 % light through, cat. 3: 8–18 %). The middle of the band is used. |
transmittance |
Luminous transmittance τv, 0–1, when the sheet gives it. More precise than the category. |
density |
Raw darkness 0 (clear) – 1 (opaque) = 1 − τv. Wins over the two above. |
gradient |
{ top, bottom } densities for a gradient lens, dark to light top to bottom. Replaces the single darkness. In between, the lens fades in optical density (log τv) like a dyed lens, so it stays dark further down than a linear fade. |
generate-calibration keeps all of them when it regenerates the file.
The frame renders exactly as the GLB authors it; only the lenses are rebuilt. So the colour a shopper sees is decided by the asset and the calibration, not by the renderer:
baseColorFactor). A white base colour on a metal
part renders as polished silver, whatever the product is called. Pack
roughness and metalness per finish: metal parts at metalness 1, acetate
at 0. Material extensions the three.js glTF loader reads
(KHR_materials_clearcoat for polished acetate, KHR_materials_ior,
_specular) pass straight through.glass or lens is rebuilt as a lens. Without a lens entry it keeps
the GLB's colour, often a texture shared across colourways. Set tint
and category (or transmittance) from the product sheet for every
frame.tests/e2e/colour.spec.ts renders each frame under
neutral light and compares frame and lens against product-photo swatches
in CIEDE2000 (ΔE ≤ 3 by default). Fill
tests/fixtures/colour-swatches.json with a #rrggbb per frame and lens,
sampled from a neutral-light product photo, and the box to sample on the
render. With no models listed, the spec skips.adaptiveLighting tints and
dims the frame to match the room, and roomReflections and cameraMatch
add the room and the webcam's look. Judge catalog colour under neutral
light, and realism on a live camera.<VirtualTryOnExperience> propsFind threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.