
ittybitty
Orb
The glowing, breathing sphere of voice and AI interfaces.
This browser cannot run WebGL2, so this is a still image. The code below works wherever WebGL2 is available.
Code
The usage always matches the preview, layers and performance settings included. No build step or package.
Copy embed gives one block to paste into any page or site builder, no setup. For your own code: add orb.js, ittybitty-shader.js, runtime.js, pointer.js next to this page. Highlighted values follow the controls.
<!-- Quickest: one element. Size it with CSS; it fills its box. -->
<script type="module" src="./ittybitty-shader.js"></script>
<ittybitty-shader effect="orb" style="width: 320px; height: 320px;"></ittybitty-shader>
<!-- Or with JavaScript, for full control: -->
<canvas id="orb" aria-hidden="true" style="width: 320px; height: 320px; display: block"></canvas>
<script type="module">
import { orb } from './orb.js';
const canvas = document.getElementById('orb');
const effect = orb(canvas, {
showOrb: true,
showHalo: true,
speed: 0.6,
size: 0.32,
energy: 1,
turbulence: 0.6,
rim: 0.6,
glow: 0.5,
level: 0,
style: 'sphere',
interactive: true,
responsiveness: 0.5,
palette: [[0, '#3b2bff'], [0.45, '#b04bff'], [0.75, '#ff6fb1'], [1, '#ffd0a8']],
// Performance
dpr: 1.5,
adaptive: true,
});
// Later: effect.set(…), effect.pause(), effect.resume(), effect.destroy()
</script>
Details
Currents of colour turn inside a sphere with a bright rim and a soft halo. It is transparent around the orb, so it sits on any background. Feed it an audio level with effect.set({ level }) every frame and it swells and churns as someone speaks.
- Payload
- 6.2 KB brotli for orb.js and ittybitty-shader.js and runtime.js and pointer.js, measured at build time. See the method.
- Resolution
- Device pixel ratio capped at 1.5.
- Frame rate
- Display rate.
- When unseen
- Stops rendering when the canvas leaves the viewport or the tab is hidden, and resumes where it left off.
- Reduced motion
- Shows a single still frame. Level still changes it.
- Layers
- Up to five effects fuse into one shader and one draw call. Filters such as dithering and halftone process the layers beneath them.
- Browsers
- Any browser with WebGL2: Chrome and Edge 56+, Firefox 51+, Safari 15+.
- Licence
- MIT. Copy it, change it, ship it.