# glTF files in browser games

## A .gltf file works on Go Bananas when it is self-contained; a glTF with separate .bin and texture files needs to go in a ZIP, and either way the site turns it into a GLB.

glTF (GL Transmission Format) is the open standard for 3D models in real-time apps, often called "the JPEG of 3D". A `.gltf` file is text (JSON) that describes the model. Its geometry usually lives in a separate `.bin` buffer file, and its textures in image files next to it, unless they are embedded inside the JSON.

## What glTF is good for in games

glTF carries everything a game model needs: meshes, materials, textures, skeletons and animations. It loads quickly in browsers and three.js supports it directly.

The catch is the separate files. A `.gltf` that points to `scene.bin` and `wood.png` only works if those files travel with it. That is why [GLB](/formats/glb), the one-file binary version of glTF, is usually easier: if your tool can export GLB, choose GLB.

## Uploading glTF to Go Bananas

You can upload in three places:

- **Create panel:** press the 📎 button or drag the file onto the chat.
- **Assets tab:** press **Upload Asset**.
- **Editor:** in the Assets tab press **Upload New**, press the 📎 in the editor chat, or drag the file onto the editor chat.

You need to be signed in with a verified email to upload.

| Limit | Value |
| --- | --- |
| Size per file | 200 MB |
| glTF JSON | 32 MB |
| Total storage | 100 MB for free accounts created since May 5, 2026; 1 GB for Pro subscribers and older accounts |
| Uploads | 20 an hour per account |

Failed and deleted uploads don't count toward your storage. The site checks the file really is glTF JSON (it must start with `{`) and refuses empty files.

**What the site does with it.** A standalone `.gltf` is converted into a self-contained GLB, so your game loads one file. This only works if everything the model needs is inside the JSON, with the buffers and textures embedded as data. If the `.gltf` points to outside files, the upload fails with "Incomplete glTF bundle — upload a ZIP".

**glTF with a .bin and textures.** Put the `.gltf`, its `.bin` and its textures in one [ZIP](/formats/zip) and upload the ZIP. The site finds the `.gltf`, converts it to GLB together with its buffer and textures, and keeps that as your model.

**The .bin file on its own.** You can upload a `.bin`, and it's stored as it is. But by itself it does nothing: it isn't offered to games and the AI isn't told about it. A buffer only makes sense with the `.gltf` that describes it, so upload them together in a ZIP.

Once the model is ready, you can open it in the built-in 3D viewer and orbit around it. Asset cards show a thumbnail.

**The file name matters.** The name without its extension becomes the model's name in games: `castle.gltf` is `"castle"`. Renaming the asset changes the name, and code that used the old name won't find it. If two models share a name, the newest one wins.

## Using glTF in your game

**Ask the AI.** In the create box or the edit box, type `@` and pick your model. It inserts the name in quotes:

> Put "castle" in the middle of the map and have enemies spawn from its gate.

**In code.** Your converted model is listed in `window.GAME_ASSETS.models` and loads with three.js GLTFLoader, like any GLB. Go Bananas games use three.js r128 for 3D:

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/three@0.128.0/examples/js/loaders/GLTFLoader.js"></script>
```

```js
new THREE.GLTFLoader().load(GAME_ASSETS.models['castle'].url, (gltf) => {
  const castle = gltf.scene;
  castle.position.set(0, 0, 0);
  scene.add(castle);
});
```

## Tips and common problems

- **"Incomplete glTF bundle" error:** your `.gltf` refers to a `.bin` or images. Zip the whole folder and upload the ZIP, or export GLB instead.
- **Keep the folder layout in the ZIP.** The `.gltf` finds its files by relative paths like `textures/wood.png`. Zip the folder exactly as your tool exported it.
- **Textures:** PNG, JPEG and WebP are safe choices. Large textures (above 1024×1024 pixels) slow down phones.
- **Animations** come through in glTF the same way as in GLB.
- **Huge files:** the JSON part can be at most 32 MB. Exporting as GLB keeps the geometry binary and much smaller.
- **Deleting a model removes it at once**, so games that use it can no longer load it.

## From ChatGPT or Claude

The Go Bananas app in ChatGPT and the connector in Claude can't send 3D files. Ask for an upload link and you'll get a link to the game's page, where you can upload the model in the editor.

## Related

- [GLB files](/formats/glb)
- [OBJ files](/formats/obj)
- [FBX files](/formats/fbx)
- [PLY splats](/formats/ply)
- [SPZ splats](/formats/spz)
- [ZIP bundles of 3D models](/formats/zip)
- [All file formats](/formats)
- [Making 3D games](/guides/3d-games)
- [How to make a video game](/guides/how-to-make-a-video-game)
- [Making games work on phones](/guides/games-on-phones)
