scenoco-three

agent
Security Audit
Warn
Health Warn
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 5 GitHub stars
Code Pass
  • Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

A Unity-style three.js AI-native game dev framework for the web: TSX scenes, a live editor, and export to Unity.

README.md

SceNoCo

npm
License: MIT
Featured on Three.js Resources

Unity-style behaviours for three.js, with scenes written in TSX and no React.
A web game engine that a coding agent and a person can both read, test and edit — the same files,
the same running game.

Play the examples · API on one page · Agent skill · llms.txt

The editor over a running game: the scene's nodes, and the selected one as its TSX with live values

Why SceNoCo

  • Nothing new to learn. Scenes are three.js classes written as TSX; logic is Unity's
    Behaviour — awake, start, update, coroutines, instantiate, SceneManager, Input.
    No DSL, no registry, no reconciler: models write it from what they already know.
  • The whole engine fits in an agent's context. The rules card and every signature are ~25 KB of
    Markdown (about 6–7k tokens) — one read, no lookups.
  • tsc checks the scene. A misspelled attribute, a wrong value type or a ref of the wrong class
    is a type error at its line; scenoco check says the exact text to write instead.
  • Games are testable. simulate(Main) runs a scene in Vitest without a browser; in the browser,
    window.__scenoco holds the clock, steps exact frames, presses keys, clicks objects by class,
    reads state as data and outlines objects for screenshots — from Playwright or any agent's browser tool.
  • A visual editor that writes code. An Edit button over the running game: pause, step,
    select, drag, change any field — Save writes the change into the .tsx it came from, everything
    else byte for byte.
  • Ships clean. The editor and the agent bridge exist in development only; release builds
    contain neither.
  • Leaves a way into Unity. scenoco-unity writes the game into a Unity project — prefabs,
    scenes, meshes, materials, particles, UI, input actions — with C# stubs holding its TypeScript.

Quick start

npm create @scenoco-three my-game
cd my-game && npm install && npm run dev
// src/Spinner.ts — a behaviour: Unity's lifecycle, public fields are its settings
export class Spinner extends Behaviour<Mesh> {
  speed = 1;

  update(dt: number) {
    this.node.rotation.y += this.speed * dt;
  }
}
// src/scenes/Main.tsx — a scene: every tag is the three.js class you import
export const Main = () => (
  <Scene>
    <PerspectiveCamera position={[0, 2, 5]} rotation={[-0.4, 0, 0]} />
    <DirectionalLight position={[3, 8, 5]} intensity={2} />
    <Mesh>
      <BoxGeometry />
      <MeshStandardMaterial color="orange" />
      <Spinner speed={2} />
    </Mesh>
  </Scene>
);
// src/main.ts
play(Main);

The starter comes with an AGENTS.md rules card, so an agent working in the project reads how
SceNoCo works before it writes. For Claude Code, the workflow is a skill:

/plugin install scenoco-game --marketplace RomaRogov/scenoco-game

Examples

Game What it shows
Breakout three levels, Box2D, an HTML HUD, bloom, FM-synth music play
Tiny Bastion tower defence on a layered terrain: paths, towers, particles, sound, a menu and levels play
Spline Race one modelled road piece bent along a closed spline, lamps and trees placed along it, cars driving it play
Eggy Roll a Unity game ported: terrain generated at runtime, Rapier physics tuned against the original play
Homepage the project's own site — open it and press Source open

All of them were written by Claude and polished in the editor.

Packages

Package
@scenoco-three/core Behaviour, TSX scenes, play, SceneManager, Time, Input, coroutines, tweens, events, asset loading. API · Testing
@scenoco-three/rapier 3D physics on Rapier: Rigidbody, BoxCollider, onTriggerEnter.
@scenoco-three/box2d 2D physics on planck: Rigidbody2D, BoxCollider2D, onCollisionEnter2D.
@scenoco-three/particles Unity's ParticleSystem on three.quarks.
@scenoco-three/audio Unity's AudioSource on three.js's Web Audio.
@scenoco-three/postprocessing URP's Volume, Bloom and the rest on three.js's EffectComposer.
@scenoco-three/splines Unity's Splines: meshes bent along a curve, prefabs placed by it, objects driven on it.
@scenoco-three/terrain Unity's Terrain: ground from a heightmap, layers blended by weight.
@scenoco-three/unity scenoco-unity: the game written into a Unity project, and commands that drive it in Play mode.
@scenoco-three/tools scenoco check and the scenoco() Vite plugin.
@scenoco-three/create The starter for npm create @scenoco-three.

The engine itself — behaviours, scenes, the frame, the bridge, the editor — is
@scenoco/kernel, shared with every renderer;
@scenoco-three/core is its three.js port.

How it works

  • A tag is a class you import. <Mesh> is new Mesh(). Attributes follow React Three Fiber's
    rules — args are constructor arguments, position={[0, 1, 2]} goes through the property's own
    set, shadow-mapSize reaches inside, geometry and material attach to their parent. TSX builds the
    objects once; there is no React.
  • A Behaviour is a component, with Unity's hooks, coroutines, Time, Input, instantiate,
    destroy, findObjectOfType.
  • A prefab is prefab(() => …); instantiate(Prefab) makes a copy, and its tag places and
    names it like a Unity instance.
  • A scene only declares. Logic lives in behaviours; scenoco check refuses loops, branches and
    calls in a .tsx file, which keeps every scene editable by the editor as well as by hand.
  • Everything else is three.js, as three.js documents it — the renderer, post-processing, loaders.

Testing, and letting an agent look

// Vitest, no browser
const game = simulate(Main);
game.press('Space');
game.stepSeconds(2);
expect(game.find(GameState).score).toBe(10);
// Playwright, or any agent's browser tool, against `npm run dev`
await page.evaluate(() => __scenoco.click('Goblin'));
await page.evaluate(() => __scenoco.until("GameState.phase === 'over'"));

A tool that can only open an address drives it from the address:
/?drive=press('Space');until(Game.over);outline(). See TESTING.md.

Compared with

  • React Three Fiber — the TSX is the same idea,
    but React is built for UI: game state ends up in hooks and re-renders, spread between visuals.
    SceNoCo keeps TSX for declaring the scene and puts logic in behaviours.
  • Needle Engine — also joins the web and Unity, as a broad
    toolset and service around Unity's editor. SceNoCo is a small, code-first base, MIT, with the
    editor in the browser.
  • Engines that call themselves AI-native through MCP — an agent operating an editor through tool
    calls. Here the agent writes ordinary typed files and checks the running game itself.

Status

The API has held through the examples, games written by agents, and a Unity port, and 1.x keeps it.
Bugs and rough edges are welcome as issues.

About

I'm a game developer (LinkedIn), mostly mobile and casual.
Watching LLMs generate games, the problem I kept hitting was what to do with the output: a single
file that grows with every edit, that no person wants to maintain. SceNoCo is my answer — the
structure game developers already use, in the languages models already write well, so the code an
agent produces is code you can open, read and keep working on. It was built over four months with
Claude; I read the code it writes, and you are welcome to as well.

Working on this repo

npm install
npm run build          # every package, in dependency order
npm run examples:dev   # examples/breakout
npm test               # vitest, under tests/{core,packages,tooling}
npm run typecheck      # tsc over every package, the tests, each example and the starter

Working on it with an agent? Start at AGENTS.md.

License

MIT, with Robert Penner's easing equations under their own notice there.

SceNoCo is not sponsored by or affiliated with Unity Technologies or its affiliates. Unity is a trademark or
registered trademark of Unity Technologies or its affiliates in the U.S. and elsewhere. Nor is it affiliated with
Demigiant, the maker of DOTween.

Reviews (0)

No results found