pixi-effects

00  ·  Open source · MIT · built on PixiJS v8

Video, written as data.

A video is a tree of plain objects. Tell an AI one sentence and it writes one: it plays in the browser and exports MP4.

Tell any AI one sentence ↓

Or give your agent the skill: npx skills add yjmtmtk/pixi-effects

Poster of the reel: the word pixi-effects with a red diamond and the line “a video is a file of data.”, above two lines of the data that draws them

The reel

Everything it does, in 81 seconds

Twelve chapters, one HTML page of data, music written as text.

1920×108081 sno files, no assetsopen the page with controls

Poster of the film “Ink and paper”: the word pixi-effects in heavy serif type over a red hatched circle, with a hand-written note above it.

A film · paper and ink

A film an AI wrote, in one page

Hand-drawn data, a three.js knot, a paper diorama lit by one spot, and sound written as text.

1920×108045 sRough.js · D3 · three.jsopen the page with controls

Poster of the film “Light as a material”: 2,880 thin rods in a wave, lit blue in the dark, above the word MATERIAL in thin capitals.

A film · light as a material

The same idea, at night

A spot light with cast shadows, 2,880 rods, a camera flight with focus pulls.

1920×108045 sthree.js · D3 · Rough.jsopen the page with controls

The complete minimal composition, as JavaScript. The play button on the right runs this very text in your browser:

import { Movie } from 'pixi-effects';
const movie = new Movie();
await movie.init({
  canvas, width: 1280, height: 720, duration: 6, frameRate: 30,
  background: '#0a0a0f',
  composition: { sequences: [
    { type: 'text', text: 'Hello', at: 0.5,
      style: { fontSize: 120, fontWeight: 'bold', fill: '#fff' },
      initial: { x: 'GW/2', y: 'GH/2', anchorX: 0.5, anchorY: 0.5 },
      keyframes: [{ at: 0, from: { alpha: 0, y: 'GH/2 + 40' },
                    to: { alpha: 1, y: 'GH/2' },
                    duration: 0.6, ease: 'power2.out' }] },
    { type: 'audio', sfx: 'chime', at: 1.1 },
  ] },
});
movie.play();
// or: const mp4 = await movie.render({ format: 'mp4' })
The real frame at 1.2 seconds of the composition on the left: the word Hello in white bold type, centred on near-black

This exact data, running live in your browser

Press play: nothing is pre-rendered; this text runs as written.

1280×7206 s30 fpssfx chime · no audio file

same frame path for play · scrub · export a real, bigger piece, live ↓
01

One sentence

Tell any AI this. It reads the repository and checks what it makes.

the sentencetap an ending to swap it, then copy

Use https://github.com/yjmtmtk/pixi-effects to make a video: a 10-second title for a bakery, warm cream colours, a soft chime at the end

Endings
04

Start

Tell an AI: For AI GitHub npm

v0.44.0 · experimental · pre-1.0 · MIT

Open in the gallery