Gestures & WebcamPremium

Plasma Orb

A plasma orb charges in 2.2 s in each open hand, then bursts into a shock wave when the fist closes — on your webcam, or with a click and no camera.

WebcamMediaPipeHand trackingWebGL

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

Playable trailer for a wizard game — top of the pre-order page — Plasma Orb example 1

① Playable trailer for a wizard game — top of the pre-order page

WhenThe visitor lands on the page: two orbs charge and fire their wave around the heading. They move the mouse and an orb follows; they click and the wave goes. The button invites them to try with their own hand.
WhyCharging then letting go is already the game's gesture: the page lets people try the spell before asking for a pre-order, and the camera-free demo is enough for those who would rather not switch it on.
SettingsVariant from the purchased CSS: .pob-kiosk on the scene, .pob-scrim to darken the text side, content in .pob-kiosk-content (here pinned to the bottom), .pob-cta button with data-pob-start. The navigation bar belongs to the page.
Holding a hand open to start the game — start screen of a laser tag arena — Plasma Orb example 2

② Holding a hand open to start the game — start screen of a laser tag arena

WhenTwo teams in front of the screen: each keeps a hand open and watches its gauge rise with its orb. At 100% the text turns to “Ready! Close your fist”; the first closed fist sends the wave and the round begins.
WhyThe 2.2 s of charging act as a delay: nobody starts the game with an accidental gesture, and each team sees how far the other one is.
Settings274 × 238 px block, pointer-events: none on .pob-scene (a screen with no mouse: the demonstration runs alone). The page reads scene.pobBase.effect.orbs, sorted left to right, and shows their charge; a change in effect.lastRelease signals that a wave has just left.
Moving to the next slide with a closed fist — launch presentation of an e-bike battery — Plasma Orb example 3

③ Moving to the next slide with a closed fist — launch presentation of an e-bike battery

WhenThe speaker presents with an open hand: the orb charges next to the figures. They close their fist, the wave sweeps the screen and the next slide appears. In the capture, a click stands in for the fist.
WhyThe wave crosses the whole scene in a second: it works as a transition visible from the back of the room, with no remote in hand.
SettingsFull-screen scene, .pob-scrim behind the text. The page watches effect.lastRelease and moves on one slide, at most one every 2.5 s. In the demo the orbs also release by themselves at full charge, so the deck scrolls on; on camera, only the fist moves it forward.

How it works

Each hand gets its own orb, sitting just above the palm: a white core, a cloudy violet body, filaments running from the centre to the surface and three tilted rings circled by a bright head. Everything is computed by three WebGL shaders, straight on the scene's canvas; there is no image and no particle to manage.

The effect is built on a charge that grows over time. While the hand is open, the charge rises from 0 to 100% in 2.2 s: the radius goes from 0.38 to 0.9 times the palm length, and the filaments from 3 to 8. With a half-closed hand the charge holds. Fist held for 0.12 s with at least 30% charge: the orb empties at once and a spiral ring leaves its position, crosses the scene and fades within 1.15 s.

Two hands give two independent orbs, each with its own charge; releases are at least 0.4 s apart. The inside of the ring stays dark: the wave never covers the screen with uniform light.

Without a camera the scene plays the mechanic by itself: the orbs of the two ghost hands charge, then release 0.9 s after full charge; a click or a tap releases the nearest charged orb, and one of the hands follows the cursor. That is the mode the three examples show. On the webcam, switched on only by its button, nothing fires on its own: only the fist releases. Camera frames are analysed on the spot by MediaPipe and do not leave the device. Only a usage log from the library goes to Google, once a minute while detection runs: a few figures about the version and processing times, no image. Mention it in your privacy policy if you publish the camera mode.

Accessibility

  • Keyboard: Tab leads to the camera button, Enter or Space triggers it. Releasing by click is not available from the keyboard; in the demo it happens by itself at full charge anyway.
  • Reduced motion: shader time is frozen, the charge stays at 70%, no wave is emitted and clicks do nothing. The orb still follows the hand moved with the cursor. Two captures taken 0.8 s apart show no visible pixel difference.
  • Charge level: it is only conveyed by the orb's size and glow. If an action depends on it, show it as text, like the percentages in the second example.
  • Touch: a tap releases the orb nearest to the finger, a horizontal drag moves the hand, the page scrolls vertically. Recorded with touch emulation in Chromium.
  • Light: thin ring, no full-screen flash, at most 2.5 releases per second, orb breathing capped at 3%. These limits are in the code; we did not run an instrumented photosensitivity analysis.

Browser compatibility

WebGL 1 (fragment shaders, high precision when available), 47 KB of unminified JavaScript. Demo recorded with software rendering (Chromium 149, Firefox 151, WebKit 26.5): two scenes on a page, a click on the second releases nothing in the first, no request. Camera mode recorded in Chromium and Firefox with a fake camera; charge and fist were checked by injecting hand landmarks into the purchased code, and a real filmed hand (test video) was picked up. No camera measurement in Safari.

Chrome 88+✓ Full (measured)
Firefox 89+✓ Full (measured)
Safari 15+✓ Demo measured · camera not verified
Edge 88+✓ Not verified
iOS Safari 15+✓ Not verified
Android Chrome 88+✓ Not verified

WebGL unavailable or shaders rejected: 2D canvas rendering, a radial gradient for the orb, three ellipses for the rings, three circles for the wave, same charge mechanic. WebGL context lost: drawing stops, then resumes when it is restored. Camera impossible: an explanatory message, and the demo carries on. Permission is requested by the browser when the button is clicked (https page required). Scrolling the scene out of view, hiding the tab or starting another scene's camera turns it off.

The code

HTML structure to paste into your page (the CSS + JS come with your purchase):

index.html — structure
<div class="fx-0846-root">
  <div class="pob-scene" data-pob-lang="en" role="region" aria-label="Plasma Orb — an energy orb charges in your open hand and is released when you close your fist. Cursor demo, camera on request (processed on your device only)">
    <video class="pob-video" playsinline muted autoplay aria-hidden="true" tabindex="-1"></video>
    <canvas class="pob-canvas" aria-hidden="true"></canvas>
    <div class="pob-bar">
      <button class="pob-btn pob-cam-btn" type="button" aria-pressed="false">
        <span class="pob-btn-ico" aria-hidden="true"></span><span class="pob-btn-txt">Turn camera on</span>
      </button>
      <p class="pob-privacy">No image ever leaves your device.</p>
    </div>
    <p class="pob-status" role="status" aria-live="polite"></p>
    <div class="pob-label" aria-hidden="true">
      <span>Plasma Orb</span>
      <span class="pob-hint">move the cursor · click to release · 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 / propertyDefaultEffect
Charge time (JS — CHARGE_S) 2.2 s Time to go from 0 to 100% with an open hand. 1 s makes the effect snappy; 4 s turns it into a real delay, for instance before confirming an action.
Open-hand and fist thresholds (JS — OPEN_MIN, FIST_MAX) 1.45 and 1.25 Average distance from fingertips to wrist, divided by the palm length. Between the two thresholds the charge does not move: keep a gap, otherwise the orb hesitates.
Fist hold (JS — FIST_S) 0.12 s How long the fist must stay closed before the release. Raise it to 0.3 s if releases fire by mistake when the hand turns sideways.
Gap between two waves (JS — GAP_S) 0.4 s Applies to all hands. Do not go below 0.34 s: above three waves per second the effect leaves the limits it set for itself.
Wave lifetime (JS — WAVE_LIFE) 1.15 s Time the ring takes to fade. Within that delay it travels about 70% of the scene's long side.
Automatic release in the demo (JS — !f.live && o.fullT > 0.9) 0.9 s after full charge Remove this condition so that the demo, like the camera, only releases on click. Useful if an action on your page is tied to the wave.
Colours (JS — FS_ORB: cIn, cMid, cOut, cRing) light blue, violet, pink, cyan Four colours as 0-to-1 values, from core to surface, then the rings. The wave has its own in FS_WAVE (cA, cB).
Hero variant (HTML — .pob-kiosk, data-pob-start) to be added to the HTML A dark veil on the left carries the heading, text and button; that button starts the camera and the small camera button is then only used to stop it.

FAQ

Watch scene.pobBase.effect.lastRelease: this value changes on every wave emitted. effect.orbs lists the current orbs with their charge (0 to 1) and position. The effect dispatches no event: read these values every 80 to 100 ms, as the second and third examples do.
It is deliberate. Without a camera nobody closes a fist: the demo releases the orb 0.9 s after full charge to show the wave. With the camera on, the charge stays at 100% for as long as the hand is open; we held it for 2 s without any wave leaving, then the fist released it.
Each gets an orb and a charge: the detector tracks two hands at most, without knowing whose they are. A third hand is ignored. The two orbs can release at least 0.4 s apart.