DEVELOPER EDITION / 0.1.0-alpha.1

Ordinary text.
Extraordinary behavior.

Keep your markup. Choose your effects. Give a heading a different kind of presence.

Zero runtime dependenciesSelective ES module importsTypeScript declarations includedAccessible source text preserved

01 / TRY THE API

From preview to your project.

Change the effect. The code follows. Runnable minimal example · Stack example

Make type move.

MOVE TO INTERACT

YOUR IMPLEMENTATION JavaScript

Attach after the heading mounts. Call destroy() when it unmounts.

02 / BRING IT WITH YOU

Small by choice.

Import a family or a single GPU effect. Your application only needs the effects it uses. This preview loads every family so you can explore them.

Local alpha · not yet published to npm.

FROM THE REPOSITORY
cd packages/materia
npm install
npm pack

# In your application:
npm install /path/to/materia-text-0.1.0-alpha.1.tgz

No stylesheet or font dependency. Supply your own typography and a positioned host with room for the effect.

ORDERED COMPOSITION

Build a layer stack.

Apply up to six optics, geometry, or signal effects in order. Each layer processes the result before it. Adjust a layer without rebuilding; remount a reordered stack when changing its structure.

Try the layer editor
import { stack } from '@materia/text/stack';
import { vortex } from '@materia/text/geometry/vortex';
import { pixelate } from '@materia/text/signal/pixelate';
import { rgbSplit } from '@materia/text/signal/rgbSplit';

const fx = createTextEffect(heading, {
  effect: stack([
    { effect: vortex, strength: 0.7, scale: 12 },
    { effect: pixelate, strength: 0.6, scale: 8 },
    { effect: rgbSplit, strength: 0.5, scale: 14 },
  ]),
  auto: true,
});
fx.setLayer(1, { strength: 0.8 });

One canvas. Two reusable textures. Zero runtime dependencies. Water, smoke, glyphs, and physics stay standalone.

03 / THE ESSENTIALS

A small, explicit API.

createTextEffect(element, options)

Configure the effect

effect
Required. An imported effect definition.
strength / scale
Intensity from 0–1; detail scale from 1–24.
signal
Optional treatment layered on a GPU effect. Canvas families run independently.
signalStrength / signalScale
Adjust the signal separately from the base effect.
auto / frozen
Automatic flow and explicit freeze are separate; disabling auto still allows pointer/pulse motion.
host / color
Canvas bounds default to the parent. GPU color accepts CSS colors or RGB values from 0–1, resolved at mount.
consumed / waterline
Elemental consumption; waterfall pool height from 0.4–0.9.

Control its lifecycle

pulse()
Trigger a disturbance.
setStrength(value) / setScale(value)
Tune the effect without remounting.
setAuto(bool) / setFrozen(bool)
Control automatic flow and explicit freeze separately; static refresh may still draw.
setSignal(strength, scale?)
Adjust an attached signal.
setLayer(index, changes)
Update strength, scale, or enabled state in a stack.
setLetterSpacing(value)
Update source spacing and refresh; restore it at cleanup.
setWaterline(value) / setConsumptionProgress(value)
Elemental controls; pool setter clamps 0.4–0.95. Initial pool option remains 0.4–0.9.
setConsumed(bool)
Switch elemental consumption.
refresh() / supported
Refresh geometry; inspect initial renderer availability. Later GPU loss restores native text without changing supported.
destroy()
Release resources and restore original styles. Safe to call again.

Browser mounted. Imports are SSR-safe. Create effects on connected, plain-text elements in the browser.

Native fallback. Source text stays accessible. Reduced motion settles decorative motion; unavailable renderers keep native text. After GPU loss, destroy/remount to retry.