Neon Face Scan
A neon mesh hugs the face, its 468-point double turns in the corner, and a hand gesture changes the colour — with a demo head when there is no camera.
Updated
This effect is part of Effect.Labs — 846 vanilla effects, some free, some premium. Gestures & Webcam has 11 effects, all premium. Explore the category →
3 usage examples



How it works
On the face, the 2D canvas draws a mesh of 51 landmarks joined by 132 edges, brighter towards the front than on the sides. The outlines of eyes, eyebrows and lips are redrawn lighter, nine key points carry a glow, four corners frame the whole and a scan band travels from forehead to chin in 2.6 s.
At the top right, the same face is redrawn as a cloud of 468 points: the double, which slowly turns one way then the other, up to about 34°. It can dissolve: its points spread out as particles, then come back in about a second.
It is the only effect in the category that tracks two things at once: the face carries the drawing, the hand is the remote. One raised finger: cyan. Two fingers: red. Open hand: magenta. Index and thumb in an “L”: green. Fist: the double dissolves for as long as the fist is held. A gesture has to be seen three times in a row to count, and the tint cross-fades over 0.4 s, never abruptly. An indicator spells out the colour and the recognised gesture.
All of that happens on the webcam, which only the button turns on; two MediaPipe detectors (face, hand) then run inside the tab, and no picture leaves it. Before that click, the scene shows a generated head, MediaPipe's reference face model: it looks at the cursor, and the colour changes every 5.5 s or on click. The examples on this page use that head, not a real face.
Accessibility
- Not informative content: canvas, video and indicator are
aria-hidden. The scene states its purpose througharia-label, and camera messages (loading, “no face detected”, refusal) go through arole="status"pill. - Keyboard: the camera button is reached with Tab and answers Enter and Space. Changing colour on click has no key; to offer it from the keyboard, add buttons that call
setTheme(), like the four swatches in the first example. - Reduced motion: no scan, still double, fixed colour, and the demo head only moves when the cursor does. A click still changes the tint, with a dissolve lasting a second and a half: a response to the visitor's action, not ongoing motion.
- Touch: a tap moves to the next colour. Under 520 px in portrait, the scene switches to a 4/5 format, close to a selfie.
- Face and privacy: the effect locates points; it recognises nobody, compares nothing and keeps nothing. Tell your visitors anyway: a camera aimed at a face worries people more than one aimed at hands.
Browser compatibility
2D canvas only for drawing; 51 KB of unminified JavaScript, including the demo's face model. Demo checked in all three test engines (Chromium 149, Firefox 151, WebKit 26.5): two scenes side by side each keep their own colour, not a single network request. Camera checked in Chromium and Firefox with a fake stream: five files downloaded on the first click, about 23 MB (the engine, a face model, a hand model), then MediaPipe's usage record every minute. On a test video the face and the “open hand” gesture were recognised; all five gestures were also checked by injecting hand landmarks. Safari: camera not verified.
No webcam, permission refused or page not on https: the demo head stays on screen and a message says why. Face out of frame for 2.5 s: “No face detected”, and the mesh fades out. Detection too slow: the hand is only analysed every third or fourth frame, the face keeps priority. A scene that scrolls off screen shuts its camera and pauses detection; a new click starts it again.
The code
HTML structure to paste into your page (the CSS + JS come with your purchase):
<div class="fx-0847-root">
<div class="nsc-scene" data-nsc-lang="en" role="region" aria-label="Neon Face Scan — glowing mesh on your face and a holographic point-cloud double, colour driven by hand gestures. Cursor demo, camera on request (processed on your device only)">
<video class="nsc-video" playsinline muted autoplay aria-hidden="true" tabindex="-1"></video>
<canvas class="nsc-canvas" aria-hidden="true"></canvas>
<div class="nsc-bar">
<button class="nsc-btn nsc-cam-btn" type="button" aria-pressed="false">
<span class="nsc-btn-ico" aria-hidden="true"></span><span class="nsc-btn-txt">Turn camera on</span>
</button>
<p class="nsc-privacy">No image ever leaves your device.</p>
</div>
<p class="nsc-status" role="status" aria-live="polite"></p>
<div class="nsc-label" aria-hidden="true">
<span>Neon Face Scan</span>
<span class="nsc-hint">move the cursor · tap to change the colour · or turn the camera on</span>
</div>
<div class="nsc-hud" aria-hidden="true">
<span class="nsc-hud-theme">Cyan</span>
<span class="nsc-hud-hint">click or tap: next colour</span>
</div>
</div>
</div>
One-time payment, no subscription — the code is yours forever
Customize
Options passed to the API or data-* attributes:
| Option / property | Default | Effect |
|---|---|---|
Tints (JS — THEMES, THEME_ORDER) |
cyan, red, magenta, green | Four RGB colours and the cycle order. The CSS variable --nsc-col, set on the scene, follows the current tint: use it to colour a heading or a button. |
Gesture → tint (JS — GESTURE_THEME) |
one cyan, two red, open magenta, L green |
Change the mapping without touching recognition. The fist (fist) is not in this table: it drives the dissolve. |
Demo cycle pace (JS — t + 5.5) |
5.5 s | Delay before the automatic colour change, without a camera. It appears in two places; a click resets it. |
Scan (JS — (t / 2.6) % 1) |
one pass every 2.6 s | Raise it to 4 for a calmer scan. The band covers 9% of the face height (fh * 0.09). |
Demo head position (HTML — data-nsc-head) |
absent: centred head | "right" shifts it to 72% of the width to leave room for text on the left; in portrait it moves above the text. |
Indicator (HTML — .nsc-hud) |
present, top right | Delete the block for a text-free scene: the double then sits 24 px from the top. The state stays readable in data-nsc-theme and data-nsc-gesture. |
Processing load (JS — MAX_HANDS, HAND_EVERY) |
1 hand, analysed every 2nd frame | One hand is enough for gestures. Set HAND_EVERY to 3 on modest devices: gestures answer slightly later, the face stays smooth. |
Face hold (JS — HOLD_FACE_MS) |
420 ms | How long the mesh stays on screen, fading, when the face is lost for a fraction of a second. |
FAQ
numFaces: 1) and one hand. If two people are in frame the detector picks one, and another person's hand can change the colour. For a booth, frame tightly.