Palm Figurines
An animated 3D figurine lands in your palm on the webcam, follows your hand and turns with it. Close your fist: the next one in the collection. Without a camera, it follows the cursor.
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
The open hand is the display stand. A figurine stands on a small base at the bottom of the palm, one and a half times as tall as the palm is long: its head reaches the fingertips. It moves with the hand, leans when the hand leans and spins when the palm turns sideways. A wireframe display case with eight glowing corners surrounds it, and a label gives its name and rank, "ROBOT BOLT · 1/3".
These are real animated 3D models, rendered by Three.js with studio lighting, reflections and a contact shadow under the base: a robot, an astronaut and a golem, each with an idle animation and a greeting played on arrival. The three glTF files, under a CC0 licence, are included in the script: nothing to host. They weigh 324 KB out of the 376 KB of JavaScript.
There are four ways to move to the next figurine: close a fist (either hand, for 0.12 s), click or tap the scene, press the "Next figurine" button, or call next() or select(i) from your page. The figurine shrinks in 0.2 s and the next one pops in with a slight bounce. With two hands, the one that stays open holds the figurine while the other flips through the collection.
Without a camera, two drawn hands hold the scene: the figurine goes to the one following the cursor, otherwise to the right-hand one, and it changes by itself every 5.5 s. Every capture on this page was taken that way, using the code you buy. The webcam opens from its button; frames are analysed in the browser by MediaPipe and never leave it. What does go out is a technical log that MediaPipe sends to Google (odml.pa.googleapis.com) after one minute, then for every minute of camera use, with no image at all, carrying the detector's version and its processing times. Your privacy policy can mention it.
Accessibility
- Keyboard: two buttons follow each other in the tab order, the camera then "Next figurine". The whole collection can be browsed with Enter or Space, with no mouse and no gesture.
- Reduced motion: the figurine stands in a fixed pose, with no greeting, no swaying and no automatic change: the display case stays still until someone interacts with it. A click or the button still changes the figurine, at once, with no shrinking and no bounce.
- Figurine name: the label is drawn in the canvas, so a screen reader cannot see it. If the name matters on your page, show it as text too, as the three examples do from
effect.namesandeffect.cur. - Touch: a short tap (under 0.4 s, without dragging) moves to the next figurine. A finger sliding sideways carries the figurine along; up or down, the page scrolls. The tap was tried on a simulated touch screen in Chromium, Firefox and WebKit.
- Light: nothing blinks. Changes are scale animations of 0.2 to 0.4 s confined to the figurine, and the wave that marks a fist is a thin ring around the hand.
Browser compatibility
Three.js 0.186 (WebGL 2) and its glTF loader are fetched from cdn.jsdelivr.net as soon as the scene initialises, before any click: three files, 176 KB transferred. Three.js sets a __THREE__ variable on window. Two display cases on one page (Chromium 149, Firefox 151, WebKit 26.5) share a single Three.js download, and a click on one flips through its own collection only. The camera, tried in Chromium and Firefox with a simulated webcam, adds the hand detector (about 10.7 MB) and the MediaPipe log to Google, one request per minute. Simulated hand landmarks passed to the shipped code in Chromium confirmed the fist (one figurine per closing, no repeat while it stays closed), the rotation when the palm pivots and the sharing of roles between two hands. A WebKit quirk: the CDN announces Three.js as a preload (Link: rel=modulepreload) with a relative address, which WebKit resolves against your own domain; that request to /npm/three@0.186.0/+esm ends in a 404 with no visible effect, and the figurine still shows. Real Safari and phones: not verified.
If cdn.jsdelivr.net is blocked (CSP, offline) or WebGL 2 is missing, the figurine does not show: the display case, its corners and the label remain, follow the hand and change name from the button. Verified by cutting the CDN. The minimum versions come from roundRect, which draws the label. Camera refused: a message, and the demo carries on.
The code
HTML structure to paste into your page (the CSS + JS come with your purchase):
<div class="fx-0850-root">
<div class="pfg-scene" data-pfg-lang="en" role="region" aria-label="Figurine on your palm — a 3D collectible stands in your hand. Cursor demo, camera on request (processed on your device only)">
<video class="pfg-video" playsinline muted autoplay aria-hidden="true" tabindex="-1"></video>
<canvas class="pfg-canvas" aria-hidden="true"></canvas>
<div class="pfg-bar">
<button class="pfg-btn pfg-cam-btn" type="button" aria-pressed="false">
<span class="pfg-btn-ico" aria-hidden="true"></span><span class="pfg-btn-txt">Turn camera on</span>
</button>
<button class="pfg-btn pfg-next-btn" type="button">
<span class="pfg-btn-txt"><span class="pfg-long">Next figurine</span><span class="pfg-short">Next</span></span><span class="pfg-btn-arrow" aria-hidden="true">›</span>
</button>
<p class="pfg-privacy">No image ever leaves your device.</p>
</div>
<p class="pfg-status" role="status" aria-live="polite"></p>
<canvas class="pfg-gl" aria-hidden="true"></canvas>
<div class="pfg-label" aria-hidden="true">
<span>Figurine on your palm</span>
<span class="pfg-hint">move the cursor · click: next figurine · or turn the camera on</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 |
|---|---|---|
Your own models (JS — FIG_MODELS, FIG_NAMES) |
robot, astronaut, golem | Each entry is a GLB file encoded in base64, with the name of its idle animation (idle) and of its greeting (hello). Replace one or extend the list: the counter on the label adapts. |
Figurine height (JS — FIG_H) |
1.55 × the palm | Ratio between the figurine and the length of the palm. In demo, since the drawn hands are small, it is enlarged a further 1.5 to 1.7 times. |
Automatic change in demo (JS — AUTO_MS) |
5,500 ms | Interval between two figurines while the camera is off. A very large value amounts to switching it off; it never runs under reduced motion or on camera. |
Delay between two fists (JS — COOL_MS) |
900 ms | Minimum time between two fist-triggered changes. Clicks and the button are not limited. |
Display case (JS — CASE) |
0.92 wide, 1.15 high | Size of the wireframe, for a figurine of height 1. Widen it if your model holds its arms out. |
Three.js version (JS — THREE_VERSION) |
0.186.0 | Version fetched from the CDN. To host it yourself, change the three addresses that follow; the glTF loader must import the same copy of Three.js. |
Shop variant (HTML — .pfg-shop, data-pfg-start) |
to add to the HTML | The shipped CSS already includes it: name, price and two buttons laid over the left of the scene; the main button starts the camera. |
FAQ
FIG_MODELS, giving the names of its animations; add its name to FIG_NAMES. The code brings it to the right height and centres it on the base by itself. Keep the files light: the three provided models are 35 to 109 KB, compressed with meshopt.script-src, the display case stays empty. The hand detector, for its part, is only downloaded on a click on the camera button.