Skip to content
pixi-silk
GitHub repository
Version 1.0.1 for PixiJS v8

Anti-aliased graphics for PixiJS v8, smooth as silk.

pixi-silk draws PixiJS shapes as exact distance fields, so every edge is anti-aliased per pixel at any zoom. You use it like Graphics, with gradients, glows, text and UI widgets on top.

Get startedSee the examples
API

One object draws the scene.

Reads like Graphics.
Add shapes to the path, then fill or stroke them. Calls chain.
Edges from distance.
Coverage comes from the exact distance to the shape, per pixel.
Paint on any shape.
Gradients in OKLab, blur, glows and inner shadows on fills and strokes.
UI on top.
Text, layout, widgets and editor tools ship as separate entry points.
Draw your first scene
first-scene.ts
import { createSilkApp, SilkGraphics, conic } from 'pixi-silk';

const stage = document.getElementById('stage')!;
const { app } = await createSilkApp({ parent: stage });
const gauge = conic([0x30d158, 0xffd60a, 0xff453a]);
const g = new SilkGraphics();

// a squircle card, and a ring whose gradient follows the arc
g.roundRect(10, 10, 340, 140, 22, 0.6).fill(0x1c1c1e);
g.arcSweep(80, 80, 44, -Math.PI / 2, Math.PI * 1.5)
    .stroke({ width: 12, cap: 'round', gradient: gauge });

app.stage.addChild(g);