Yes: spryte, a new 2D renderer for the web with MIT license, drew sprites between 2 and 3.9 times faster than PixiJS in eight scenes from 2dbench on our MacBook, and its bootstrap JavaScript weighs 10.8 kB versus 90 kB. But it doesn’t win at everything: in scenes with lots of text it lost by a lot, and here we show you exactly where.
yoDEV Tested · October 20, 2026 We installed spryte 0.2.1, measured its bundle against PixiJS 8.22.0, passed 2dbench parity verification in headless Chromium, and ran the complete 2dbench suite on a MacBook with Apple M5 Pro in Chrome 155. The results we report as ours come from that test.
What is spryte?
spryte is an immediate mode 2D renderer for the browser. Each frame you tell it what to draw and it groups everything over WebGL2 with instancing. It can draw:
- sprites and batch sprites
- rectangles, circles, and lines
- text, clipping, and blend modes
- render targets and custom shaders
It has no dependencies, no scene graph, and no game framework behind it. It’s the renderer of debuff, its author’s game project, where games already run. It’s published on npm under the debuffjp account.
At the time of publishing this note (October 20, 2026), spryte is very new:
- The first version reached npm on October 19, 2026, and 0.2.1 came out a day later.
- The README marks it as alpha, and its API may change before 1.0.
What is WebGL and what happens if the browser doesn’t have it?
WebGL is the browser API that gives access to the GPU from JavaScript, and WebGL2 is its current version. spryte uses it to draw thousands of sprites in a few GPU calls.
If the browser doesn’t have WebGL2, spryte automatically falls back to Canvas 2D, the classic drawing API for canvas in JavaScript. That fallback comes in a separate chunk that browsers with WebGL2 never download.
We verified this in version 0.2.1:
- With
backend: "auto"it chosewebgl2. - With
backend: "2d"it drew correctly over Canvas 2D.
How does it differ from PixiJS?
PixiJS works in retained mode: you create a Sprite once, add it to the stage, and change its properties over time, and the stage remembers what to draw. spryte doesn’t keep anything between frames. Each frame you call draw.sprite(...) for everything visible, and your game state is the single source of truth.
That difference is where the speed comes from. A PixiJS Sprite is an object that the library updates, measures, and groups each frame. spryte, on the other hand, writes a few numbers per sprite in a typed array and lets the GPU do the rest.
That’s also where the cost comes from. Everything the scene graph did for you becomes your code:
- hit-testing and pointer events
- nested transformations
- text line layout
Here’s what a minimal loop with spryte looks like, taken from the official guide:
import { createRenderer } from "spryte";
const draw = createRenderer(canvas, { smooth: false }); // smooth: false for pixel art
canvas.width = 640;
canvas.height = 360;
draw.resize(canvas.width, canvas.height);
function frame() {
draw.begin("#111", 320, 180, 2); // clear colour, logical size, backing pixels per logical unit
draw.rect(10, 10, 40, 20, "#cffb2d");
draw.sprite(image, 160, 90, { rotation: 0.3, tint: "#f0f" });
draw.text("hello", 8, 8);
draw.end();
requestAnimationFrame(frame);
}
requestAnimationFrame(frame);
To install it:
npm install spryte
We verified it adds exactly one package to your project.
Is spryte faster than PixiJS?
On our hardware, yes: between 2 and 3.9 times in the general sprite path. We ran the complete 2dbench suite on October 20, 2026 with this setup:
| Configuration | Value |
|---|---|
| Machine | MacBook with Apple M5 Pro |
| Browser | Chrome 155 on macOS, plugged in |
| Rounds | 3 |
2dbench fixed spryte 0.1.0 and PixiJS 8.22.0, so those are the versions measured.
Before measuring anything, each renderer had to pass a pixel parity check, which confirms that all libraries drew the same frame. The figures are the median time per frame in milliseconds, so less is better.
One call per sprite: draw.sprite versus PixiJS Sprite
| Scene | spryte, max at 60 fps | PixiJS, max at 60 fps | spryte with 50k | PixiJS with 50k | spryte advantage |
|---|---|---|---|---|---|
| bunny | 400,000 | 100,000 | 2.1 ms | 6.2 ms | 3.0× |
| mixed | 200,000 | 50,000 | 3.6 ms | 9.9 ms | 2.8× |
| particles | 200,000 | 50,000 | 3.4 ms | 9.7 ms | 2.9× |
| tilemap | 200,000 | 50,000 | 2.6 ms | 10.2 ms | 3.9× |
| clip | 400,000 | 50,000 | 2.4 ms | 7.5 ms | 3.1× |
| lowres | 200,000 | 100,000 | 2.7 ms | 6.1 ms | 2.3× |
| upload | 200,000 | 100,000 | 3.4 ms | 6.7 ms | 2.0× |
| raycaster (with 10k enemies) | 20,000 | 10,000 | 5.5 ms | 14.4 ms | 2.6× |
This is the comparison that matters most in practice: you draw each object yourself, with one call per object. The author’s figure of 2 to 4 times is reproduced on Apple Silicon, a platform his published results didn’t yet cover.
We sent our run to the public 2dbench dataset as issue #22. At the time of publishing this note, it was still awaiting the maintainer’s review.
In batch: draw.sprites versus PixiJS ParticleContainer
| Scene | spryte, max at 60 fps | PixiJS, max at 60 fps | spryte with 200k | PixiJS with 200k | spryte advantage |
|---|---|---|---|---|---|
| bunny | 800,000 | 800,000 | 2.0 ms | 3.6 ms | 1.8× |
| particles | 400,000 | 200,000 | 4.6 ms | 11.3 ms | 2.5× |
| lowres | 800,000 | 800,000 | 2.3 ms | 4.1 ms | 1.8× |
| upload | 800,000 | 800,000 | 2.9 ms | 4.7 ms | 1.6× |
In the batch path the difference is smaller. In three scenes, both libraries sustained 800,000 sprites at 60 fps. That’s the “800k sprites” figure from spryte’s chart, and on our Mac it’s a tie at that count, not a win.
Still, spryte draws each frame faster, and that leaves you more margin for your game logic.
Where does spryte lose against PixiJS?
In scenes with lots of text. With 1,000 labels that change every few frames, spryte’s draw.text took 270 ms per frame. PixiJS’s Text took 39.5 ms in the same scene, and PixiJS’s BitmapText sustained 5,000 labels at 60 fps.
An important caveat: the 2dbench adapter uses draw.text and not the BitmapFont that spryte also offers, so it’s not the most favorable setup for spryte. Still, if your project is a HUD full of numbers that change, test it before committing.
In the churn scene there’s no spryte result. In churn, sprites are created and destroyed all the time, like bullets and collectibles in a game. spryte didn’t pass 2dbench’s parity check there: with 2,000 sprites it covered 99.3 percent of the expected area, and the threshold requires 99.5. A renderer that doesn’t pass that check is never measured. It’s a missing measurement, not a slow result, so we can’t yet tell you how spryte behaves with churn.
In scenes no one has measured yet. The author’s benchmark notes, as of October 20, 2026, list several scenes as unmeasured:
- memory growth
- load time
- time to first frame
How does it weigh against PixiJS?
About eight times less on startup. We built the same single-sprite app with each library, with a Vite 8 production build compressed with brotli at maximum quality. The PixiJS app used Application, Assets, and Sprite.
| Bootstrap JS | All JS, with deferred chunks | |
|---|---|---|
| spryte 0.2.1 | 10.8 kB | 12.3 kB |
| PixiJS 8.22.0 | 90.0 kB | 155.6 kB |
That’s 8.3 times less on startup. The author reports 8.7 times for version 0.1.1, so “one ninth the size” holds up within the difference between versions.
The deferred part of spryte is the Canvas 2D fallback.
How to run 2dbench on your own machine?
The fastest way is to open 2dbench: run on this device, type your device in the note field, and hit Run. It takes a few minutes, and the page asks you to keep the screen on, the tab in focus, and the machine plugged in if you can.
Uncheck “Quick run” to do three rounds instead of one, which is more reliable. When done you see your charts locally: nothing is sent until you hit Submit.
From a desktop machine with Chrome or Edge installed:
git clone https://github.com/debuffjp/2dbench
cd 2dbench
npm install
node run.mjs # bunny, every adapter, 5 rounds
node run.mjs particles
node run.mjs mixed spryte pixi-sprite rounds=7
node run.mjs bunny rounds=0 # parity gate only (fast)
Each run writes a JSON to results/ and prints a markdown table.
On Linux, headless Chrome falls back to software rendering, so run with a visible window: HEADED=1 node run.mjs particles.
In our test environment, which has no GPU, we used rounds=0, which only runs the parity check. It passed on bunny, particles, mixed, and raycaster:
- Within the sprites there wasn’t a single different pixel versus PixiJS.
- On the edges, rotated scenes differed by 8 to 13 percent. That matches the rounded corners on rotated geometry that the author documents.
The benchmark was created by spryte’s own author, and the README declares it up front. The parity reference is PixiJS’s Sprite, not spryte, and the maintainers of each library are invited to review their adapter. That conflict of interest is exactly why you should run it yourself instead of trusting anyone’s chart, including ours.
How to migrate from PixiJS to spryte?
Start by moving only your heaviest effect. The official migration guide suggests drawing particles or bullets with spryte on a transparent canvas on top of PixiJS’s and comparing frame times. The transparent option requires spryte 0.2 or later.
const overlay = document.createElement("canvas");
overlay.width = app.canvas.width;
overlay.height = app.canvas.height;
overlay.style.cssText = "position:absolute;inset:0;pointer-events:none;width:100%;height:100%";
app.canvas.parentElement!.append(overlay);
const draw = createRenderer(overlay, { smooth: false, transparent: true });
draw.resize(overlay.width, overlay.height);
app.ticker.add(() => {
// transparent clear: PixiJS shows through
draw.begin("#0000", 320, 180, overlay.width / 320);
draw.sprites(bullet, bulletPositions, bulletCount);
draw.end();
});
The guide presents it as a way to evaluate, not as an architecture to stay with. Two renderers mean:
- two GPU contexts
- duplicate textures
- an overlay layer that always stays on top
Once the numbers convince you, a full migration follows the guide’s equivalence table. The main ones:
| PixiJS 8 | spryte |
|---|---|
new Application(), app.init(...) |
createRenderer(canvas, { smooth }) + draw.resize(w, h) |
app.ticker.add(fn) |
your own loop with requestAnimationFrame |
new Sprite(texture) + properties |
draw.sprite(image, x, y, { rotation, scaleX, scaleY, alpha, tint }) |
ParticleContainer |
draw.sprites(frame, positions, count, options, { scale, rotation, color }) |
Container transformations |
draw.push(), translate, rotate, scale, draw.pop() |
zIndex |
sort your data and draw in that order |
on("pointerdown") |
your own hit-testing on your game state |
Particles are where you gain the most. If you store their state in typed arrays, an entire ParticleContainer becomes a single call:
const MAX = 50_000;
const pos = new Float32Array(MAX * 2); // x, y pairs your simulation updates
const scale = new Float32Array(MAX);
const rotation = new Float32Array(MAX);
const color = new Uint32Array(MAX); // 0xRRGGBBAA
let live = 0;
// each frame, after updating the arrays:
draw.sprites(spark, pos, live, {}, { scale, rotation, color });
If your project relies heavily on deep scene trees, the guide itself recommends keeping those parts in PixiJS.
Is spryte good for making games in JavaScript?
Yes, that’s what it was made for, and it also works for anything that moves many 2D objects in the browser:
- games like bullet hells, particle effects, and tilemaps
- visualizations with thousands of live points
- generative art
- UI effects like confetti or animated backgrounds
The real question is whether it’s worth putting it in production today. If your bottleneck is drawing many moving sprites, it’s worth an afternoon of tests, but pin the exact version. As of October 20, 2026 it’s two days old, is pre-1.0, and marked as alpha, with six releases in its first two days.
Its handling of WebGL context loss worked in our test, but at the time of publishing this note the author hadn’t yet measured it in Safari on macOS.
If your app is mostly text, deep interface trees, or pointer interaction, PixiJS still does more for you. And if you’re looking for a full game engine like Phaser, keep in mind that 2dbench doesn’t include it yet: it’s on the list of libraries the project wants to add.
Is spryte free?
Yes. spryte and 2dbench are MIT licensed, and 2dbench results data is published under CC0.
You? What moves the most objects per frame in your project: particles, tiles, text, or something else?
- Yes, starting with my heaviest effect
- Yes, but when it reaches 1.0
- No, PixiJS is enough for me
- I prefer another option (tell us which)
Comment below or, if this article reached you by email, reply directly to the email: your reply gets published here.
Related: How to make an accessible bottom sheet on the web with CSS scroll snap: we tested and measured it