# JellyPhys — open-source 3D physics platformer kit

MIT licensed. Fork it, gut it, ship it.

## Files
- `runtime.js` — **the standalone engine** (physics, player controller, camera, rendering). No editor code. Drop into any HTML page with Three.js.
- `app.js` — the editor (build mode, inspector, gallery). Not needed to run games.
- `index.html`, `styles.css` — editor UI.

## Use the engine in your own project
In the editor: **Export → Engine Only (.js)** + **Level JSON**, or **Standalone Game (.html)** for a single ready-to-host file.

```html
<div id="game" style="width:100vw;height:100vh"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<script src="jellyphys-engine.js"></script>
<script>
  fetch('my-level.jellyphys.json').then(r=>r.json()).then(level=>{
    const game = JellyPhysRuntime.create({ container: document.getElementById('game'), level,
      onWin: r => console.log('won', r) });
  });
</script>
```

## Hack it
- Add object types in `TYPES` (runtime.js) and handle them in `createMesh` + `step`.
- Physics settings live in `level.phys`. World scripts: `level.worldScript` (runs every tick with `player, world, dt`).
- Pull requests to reality welcome.