# Referensi bundel

Dihasilkan dari konstanta di `@ralyoo/sdk/bundle` dan `@ralyoo/sdk/vendor` 1.1.0: angka yang sama yang ditegakkan `ralystudioo pack` dan registry.

## Batas keras

Melewati salah satunya membuat bundel ditolak.

| Hal | Batas |
| --- | --- |
| Seluruh bundel (setelah dibongkar) | 60 MB |
| Satu file | 16 MB |
| Jumlah file | 1500 |
| Seluruh JavaScript | 4 MB |
| `ralyoo.json` | 16 KB |
| Cover | 500 KB |
| Ikon | 48 KB |
| Panjang path | 120 karakter |

## Budget muat

Melewatinya hanya menghasilkan peringatan, tetapi setiap pemain ikut menunggu.

| Hal | Budget |
| --- | --- |
| Seluruh bundel | 12 MB |
| Seluruh JavaScript | 1 MB |
| Satu file | 2 MB |

## Tipe file yang boleh

Tidak ada HTML (platform yang membuat dokumen game) dan tidak ada source map.

| Ekstensi | Disajikan sebagai |
| --- | --- |
| `.js` | `text/javascript` |
| `.mjs` | `text/javascript` |
| `.json` | `application/json` |
| `.css` | `text/css` |
| `.wasm` | `application/wasm` |
| `.txt` | `text/plain; charset=utf-8` |
| `.md` | `text/markdown; charset=utf-8` |
| `.png` | `image/png` |
| `.jpg` | `image/jpeg` |
| `.jpeg` | `image/jpeg` |
| `.webp` | `image/webp` |
| `.avif` | `image/avif` |
| `.gif` | `image/gif` |
| `.svg` | `image/svg+xml` |
| `.woff2` | `font/woff2` |
| `.ogg` | `audio/ogg` |
| `.opus` | `audio/ogg` |
| `.mp3` | `audio/mpeg` |
| `.m4a` | `audio/mp4` |
| `.wav` | `audio/wav` |
| `.glb` | `model/gltf-binary` |
| `.gltf` | `model/gltf+json` |
| `.bin` | `application/octet-stream` |
| `.ktx2` | `image/ktx2` |
| `.basis` | `application/octet-stream` |
| `.atlas` | `text/plain; charset=utf-8` |
| `.fnt` | `text/plain; charset=utf-8` |

## Pustaka bersama

Disediakan platform lewat import map, tidak ikut di-bundle. Pasang versi yang **sama persis** sebagai devDependency supaya tipenya cocok.

| Paket | Versi |
| --- | --- |
| `three` | `0.187.0` |
| `pixi.js` | `8.22.0` |
| `@dimforge/rapier2d-compat` | `0.21.0` |
| `@dimforge/rapier3d-compat` | `0.21.0` |

Impor yang tersedia:

- `three`
- `three/webgpu`
- `three/tsl`
- `three/addons/loaders/GLTFLoader.js`
- `three/addons/libs/meshopt_decoder.module.js`
- `pixi.js`
- `pixi.js/unsafe-eval`
- `@dimforge/rapier2d-compat`
- `@dimforge/rapier3d-compat`

Ralystudioo saat ini membawa pustaka 2D saja (`pixi.js`, `@dimforge/rapier2d-compat`).
