
Security News
Ruby's Bundler 4.0.18 Extends Cooldown to bundle lock and bundle cache
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.
@carverjs/core
Advanced tools
A batteries-included web game engine — React + Three.js components, hooks, ECS-lite systems, tweening, particles, and audio.
The CarverJS game engine — build declarative 2D and 3D games as composable React components, on top of Three.js and React Three Fiber.
Beta: CarverJS is under active development. APIs may change between minor versions until 1.0.
npm install @carverjs/core
# peer dependencies (most React + Three projects already have these)
npm install react react-dom three @react-three/fiber @react-three/drei zustand
# optional — rigid-body physics (usePhysics, powered by Rapier)
npm install @react-three/rapier
A complete 2D game — a circle you move with WASD:
import { useRef } from "react";
import { Game, World, Actor } from "@carverjs/core/components";
import { useGameLoop, useInput } from "@carverjs/core/hooks";
function Player() {
const ref = useRef(null);
const { getAxis } = useInput();
useGameLoop((dt) => {
if (!ref.current) return;
ref.current.position.x += getAxis("KeyA", "KeyD") * 5 * dt;
ref.current.position.y += getAxis("KeyS", "KeyW") * 5 * dt;
});
return (
<Actor ref={ref} type="primitive" shape="circle" color="royalblue"
geometryArgs={[0.5, 24]} />
);
}
export default function App() {
return (
<Game mode="2d">
<World>
<Player />
</World>
</Game>
);
}
Switch to 3D by changing a single prop: <Game mode="3d">.
@carverjs/core ships as focused subpath exports, so you import only what you use:
| Import | Contents |
|---|---|
@carverjs/core/components | <Game>, <World>, <Actor>, <Camera>, <Scene>, <SceneManager>, <AssetLoader>, <LoadingScreen>, <ParticleEmitter>, <AudioListener> |
@carverjs/core/hooks | game loop, input, collision, physics, camera, animation, audio, assets, particles, tweening |
@carverjs/core/systems | engine systems — actor registry, asset / audio / collision managers, easing |
@carverjs/core/store | Zustand stores (gameStore, sceneStore) |
@carverjs/core/types | shared TypeScript types |
| Component | Purpose |
|---|---|
<Game> | Root canvas. Set mode to 2d or 3d; configure lighting, sky, DPR, and shadows. |
<World> | Scene-graph container for your actors. |
<Actor> | A game object — primitive, sprite, or model. Forwards a ref to its Object3D. |
<Camera> | Perspective or orthographic camera with optional follow controls. |
<Scene> / <SceneManager> | Multi-scene apps and transitions. |
<AssetLoader> / <LoadingScreen> | Preload models, textures, and audio behind a loading screen. |
<ParticleEmitter> | Particle effects. |
<AudioListener> | Spatial audio listener. |
| Hook | Purpose |
|---|---|
useGameLoop(cb) | Fixed / variable-step update loop with delta time. |
useInput() | Keyboard and pointer state, axes, and action maps. |
useCollision() / useGridCollision() | AABB / sphere / circle and grid collision. |
usePhysics() | Rigid-body physics (requires the optional @react-three/rapier peer). |
useCamera() / useCameraDirection() | Camera control and facing. |
useAnimation() | Skeletal and clip animation playback. |
useAudio() | Sound effects and music with channels and audio sprites. |
useAssets() / useAssetProgress() | Access loaded assets and load progress. |
useParticles() | Imperative particle bursts. |
useTween() | Value tweening with easing. |
useScene() | Scene navigation. |
useActorRegistry() | Look up live actors by id. |
Make any CarverJS game networked with @carverjs/multiplayer — serverless peer-to-peer over WebRTC, with no game server to run.
MIT — MoneyTales EduTech Private Limited
FAQs
A batteries-included web game engine — React + Three.js components, hooks, ECS-lite systems, tweening, particles, and audio.
The npm package @carverjs/core receives a total of 7 weekly downloads. As such, @carverjs/core popularity was classified as not popular.
We found that @carverjs/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.