FieldX Waves - Procedural 3D Wave Patterns as a Drop-In Library

Frontend · Generative · Three.js · React · TypeScript · npm · Open Source · Designer Tool-Building · Webflow
INTRODUCTION
A designer I work with, Stuthi Vasudevan, needed a custom wave / dot-field animation for the FieldX site we were building together. The available options were all bad: copy-paste a CodePen and pray it doesn't break, hand-roll something in shader code (designers don't), screen-record After Effects and ship a 30 MB MP4 (kills page load and you can't tweak it).

I wrote a one-off for that section, then realised what would actually be useful: let the designer make their own waves whenever they want, without me in the loop. That meant turning the one-off into a tool: a visual editor where she could design the animation herself, click Export, get a config + a one-line CDN snippet, paste it into Webflow, done. Once it was a tool for her, it was already a tool for everyone, so I cleaned it up, generalised it, published it to npm, and open-sourced it.

This is a tool-building project: about removing friction from a workflow and giving designers agency over a thing they previously had to ask a developer for, not a "look at my pretty animation."
MY ROLE
Solo developer (with Stuthi Vasudevan as the first user / design partner). Wave algorithm design, Three.js render pipeline, the visual editor (React + shadcn/ui), the standalone library build (single-file UMD bundle that includes Three.js so designers don't deal with bundlers), npm publishing, demo site, documentation, and the production integration on fieldx.ai.
timeline
2026 (early, built and published February 2026).
situation

Designers commonly need procedural wave / field / dot-grid animations on hero sections, scroll backgrounds, or as ambient texture. The shipping options today are all the wrong shape:

  • CodePens / GitHub gists: fragile copy-paste, no parameter exposure, breaks when bundled, breaks on Webflow's strict embed sandbox
  • Shader code: too low-level for designers, too custom for devs to want to maintain
  • After Effects MP4: 10–30 MB per second, can't change colour without re-rendering, locks you out of mobile

The right shape is a library: install or include via CDN, configure with a JSON object, runs in the browser at 60fps. So that's what I built.

‍

task
  • A reusable, framework-agnostic 3D wave / field animation
  • Installable via npm OR a single-line CDN script (Webflow Embed-block-friendly, no bundler needed)
  • A visual editor for the no-code crowd: pick a base pattern, layer wave functions, tweak colours and opacity, see it live, click Export, copy a config + paste it on the site
  • Performance-aware: quality presets (low / medium / high) so the same config can degrade gracefully on mobile
  • Documentation that lets a frontend developer drop it in within 5 minutes
action

Wave algorithm design. Each visible "wave field" is composed of one or more layers. A layer has:

  • a base type (horizontal, vertical, grid, radial, circular, field) defining the spatial arrangement of dots
  • layer params (line count, points per line, spacing, dot size, colour, opacity, x/y/z offset, rotation)
  • one or more wave functions that displace the dots: each with a type (sine, cosine, sawtooth, square, triangle, noise), an axis (x, y, z, xy, radial), and frequency / amplitude / phase / speed knobs

Wave functions on a layer compose additively (multiple sines along different axes for complex motion), and layers stack so a final field can have e.g. a slow base ripple + a fast horizontal ribbon + a noise-distorted overlay all in the same scene.

‍

Rendering. Three.js + a custom point-cloud renderer. Each dot is a single point primitive with a sprite shader, batched into a single draw call per layer for performance. Camera is a parallax-light ortho/perspective hybrid so the field reads as 3D without making designers think about cameras. A starfield background layer is included with its own colour/size/opacity controls because hero sections always seem to want one.

‍

Quality presets. Three knobs (low, medium, high) that scale point counts and pixel ratio. The library exposes setQuality() so the host page can detect mobile and downshift on the fly:

const isMobile = window.innerWidth < 768;
config.quality = isMobile ? 'low' : 'medium';

This is the part designers don't think about and developers always need.

‍

Visual editor. React 19 + Vite + Tailwind + shadcn/ui (Radix-based components: accordions, sliders, popovers, colour pickers, tabs, the lot). Real-time preview via React Three Fiber. Six built-in presets for cold-start. A complete Export / Import flow: design in the editor, click Export, get a JSON config + the CDN embed snippet pre-filled, paste anywhere.

‍

Library build. The single deliverable that matters is dist-lib/fieldx-waves.min.js: a UMD bundle that includes Three.js itself, ~500 KB, served from jsDelivr / unpkg. Designers paste two lines into a Webflow Embed block and it works:

<div id="wave-bg" style="width:100%;height:100vh;"></div>
<script src="https://cdn.jsdelivr.net/npm/fieldx-waves@1.0.2/dist-lib/fieldx-waves.min.js"></script>
<script>
 const waves = FieldXWaves.FieldXWaves.create('#wave-bg', {
/* config */ });
</script>

A separate ESM build (fieldx-waves.esm.js) + TypeScript declarations target frontend devs who're already in a bundled React/Vue/Svelte project and want the slimmer install.

‍

API surface. Tiny on purpose: create(), play(), pause(), toggle(), setConfig(), setQuality(), getConfig(), destroy(). Every config field is documented in the README with default values and a description. The library auto-resizes to its container and cleans up GPU resources on destroy().

‍

Webflow integration guide. A specific section in the README walks through the four-step Webflow recipe (Div Block → ID → dimensions → Embed block with CDN) because that's the deployment path for ~80% of users.

  • Published on npm: fieldx-waves@1.0.2
  • Live demo + visual editor: fieldx-waves.netlify.app
  • Open-source on GitHub: MIT license, public
  • CDN-served via jsDelivr and unpkg: single 500 KB script, Three.js bundled, no bundler required
  • Designer-first ergonomics: six presets, visual editor, copy-paste embed code, Webflow-specific docs
  • Used in production: the FieldX website itself (fieldx.ai) ships with FieldX Waves running a designer-authored config. The designer (Stuthi) built the animation herself in the editor: exactly the workflow the tool was built to enable.

‍