CarverJS
A React engine for 2D and 3D games on the web: Three.js underneath, components and hooks on top, peer-to-peer multiplayer built in.
- Role
- Author and maintainer
- When
- Since April 2026
- Status
- Open source, MIT, v1.0
Games made React developers start over
Web game engines ask React developers to drop the component model they already know, and multiplayer usually means renting and running a game server. CarverJS keeps the game inside React and the multiplayer between the players.
The product
- Declarative scenes
- Game, World and Actor components, with 18 hooks for input, physics, audio and particles.
- GPU particles
- Instanced particles with custom GLSL shaders, plus spatial audio, collision and optional Rapier physics.
- No game server
- Peer-to-peer WebRTC with host election and migration, and client prediction with rollback.
- Ship to a URL
- The CarverJS Marketplace, where creators publish browser games anyone can play at once.
import { Game, World, Actor } from "@carverjs/core/components";
export default function Demo() {
return (
<Game mode="2d">
<World>
<Actor type="primitive" shape="box" />
</World>
</Game>
);
}
The stack
- Engine
- TypeScript, React 19, Three.js, React Three Fiber, GLSL
- Physics and audio
- Rapier, Web Audio
- Multiplayer
- WebRTC data channels, msgpack, WebSocket signaling
- Marketplace
- Next.js 16, Firebase, Cloudflare R2
- Tests
- Vitest
My part
- Created the engine and published it on npm as 3 packages over 15 releases.
- Wrote the netcode: delta-compressed snapshots, host migration, and rollback extended from a teammate’s 2D version to 3D.
- Built most of the Marketplace. Uploads pass a 10-check zip validator that caps zip bombs and blocks path traversal.
- Creators’ GitHub tokens are sealed with AES-256-GCM before they are stored.
- components
- 10
- hooks
- 18
- Vitest tests on the multiplayer layer
- 83