Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@eleven.spectacles/virtual-try-on

Latest version: v5.1.4

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
npm package Publisher: yordan.ramchev
0 Stars
0 Forks
20 Versions
1.1K Downloads
TypeScript Repo language

Scan summary

@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.

  • Releases: 20 versions; the latest 5 were published within 3 days (25–27 Nov 2026).
  • Findings: No rules fired in version 5.1.4.
  • Downloads: 1,126 downloads.

Versions

20 versions published
Versions and the rules that fired in each
VersionPublishedStatus
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

No rules fired in 5.1.4

Findings

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.

README

The publisher’s own README, as collected from the registry.

Virtual Try-On

npm CI

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.

  • Headless — renders only the camera feed and the tracked frame. No UI library, no copy, no utility classes: your app draws every control.
  • One modules entry — components and composables register themselves.
  • Private by design — camera frames never leave the browser.
  • True to size — the shopper's PD is measured on-device against the iris, so the frame shows at its real size on their face; per-frame calibration, a frame seated on the nose bridge, and a face-mesh occluder that hides temples behind the head.
  • Tells the customer if it fits — a narrow / good / wide verdict from the frame's width against the tracked face, for your UI and analytics.
  • Looks real — lenses with Fresnel reflections and an anti-reflective sheen, a soft shadow of the frame on the skin, and lighting that follows the room the camera sees.
  • Smooth — One-Euro filtering on landmarks and pose; detection runs off the main thread.

Contents

  • How it works
  • Features by device tier
  • Requirements
  • Installation
  • Usage
  • Serving models and calibration
  • API
  • Configuration
  • Migrating to 5.0
  • Privacy
  • Development
  • Releasing
  • License

How it works

 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
  1. Camera. 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.
  2. Tracking. On each new camera frame (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.
  3. Placement. Pure functions in utils/ map the landmarks into the visible (object-fit: cover) window and into the 3D camera.
    • Scale. The scale is true to size. The iris (11.7 mm across in adults) is the ruler that measures the shopper's PD and ear-level width, and the frame is sized from them. An optional card calibration tightens the PD to ±1 mm.
    • Baseline. A per-frame calibration lines every GLB up to one baseline.
    • Smoothing. Pose and scale go through One-Euro filters, and the scale holds through blinks.
    • Fit. The temple arms open at the hinge to meet the tracked head, and can bend down behind the ears. Frames with pad spacing in their calibration seat by the shopper's nose profile.
  4. Rendering. three draws the frame with neutral tone mapping, so catalog colours match the feed.
    • Lenses read as glass: Fresnel opacity, reflections and an anti-reflective sheen. Tint and darkness come from the product sheet (ISO category, τv, gradients).
    • Shadow. A soft shadow falls on the tracked skin.
    • Room light. The room's light, sampled from 16×16 thumbnails in the worker, tints and dims the frame. With roomReflections it is also reflected in the lenses and aims the light.
    • Camera match. cameraMatch adds the webcam's grain, softness and light wrap.
    • Occlusion. A depth-only face mesh hides what the head hides, such as the far temple. With hairOcclusion, a second worker segments hair over the near arm.
  5. Adapting. A device tier (below) decides which of those effects run, and steps down mid-session if frames get slow.

Features by device tier

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.
  • With neither signal (Safari, Firefox), the tier is 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.

Requirements

  • Nuxt 4.
  • Browser: WebAssembly, Web Workers, createImageBitmap and getUserMedia — every current evergreen browser, desktop and mobile. Unsupported browsers get an error state instead of a crash.
  • Secure context: camera access only works over HTTPS (or localhost).

Installation

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.

Usage

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>

Serving models and calibration

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.

Getting true colours

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:

  • Frame finish lives in the GLB. Each colourway needs its own base colour texture (or 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.
  • Lens colour comes from calibration. A material whose name contains 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.
  • Measure it. 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.
  • Room effects shift colour on purpose. 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.

API

<VirtualTryOnExperience> props

OX Radar and Response Center

Find 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.

Where it’s listed

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).

  • npm @eleven.spectacles/virtual-try-on

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Vulnerability Insights

Compromised Claude Code extensions (versions 2.1.312 & 2.1.313) in Cursor try to install a backdoor

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229